summaryrefslogtreecommitdiffstats
path: root/utils/src
diff options
context:
space:
mode:
Diffstat (limited to 'utils/src')
-rw-r--r--utils/src/ooinstall/cli_installer.py25
-rw-r--r--utils/src/ooinstall/oo_config.py2
-rw-r--r--utils/src/ooinstall/openshift_ansible.py3
3 files changed, 29 insertions, 1 deletions
diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py
index 3d6b24138..71bdbd5a1 100644
--- a/utils/src/ooinstall/cli_installer.py
+++ b/utils/src/ooinstall/cli_installer.py
@@ -520,6 +520,24 @@ def error_if_missing_info(oo_cfg):
if missing_info:
sys.exit(1)
+def get_proxy_hostname_and_excludes():
+ message = """
+If a proxy is needed to reach HTTP and HTTPS traffic please enter the name below.
+This proxy will be configured by default for all processes needing to reach systems outside
+the cluster.
+
+More advanced configuration is possible if using ansible directly:
+
+https://docs.openshift.com/enterprise/latest/install_config/http_proxies.html
+"""
+ click.echo(message)
+
+ message = "Specify the hostname for your proxy? (ENTER for none)"
+ proxy_hostname = click.prompt(message)
+
+ message = "List any hosts that should be excluded from your proxy. (ENTER for none)"
+ proxy_excludes = click.prompt(message)
+ return proxy_hostname, proxy_excludes
def get_missing_info_from_user(oo_cfg):
""" Prompts the user for any information missing from the given configuration. """
@@ -566,6 +584,13 @@ https://docs.openshift.com/enterprise/latest/admin_guide/install/prerequisites.h
oo_cfg.settings['master_routingconfig_subdomain'] = get_master_routingconfig_subdomain()
click.clear()
+ if not oo_cfg.settings.get('openshift_http_proxy', None):
+ proxy_hostname, proxy_excludes = get_proxy_hostname_and_excludes()
+ oo_cfg.settings['openshift_http_proxy'] = proxy_hostname
+ oo_cfg.settings['openshift_https_proxy'] = proxy_hostname
+ oo_cfg.settings['openshift_no_proxy'] = proxy_excludes
+ click.clear()
+
return oo_cfg
diff --git a/utils/src/ooinstall/oo_config.py b/utils/src/ooinstall/oo_config.py
index 0f1f5caf7..24dfbe013 100644
--- a/utils/src/ooinstall/oo_config.py
+++ b/utils/src/ooinstall/oo_config.py
@@ -11,6 +11,8 @@ PERSIST_SETTINGS = [
'ansible_config',
'ansible_log_path',
'master_routingconfig_subdomain',
+ 'proxy',
+ 'proxy_exclude_hosts',
'variant',
'variant_version',
'version',
diff --git a/utils/src/ooinstall/openshift_ansible.py b/utils/src/ooinstall/openshift_ansible.py
index cfe2819e8..5ace63918 100644
--- a/utils/src/ooinstall/openshift_ansible.py
+++ b/utils/src/ooinstall/openshift_ansible.py
@@ -129,7 +129,8 @@ def write_inventory_vars(base_inventory, multiple_masters, proxy):
"openshift_master_cluster_public_hostname={}\n".format(proxy.public_hostname))
if CFG.settings.get('master_routingconfig_subdomain', False):
base_inventory.write(
- "openshift_master_default_subdomain={}\n".format(CFG.settings['master_routingconfig_subdomain']))
+ "openshift_master_default_subdomain={}\n".format(
+ CFG.settings['master_routingconfig_subdomain']))
if CFG.settings.get('variant_version', None) == '3.1':
#base_inventory.write('openshift_image_tag=v{}\n'.format(CFG.settings.get('variant_version')))
base_inventory.write('openshift_image_tag=v{}\n'.format('3.1.1.6'))