Skip to content

Instantly share code, notes, and snippets.

@setekhid
Created May 10, 2017 03:47
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save setekhid/17a7bfb8ac26428ebced829d28f780aa to your computer and use it in GitHub Desktop.
Save setekhid/17a7bfb8ac26428ebced829d28f780aa to your computer and use it in GitHub Desktop.
version: '2'
services:
etcd1:
image: quay.io/coreos/etcd:v3.1.7
restart: always
ports:
- 23791:2379
- 23801:2380
environment:
ETCD_NAME: infra1
ETCD_INITIAL_ADVERTISE_PEER_URLS: http://etcd1:2380
ETCD_INITIAL_CLUSTER: infra3=http://etcd3:2380,infra1=http://etcd1:2380,infra2=http://etcd2:2380
ETCD_INITIAL_CLUSTER_STATE: new
ETCD_INITIAL_CLUSTER_TOKEN: etcd-tasting-01
ETCD_LISTEN_CLIENT_URLS: http://etcd1:2379,http://localhost:2379
ETCD_LISTEN_PEER_URLS: http://etcd1:2380
ETCD_ADVERTISE_CLIENT_URLS: http://etcd1:2379
etcd2:
image: quay.io/coreos/etcd:v3.1.7
restart: always
ports:
- 23792:2379
- 23802:2380
environment:
ETCD_NAME: infra2
ETCD_INITIAL_ADVERTISE_PEER_URLS: http://etcd2:2380
ETCD_INITIAL_CLUSTER: infra3=http://etcd3:2380,infra1=http://etcd1:2380,infra2=http://etcd2:2380
ETCD_INITIAL_CLUSTER_STATE: new
ETCD_INITIAL_CLUSTER_TOKEN: etcd-tasting-01
ETCD_LISTEN_CLIENT_URLS: http://etcd2:2379,http://localhost:2379
ETCD_LISTEN_PEER_URLS: http://etcd2:2380
ETCD_ADVERTISE_CLIENT_URLS: http://etcd2:2379
etcd3:
image: quay.io/coreos/etcd:v3.1.7
restart: always
ports:
- 23793:2379
- 23803:2380
environment:
ETCD_NAME: infra3
ETCD_INITIAL_ADVERTISE_PEER_URLS: http://etcd3:2380
ETCD_INITIAL_CLUSTER: infra3=http://etcd3:2380,infra1=http://etcd1:2380,infra2=http://etcd2:2380
ETCD_INITIAL_CLUSTER_STATE: new
ETCD_INITIAL_CLUSTER_TOKEN: etcd-tasting-01
ETCD_LISTEN_CLIENT_URLS: http://etcd3:2379,http://localhost:2379
ETCD_LISTEN_PEER_URLS: http://etcd3:2380
ETCD_ADVERTISE_CLIENT_URLS: http://etcd3:2379
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment