summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-08-02 15:05:25 -0400
committerGitHub <noreply@github.com>2017-08-02 15:05:25 -0400
commit1765ce2bb6ab28a14c60dd5c268ec97ed788a1c1 (patch)
treefe9a859bed719346866f8b60d7557493bef1b83a /roles
parente8b99e303e94ae38a9dfce59a36413c88bcfc57c (diff)
parentcd269f075b557e19ce5c0da33d1e2494e3bed9b7 (diff)
downloadopenshift-1765ce2bb6ab28a14c60dd5c268ec97ed788a1c1.tar.gz
openshift-1765ce2bb6ab28a14c60dd5c268ec97ed788a1c1.tar.bz2
openshift-1765ce2bb6ab28a14c60dd5c268ec97ed788a1c1.tar.xz
openshift-1765ce2bb6ab28a14c60dd5c268ec97ed788a1c1.zip
Merge pull request #3043 from jkhelil/scaleup_etcd
Add etcd scaleup playbook
Diffstat (limited to 'roles')
-rw-r--r--roles/etcd/templates/etcd.conf.j218
-rw-r--r--roles/etcd_server_certificates/meta/main.yml1
-rw-r--r--roles/openshift_etcd_ca/meta/main.yml1
3 files changed, 9 insertions, 11 deletions
diff --git a/roles/etcd/templates/etcd.conf.j2 b/roles/etcd/templates/etcd.conf.j2
index 1b5598f46..ce362c743 100644
--- a/roles/etcd/templates/etcd.conf.j2
+++ b/roles/etcd/templates/etcd.conf.j2
@@ -8,12 +8,8 @@
{% endfor -%}
{% endmacro -%}
-{% if (etcd_peers | default([]) | length > 1) or (etcd_is_thirdparty) %}
ETCD_NAME={{ etcd_hostname }}
ETCD_LISTEN_PEER_URLS={{ etcd_listen_peer_urls }}
-{% else %}
-ETCD_NAME=default
-{% endif %}
ETCD_DATA_DIR={{ etcd_data_dir }}
#ETCD_SNAPSHOT_COUNTER=10000
ETCD_HEARTBEAT_INTERVAL=500
@@ -23,20 +19,20 @@ ETCD_LISTEN_CLIENT_URLS={{ etcd_listen_client_urls }}
#ETCD_MAX_WALS=5
#ETCD_CORS=
-{% if etcd_is_thirdparty %}
+
#[cluster]
ETCD_INITIAL_ADVERTISE_PEER_URLS={{ etcd_initial_advertise_peer_urls }}
-
+{% if etcd_is_thirdparty %}
# TODO: This needs to be altered to support the correct etcd instances
ETCD_INITIAL_CLUSTER={{ etcd_hostname}}={{ etcd_initial_advertise_peer_urls }}
ETCD_INITIAL_CLUSTER_STATE={{ etcd_initial_cluster_state }}
ETCD_INITIAL_CLUSTER_TOKEN=thirdparty-etcd-cluster-1
-{% endif %}
-
-{% if etcd_peers | default([]) | length > 1 %}
-#[cluster]
-ETCD_INITIAL_ADVERTISE_PEER_URLS={{ etcd_initial_advertise_peer_urls }}
+{% else %}
+{% if initial_etcd_cluster is defined and initial_etcd_cluster %}
+ETCD_INITIAL_CLUSTER={{ initial_etcd_cluster }}
+{% else %}
ETCD_INITIAL_CLUSTER={{ initial_cluster() }}
+{% endif %}
ETCD_INITIAL_CLUSTER_STATE={{ etcd_initial_cluster_state }}
ETCD_INITIAL_CLUSTER_TOKEN={{ etcd_initial_cluster_token }}
#ETCD_DISCOVERY=
diff --git a/roles/etcd_server_certificates/meta/main.yml b/roles/etcd_server_certificates/meta/main.yml
index b453f2bd8..4b6013a49 100644
--- a/roles/etcd_server_certificates/meta/main.yml
+++ b/roles/etcd_server_certificates/meta/main.yml
@@ -14,3 +14,4 @@ galaxy_info:
- system
dependencies:
- role: etcd_ca
+ when: (etcd_ca_setup | default(True) | bool)
diff --git a/roles/openshift_etcd_ca/meta/main.yml b/roles/openshift_etcd_ca/meta/main.yml
index d73d27356..f1d669d6b 100644
--- a/roles/openshift_etcd_ca/meta/main.yml
+++ b/roles/openshift_etcd_ca/meta/main.yml
@@ -15,3 +15,4 @@ galaxy_info:
dependencies:
- role: openshift_etcd_facts
- role: etcd_ca
+ when: (etcd_ca_setup | default(True) | bool)