-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
201 lines (192 loc) · 4.72 KB
/
docker-compose.yaml
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
version: '3'
services:
prometheus:
image: prom/prometheus
container_name: prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
restart: unless-stopped
volumes:
- ./prometheus:/etc/prometheus
- prom_data:/prometheus
deploy:
resources:
limits:
cpus: '0.3'
memory: 300M
node_exporter:
image: prom/node-exporter:latest
deploy:
resources:
limits:
cpus: '0.1'
memory: 100M
grafana:
image: grafana/grafana
container_name: grafana
ports:
- '3000:3000'
restart: unless-stopped
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=grafana
- GF_LOG_LEVEL=error
- GF_SMTP_ENABLED=true
- GF_SMTP_HOST=smtp.gmail.com:587
- GF_SMTP_PASSWORD=rwtvawmdlscqrteb
volumes:
- ./grafana:/etc/grafana/provisioning/datasources
- grafana_data:/var/lib/grafana
deploy:
resources:
limits:
cpus: '0.5'
memory: 600M
leader_0:
image: kysre/turtlemq:leader-${LEADER_IMAGE_TAG}
restart: unless-stopped
depends_on:
- prometheus
environment:
- LEADER_LOGGING_LEVEL=info
- LEADER_LEADER_DATANODEREMAININGCHECKPERIOD=1
- LEADER_LEADER_DATANODEPARTITIONCOUNT=100
- LEADER_LEADER_DATANODESYNCTIMEOUT=1000
- LEADER_LEADER_REPLICAHOST=leader_1
ports:
- '8000:8888'
deploy:
resources:
limits:
cpus: '0.3'
memory: 300M
leader_1:
image: kysre/turtlemq:leader-${LEADER_IMAGE_TAG}
restart: unless-stopped
depends_on:
- prometheus
- leader_0
environment:
- LEADER_LOGGING_LEVEL=info
- LEADER_LEADER_DATANODEREMAININGCHECKPERIOD=1
- LEADER_LEADER_DATANODEPARTITIONCOUNT=100
- LEADER_LEADER_DATANODESYNCTIMEOUT=1000
- LEADER_LEADER_REPLICAHOST=leader_0
ports:
- '8001:8888'
deploy:
resources:
limits:
cpus: '0.3'
memory: 300M
datanode_0:
image: kysre/turtlemq:datanode-${DATANODE_IMAGE_TAG}
restart: unless-stopped
depends_on:
- leader_0
- leader_1
environment:
- HOME_PATH=/var/lib/turtlemq/data/
- DATANODE_NAME=datanode_0
- DATANODE_PORT=8000
- LEADER_HOST=leader_0
- LEADER_PORT=8888
- PULL_TIMEOUT=10
- PENDING_TIMEOUT=15
- CLEANER_PERIOD=3
- PARTITIONS_COUNT=100
- SERVER_THREAD_POOL_SIZE=100
volumes:
- datanode_0_vol:/var/lib/turtlemq/data/
deploy:
resources:
limits:
cpus: '0.3'
memory: 400M
datanode_1:
image: kysre/turtlemq:datanode-${DATANODE_IMAGE_TAG}
restart: unless-stopped
depends_on:
- leader_0
- leader_1
environment:
- HOME_PATH=/var/lib/turtlemq/data/
- DATANODE_NAME=datanode_1
- DATANODE_PORT=8000
- LEADER_HOST=leader_0
- LEADER_PORT=8888
- PULL_TIMEOUT=10
- PENDING_TIMEOUT=15
- CLEANER_PERIOD=3
- PARTITIONS_COUNT=100
- SERVER_THREAD_POOL_SIZE=100
volumes:
- datanode_1_vol:/var/lib/turtlemq/data/
deploy:
resources:
limits:
cpus: '0.3'
memory: 400M
datanode_2:
image: kysre/turtlemq:datanode-${DATANODE_IMAGE_TAG}
restart: unless-stopped
depends_on:
- leader_0
- leader_1
environment:
- HOME_PATH=/var/lib/turtlemq/data/
- DATANODE_NAME=datanode_2
- DATANODE_PORT=8000
- LEADER_HOST=leader_0
- LEADER_PORT=8888
- PULL_TIMEOUT=10
- PENDING_TIMEOUT=15
- CLEANER_PERIOD=3
- PARTITIONS_COUNT=100
- SERVER_THREAD_POOL_SIZE=100
volumes:
- datanode_2_vol:/var/lib/turtlemq/data/
deploy:
resources:
limits:
cpus: '0.3'
memory: 400M
datanode_3:
image: kysre/turtlemq:datanode-${DATANODE_IMAGE_TAG}
restart: unless-stopped
depends_on:
- leader_0
- leader_1
environment:
- HOME_PATH=/var/lib/turtlemq/data/
- DATANODE_NAME=datanode_3
- DATANODE_PORT=8000
- LEADER_HOST=leader_0
- LEADER_PORT=8888
- PULL_TIMEOUT=10
- PENDING_TIMEOUT=15
- CLEANER_PERIOD=3
- PARTITIONS_COUNT=100
- SERVER_THREAD_POOL_SIZE=100
volumes:
- datanode_3_vol:/var/lib/turtlemq/data/
deploy:
resources:
limits:
cpus: '0.3'
memory: 400M
volumes:
prom_data:
driver: local
grafana_data:
driver: local
datanode_0_vol:
driver: local
datanode_1_vol:
driver: local
datanode_2_vol:
driver: local
datanode_3_vol:
driver: local