Scale-up functionality for etcd cluster

* Set ETCD_INITIAL_CLUSTER_STATE from `new` to `existing`,
because parameter `new` makes sense only on cluster assembly
stage.
* If cluster exists and current node is not a part
of the cluster, add it with command `etcdctl add member name url`.

Closes kubespray/kargo/#270
This commit is contained in:
Evgeny L
2016-05-27 12:55:52 +03:00
parent cb92b30c25
commit 0500f27db8
6 changed files with 56 additions and 19 deletions

View File

@@ -0,0 +1,7 @@
---
- name: Configure | Check if cluster is healthy
shell: "etcdctl --peers={{ etcd_access_addresses }} cluster-health | grep -q 'cluster is healthy'"
register: etcd_cluster_is_healthy
ignore_errors: true
changed_when: false
when: is_etcd_master