-
Notifications
You must be signed in to change notification settings - Fork 59
/
docker-compose-cluster.yml
117 lines (117 loc) · 3.09 KB
/
docker-compose-cluster.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
version: '3'
services:
etcd0:
image: quay.io/coreos/etcd:v3.3
ports:
- 2379
volumes:
- ./bin/tlskey:/etc/etcd/etcdSSL
command:
- /usr/local/bin/etcd
- -name
- etcd0
- --data-dir
- /etcd_data
- -advertise-client-urls
- https://etcd0:2379
- -listen-client-urls
- https://0.0.0.0:2379
- -initial-advertise-peer-urls
- https://etcd0:2380
- -listen-peer-urls
- https://0.0.0.0:2380
- -initial-cluster
- etcd0=https://etcd0:2380,etcd1=https://etcd1:2380,etcd2=https://etcd2:2380
- --cert-file
- /etc/etcd/etcdSSL/etcd.pem
- --key-file
- /etc/etcd/etcdSSL/etcd-key.pem
- --peer-cert-file
- /etc/etcd/etcdSSL/etcd.pem
- --peer-key-file
- /etc/etcd/etcdSSL/etcd-key.pem
- --trusted-ca-file
- /etc/etcd/etcdSSL/etcd-root-ca.pem
- --peer-trusted-ca-file
- /etc/etcd/etcdSSL/etcd-root-ca.pem
etcd1:
image: quay.io/coreos/etcd:v3.3
ports:
- 2379
volumes:
- ./bin/tlskey:/etc/etcd/etcdSSL
command:
- /usr/local/bin/etcd
- -name
- etcd1
- --data-dir
- /etcd_data
- -advertise-client-urls
- https://etcd1:2379
- -listen-client-urls
- https://0.0.0.0:2379
- -initial-advertise-peer-urls
- https://etcd1:2380
- -listen-peer-urls
- https://0.0.0.0:2380
- -initial-cluster
- etcd0=https://etcd0:2380,etcd1=https://etcd1:2380,etcd2=https://etcd2:2380
- --cert-file
- /etc/etcd/etcdSSL/etcd.pem
- --key-file
- /etc/etcd/etcdSSL/etcd-key.pem
- --peer-cert-file
- /etc/etcd/etcdSSL/etcd.pem
- --peer-key-file
- /etc/etcd/etcdSSL/etcd-key.pem
- --trusted-ca-file
- /etc/etcd/etcdSSL/etcd-root-ca.pem
- --peer-trusted-ca-file
- /etc/etcd/etcdSSL/etcd-root-ca.pem
etcd2:
image: quay.io/coreos/etcd:v3.3
ports:
- 2379
volumes:
- ./bin/tlskey:/etc/etcd/etcdSSL
command:
- /usr/local/bin/etcd
- -name
- etcd2
- --data-dir
- /etcd_data
- -advertise-client-urls
- https://etcd2:2379
- -listen-client-urls
- https://0.0.0.0:2379
- -initial-advertise-peer-urls
- https://etcd2:2380
- -listen-peer-urls
- https://0.0.0.0:2380
- -initial-cluster
- etcd0=https://etcd0:2380,etcd1=https://etcd1:2380,etcd2=https://etcd2:2380
- --cert-file
- /etc/etcd/etcdSSL/etcd.pem
- --key-file
- /etc/etcd/etcdSSL/etcd-key.pem
- --peer-cert-file
- /etc/etcd/etcdSSL/etcd.pem
- --peer-key-file
- /etc/etcd/etcdSSL/etcd-key.pem
- --trusted-ca-file
- /etc/etcd/etcdSSL/etcd-root-ca.pem
- --peer-trusted-ca-file
- /etc/etcd/etcdSSL/etcd-root-ca.pem
etcd-manage:
# build: .
image: "shiguanghuxian/etcd-manage:1"
ports:
- "10280:10280"
volumes:
- ./bin/config/cfg.toml:/app/config/cfg.toml
- ./bin/logs:/app/logs
- ./bin/tlskey:/etc/etcd/etcdSSL
depends_on:
- etcd0
- etcd1
- etcd2