summaryrefslogtreecommitdiffstats
path: root/utils/src/ooinstall
diff options
context:
space:
mode:
authorSamuel Munilla <smunilla@redhat.com>2015-11-20 10:41:42 -0500
committerSamuel Munilla <smunilla@redhat.com>2015-11-20 15:05:09 -0500
commit26fd8b9488f8b334eecac113dac4789412587f21 (patch)
tree7dd71ee6a487ce33e5c163df743ef4dece996b2e /utils/src/ooinstall
parent42fd40f644c6a0b36577d96409b95c0895a5b282 (diff)
downloadopenshift-26fd8b9488f8b334eecac113dac4789412587f21.tar.gz
openshift-26fd8b9488f8b334eecac113dac4789412587f21.tar.bz2
openshift-26fd8b9488f8b334eecac113dac4789412587f21.tar.xz
openshift-26fd8b9488f8b334eecac113dac4789412587f21.zip
Enforce 1 or 3 masters
Diffstat (limited to 'utils/src/ooinstall')
-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 = {}