summaryrefslogtreecommitdiffstats
path: root/utils/src
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2016-11-03 09:41:44 -0400
committerGitHub <noreply@github.com>2016-11-03 09:41:44 -0400
commita5f884039104aeffdea0b2ef232b3ea32a9b3132 (patch)
tree4be0c5577f75ef887c412fc6901d7c63a2e45f4a /utils/src
parent4ad4b14403fca7220dd10657b6fa723b9e2bae05 (diff)
parent584f6aa2c54531adb7348ef93e0875469c8ded2d (diff)
downloadopenshift-a5f884039104aeffdea0b2ef232b3ea32a9b3132.tar.gz
openshift-a5f884039104aeffdea0b2ef232b3ea32a9b3132.tar.bz2
openshift-a5f884039104aeffdea0b2ef232b3ea32a9b3132.tar.xz
openshift-a5f884039104aeffdea0b2ef232b3ea32a9b3132.zip
Merge pull request #2683 from smunilla/BZ1388754
Update master_lb vs cluster_hostname workflow
Diffstat (limited to 'utils/src')
-rw-r--r--utils/src/ooinstall/cli_installer.py28
1 files changed, 22 insertions, 6 deletions
diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py
index 32da3f663..2a23866e0 100644
--- a/utils/src/ooinstall/cli_installer.py
+++ b/utils/src/ooinstall/cli_installer.py
@@ -165,10 +165,13 @@ http://docs.openshift.com/enterprise/latest/architecture/infrastructure_componen
if masters_set or num_masters != 2:
more_hosts = click.confirm('Do you want to add additional hosts?')
- master_lb = collect_master_lb(hosts)
- if master_lb:
- hosts.append(master_lb)
- roles.add('master_lb')
+ if num_masters > 2:
+ master_lb = collect_master_lb(hosts)
+ if master_lb:
+ hosts.append(master_lb)
+ roles.add('master_lb')
+ else:
+ set_cluster_hostname(oo_cfg)
if not existing_env:
collect_storage_host(hosts)
@@ -292,8 +295,7 @@ hostname.
return hostname
lb_hostname = click.prompt('Enter hostname or IP address',
- value_proc=validate_prompt_lb,
- default='')
+ value_proc=validate_prompt_lb)
if lb_hostname:
host_props['connect_to'] = lb_hostname
install_haproxy = \
@@ -304,6 +306,20 @@ hostname.
else:
return None
+def set_cluster_hostname(oo_cfg):
+ message = """
+You have chosen to install a single master cluster (non-HA).
+
+In a single master cluster, the cluster host name (Ansible variable openshift_master_cluster_public_hostname) is set by default to the host name of the single master. In a multiple master (HA) cluster, the FQDN of a host must be provided that will be configured as a proxy. This could be either an existing load balancer configured to balance all masters on
+port 8443 or a new host that would have HAProxy installed on it.
+
+(Optional)
+If you want to override the cluster host name now to something other than the default (the host name of the single master), or if you think you might add masters later to become an HA cluster and want to future proof your cluster host name choice, please provide a FQDN. Otherwise, press ENTER to continue and accept the default.
+"""
+ click.echo(message)
+ cluster_hostname = click.prompt('Enter hostname or IP address',
+ default='')
+ oo_cfg.deployment.variables['openshift_master_cluster_hostname'] = cluster_hostname
def collect_storage_host(hosts):
"""