murano-apps/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/default_scripts/etcd-member

11 lines
854 B
Plaintext

INIT_ETCD_OPTS="--name %%NAME%% --initial-cluster-state existing --initial-cluster %%CLUSTER_CONFIG%% --data-dir /var/lib/etcd --snapshot-count 1000 --listen-peer-urls http://%%IP%%:7001,http://127.0.0.1:7001 --listen-client-urls http://%%IP%%:4001,http://127.0.0.1:4001 --initial-advertise-peer-urls http://%%IP%%:7001 --advertise-client-urls http://%%IP%%:4001,http://127.0.0.1:4001"
EXISTING_ETCD_OPTS="--name %%NAME%% --data-dir /var/lib/etcd --snapshot-count 1000 --listen-peer-urls http://%%IP%%:7001,http://127.0.0.1:7001 --listen-client-urls http://%%IP%%:4001,http://127.0.0.1:4001 --advertise-client-urls http://%%IP%%:4001,http://127.0.0.1:4001"
if [ -d /var/lib/etcd/wal/ ]
then
#This will allow to restart etcd service properly to pick up properties from other peers
ETCD_OPTS=$EXISTING_ETCD_OPTS
else
ETCD_OPTS=$INIT_ETCD_OPTS
fi