Last active
May 18, 2018 04:23
-
-
Save pvdvreede/538484f63e89f5c373b914769ab3e278 to your computer and use it in GitHub Desktop.
etcd docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
version: '2.3' | |
x-etcd: &etcd | |
image: quay.io/coreos/etcd:v3.2.17 | |
networks: | |
- etcd | |
x-environment: &env | |
ETCD_LISTEN_PEER_URLS: "http://0.0.0.0:2380" | |
ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379" | |
ETCD_INITIAL_CLUSTER_STATE: "new" | |
ETCD_INITIAL_CLUSTER: node01=http://etcd01:2380,node02=http://etcd02:2380,node03=http://etcd03:2380 | |
ETCD_ADVERTISE_CLIENT_URLS: "http://etcd01:2379,http://etcd02:2379,http://etcd03:2379" | |
ETCD_STRICT_RECONFIG_CHECK: "true" | |
services: | |
etcd01: | |
<<: *etcd | |
environment: | |
<<: *env | |
ETCD_NAME: node01 | |
ETCD_INITIAL_ADVERTISE_PEER_URLS: "http://etcd01:2380" | |
etcd02: | |
<<: *etcd | |
environment: | |
<<: *env | |
ETCD_NAME: node02 | |
ETCD_INITIAL_ADVERTISE_PEER_URLS: "http://etcd02:2380" | |
etcd03: | |
<<: *etcd | |
environment: | |
<<: *env | |
ETCD_NAME: node03 | |
ETCD_INITIAL_ADVERTISE_PEER_URLS: "http://etcd03:2380" | |
etcd04: | |
<<: *etcd | |
environment: | |
<<: *env | |
ETCD_NAME: node04 | |
ETCD_INITIAL_CLUSTER_STATE: "existing" | |
ETCD_INITIAL_CLUSTER: "node04=http://etcd04:2380,node01=http://etcd01:2380,node03=http://etcd03:2380" | |
ctl: | |
<<: *etcd | |
entrypoint: | |
- sh | |
networks: | |
etcd: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment