summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/library
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2015-06-12 14:52:03 -0400
committerJason DeTiberus <jdetiber@redhat.com>2015-07-10 14:06:17 -0400
commite7082b9870bdf4cc0769645f4fae3bccc3efdee4 (patch)
tree7ba68c85c943dc50ac6102d5dbd91d3537388cd1 /roles/openshift_facts/library
parentf08e64ac98a62863dfd7b7802338a0a7f4770188 (diff)
downloadopenshift-e7082b9870bdf4cc0769645f4fae3bccc3efdee4.tar.gz
openshift-e7082b9870bdf4cc0769645f4fae3bccc3efdee4.tar.bz2
openshift-e7082b9870bdf4cc0769645f4fae3bccc3efdee4.tar.xz
openshift-e7082b9870bdf4cc0769645f4fae3bccc3efdee4.zip
Add etcd role that builds out basic etcd cluster
- Add initial etcd role - Add etcd playbook to create etcd client certs - Hookup master to etcd
Diffstat (limited to 'roles/openshift_facts/library')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index ca5ea1da0..e9a2ceffb 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -366,13 +366,24 @@ def set_url_facts_if_unset(facts):
console_port = facts['master']['console_port']
console_path = facts['master']['console_path']
etcd_use_ssl = facts['master']['etcd_use_ssl']
+ etcd_hosts = facts['master']['etcd_hosts']
etcd_port = facts['master']['etcd_port'],
hostname = facts['common']['hostname']
public_hostname = facts['common']['public_hostname']
if 'etcd_urls' not in facts['master']:
- facts['master']['etcd_urls'] = [format_url(etcd_use_ssl, hostname,
- etcd_port)]
+ etcd_urls = []
+ if etcd_hosts != '':
+ etcd_port = 2379
+ facts['master']['etcd_port'] = etcd_port
+ facts['master']['embedded_etcd'] = False
+ for host in etcd_hosts:
+ etcd_urls.append(format_url(etcd_use_ssl, host,
+ etcd_port))
+ else:
+ etcd_urls = [format_url(etcd_use_ssl, hostname,
+ etcd_port)]
+ facts['master']['etcd_urls'] = etcd_urls
if 'api_url' not in facts['master']:
facts['master']['api_url'] = format_url(api_use_ssl, hostname,
api_port)
@@ -695,7 +706,7 @@ class OpenShiftFacts(object):
if 'master' in roles:
master = dict(api_use_ssl=True, api_port='8443',
console_use_ssl=True, console_path='/console',
- console_port='8443', etcd_use_ssl=True,
+ console_port='8443', etcd_use_ssl=True, etcd_hosts='',
etcd_port='4001', portal_net='172.30.0.0/16',
embedded_etcd=True, embedded_kube=True,
embedded_dns=True, dns_port='53',