diff options
author | Samuel Munilla <smunilla@redhat.com> | 2016-10-28 11:36:17 -0400 |
---|---|---|
committer | Samuel Munilla <smunilla@redhat.com> | 2016-10-28 11:42:08 -0400 |
commit | 584f6aa2c54531adb7348ef93e0875469c8ded2d (patch) | |
tree | 06345233994963140682149fd2d1e474807e18d2 | |
parent | 5b12ba1e9571f6a5b7763769c1394846af74436e (diff) | |
download | openshift-584f6aa2c54531adb7348ef93e0875469c8ded2d.tar.gz openshift-584f6aa2c54531adb7348ef93e0875469c8ded2d.tar.bz2 openshift-584f6aa2c54531adb7348ef93e0875469c8ded2d.tar.xz openshift-584f6aa2c54531adb7348ef93e0875469c8ded2d.zip |
Update master_lb vs cluster_hostname workflow
Previously, the messaging around setting cluster_hostname
for single master setups was confusing. This should help with
that as well as removing unecessary values from the cfg file.
-rw-r--r-- | utils/src/ooinstall/cli_installer.py | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py index 7c7770207..989dae2ad 100644 --- a/utils/src/ooinstall/cli_installer.py +++ b/utils/src/ooinstall/cli_installer.py @@ -170,10 +170,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) @@ -300,8 +303,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 = \ @@ -312,6 +314,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): """ |