-
Notifications
You must be signed in to change notification settings - Fork 2
/
infra-kv-etcd-v2.yml
96 lines (92 loc) · 2.85 KB
/
infra-kv-etcd-v2.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#############################################################################################
# etcd
#
# ref:
# - https://github.com/guessi/docker-compose-etcd/blob/master/docker-compose.yml
# - https://github.com/docker-composes/etcdkeeper/blob/master/docker-compose.yml
# - https://github.com/deltaprojects/etcdkeeper/blob/master/docker-compose.yml
#
#
#############################################################################################
version: '3'
services:
etcd-1:
container_name: etcd1
image: quay.io/coreos/etcd:v3.3
entrypoint: /usr/local/bin/etcd
command:
- '--name=etcd-1'
- '--initial-advertise-peer-urls=http://etcd-1:2380'
- '--listen-peer-urls=http://0.0.0.0:2380'
- '--listen-client-urls=http://0.0.0.0:2379'
- '--advertise-client-urls=http://etcd-1:2379'
- '--initial-cluster-token=mys3cr3ttok3n'
- '--heartbeat-interval=250'
- '--election-timeout=1250'
- '--initial-cluster=etcd-1=http://etcd-1:2380,etcd-2=http://etcd-2:2380,etcd-3=http://etcd-3:2380'
- '--initial-cluster-state=new'
ports:
- 2379:2379
volumes:
- etcd1:/etcd_data
networks:
- etcd
etcd-2:
container_name: etcd2
image: quay.io/coreos/etcd:v3.3
entrypoint: /usr/local/bin/etcd
command:
- '--name=etcd-2'
- '--initial-advertise-peer-urls=http://etcd-2:2380'
- '--listen-peer-urls=http://0.0.0.0:2380'
- '--listen-client-urls=http://0.0.0.0:2379'
- '--advertise-client-urls=http://etcd-2:2379'
- '--initial-cluster-token=mys3cr3ttok3n'
- '--heartbeat-interval=250'
- '--election-timeout=1250'
- '--initial-cluster=etcd-1=http://etcd-1:2380,etcd-2=http://etcd-2:2380,etcd-3=http://etcd-3:2380'
- '--initial-cluster-state=new'
ports:
- 2379
volumes:
- etcd2:/etcd_data
networks:
- etcd
etcd-3:
container_name: etcd3
image: quay.io/coreos/etcd:v3.3
entrypoint: /usr/local/bin/etcd
command:
- '--name=etcd-3'
- '--initial-advertise-peer-urls=http://etcd-3:2380'
- '--listen-peer-urls=http://0.0.0.0:2380'
- '--listen-client-urls=http://0.0.0.0:2379'
- '--advertise-client-urls=http://etcd-3:2379'
- '--initial-cluster-token=mys3cr3ttok3n'
- '--heartbeat-interval=250'
- '--election-timeout=1250'
- '--initial-cluster=etcd-1=http://etcd-1:2380,etcd-2=http://etcd-2:2380,etcd-3=http://etcd-3:2380'
- '--initial-cluster-state=new'
ports:
- 2379
volumes:
- etcd3:/etcd_data
networks:
- etcd
# etcdkeeper:
# image: deltaprojects/etcdkeeper
# container_name: etcdkeeper
# environment:
# HOST: "0.0.0.0"
# ports:
# - 18001:8080 # web ui <18001>
# depends_on:
# - etcd-1
# networks:
# - etcd
volumes:
etcd1:
etcd2:
etcd3:
networks:
etcd: