summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorSamuel Munilla <smunilla@redhat.com>2015-11-20 10:41:42 -0500
committerSamuel Munilla <smunilla@redhat.com>2015-11-23 18:05:26 -0500
commitd446b2fe458444a88ceffd1d1966d6814b5185b5 (patch)
treebe17edfba354c5dce6c00318b5ac4be3cbb9e58b /utils
parentda2eddb79784ddcff75cbb71a4d7cc77b3e86386 (diff)
downloadopenshift-d446b2fe458444a88ceffd1d1966d6814b5185b5.tar.gz
openshift-d446b2fe458444a88ceffd1d1966d6814b5185b5.tar.bz2
openshift-d446b2fe458444a88ceffd1d1966d6814b5185b5.tar.xz
openshift-d446b2fe458444a88ceffd1d1966d6814b5185b5.zip
Enforce 1 or 3 masters
Diffstat (limited to 'utils')
-rw-r--r--utils/src/ooinstall/cli_installer.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/utils/src/ooinstall/cli_installer.py b/utils/src/ooinstall/cli_installer.py
index 1b4a67259..fce8f9b22 100644
--- a/utils/src/ooinstall/cli_installer.py
+++ b/utils/src/ooinstall/cli_installer.py
@@ -113,9 +113,12 @@ http://docs.openshift.com/enterprise/latest/architecture/infrastructure_componen
if click.confirm('Will this host be an OpenShift Master?'):
host_props['master'] = True
num_masters += 1
+
+ if num_masters > 1:
+ hosts.append(collect_ha_proxy())
+
if num_masters >= 3:
masters_set = True
- hosts.append(collect_ha_proxy())
host_props['node'] = True
#TODO: Reenable this option once container installs are out of tech preview
@@ -132,7 +135,8 @@ http://docs.openshift.com/enterprise/latest/architecture/infrastructure_componen
hosts.append(host)
- more_hosts = click.confirm('Do you want to add additional hosts?')
+ if num_masters <= 1 or num_masters >= 3:
+ more_hosts = click.confirm('Do you want to add additional hosts?')
return hosts
def collect_ha_proxy():
@@ -144,6 +148,8 @@ Setting up High Availability Masters requires a load balancing solution.
Please provide a host that will be configured as a proxy. This can either be
an existing load balancer configured to balance all masters on port 8443 or a
new host that will have HAProxy installed on it.
+
+This will also require you to set a third master.
"""
click.echo(message)
host_props = {}