-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
243 lines (228 loc) · 6.68 KB
/
docker-compose.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
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
version: "2.4"
# docker-compose up --build
# docker-compose rm -v to delete everything and starting it up again.
services:
mysql:
build: ./mysql
image: druid-mysql:latest
container_name: druid-mysql
# restart: unless-stopped
networks:
- druid-net
ports:
- "3306:3306"
environment:
- MYSQL_USER=${MYSQL_USER_NAME}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
s3-minio:
image: minio/minio:latest
container_name: s3-minio
hostname: s3minio
# restart: unless-stopped
networks:
- druid-net
ports:
- "9000:9000"
command: server /data
environment:
- MINIO_ACCESS_KEY=${S3_ACCESS_KEY}
- MINIO_SECRET_KEY=${S3_SECRET_KEY}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
# once s3 minio is started client creates bucket with the same name as configured in druid.storage.bucket
minio-client:
image: minio/mc:latest
container_name: minio-client
networks:
- druid-net
depends_on:
s3-minio:
condition: service_healthy
env_file:
- common_env_config
entrypoint: >
sh -c "mc config host add minio http://s3-minio:9000 ${S3_ACCESS_KEY} ${S3_SECRET_KEY} && mc mb minio/$$S3_STORAGE_BUKCET"
# Exhibitor is a Java supervisor system for ZooKeeper.
# https://github.com/soabase/exhibitor/wiki
zookeeper:
image: zookeeper:latest
container_name: druid-zookeeper
# restart: unless-stopped
networks:
- druid-net
ports:
- 2181:2181
environment:
- ZOO_MY_ID=1
zoonavigator-web:
image: elkozmon/zoonavigator-web:latest
container_name: zoonavigator-web
ports:
- "8000:8000"
# restart: unless-stopped
networks:
- druid-net
environment:
WEB_HTTP_PORT: 8000
API_HOST: zoonavigator-api
API_PORT: 9000
depends_on:
- zoonavigator-api
zoonavigator-api:
image: elkozmon/zoonavigator-api:latest
container_name: zoonavigator-api
restart: unless-stopped
networks:
- druid-net
environment:
- API_HTTP_PORT=9000
# ==== Setup Druid ====
coordinator:
build: ./druid
image: druid-coordinator:latest
container_name: druid-coordinator
hostname: coordinator
networks:
- druid-net
depends_on:
- mysql
- zookeeper
- s3-minio
ports:
- "8081:8081"
env_file:
- common_env_config
environment:
- DRUID_SERVICE=coordinator
- DRUID_JVM_ARGS=-server -Xms256m -Xmx256m -Duser.timezone=UTC -Dfile.encoding=UTF-8 -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
- S3_SECRET_KEY=${S3_SECRET_KEY}
- METADATA_STORAGE_USER=${MYSQL_USER_NAME}
- METADATA_STORAGE_PASSWORD=${MYSQL_PASSWORD}
broker:
build: ./druid
image: druid-broker:latest
container_name: druid-broker
hostname: broker
networks:
- druid-net
depends_on:
- mysql
- zookeeper
- s3-minio
- coordinator
ports:
- "8082:8082"
# 2.2gb
mem_limit: "2.2g"
mem_reservation: 500m
env_file:
- common_env_config
environment:
- DRUID_SERVICE=broker
- DRUID_JVM_ARGS=-server -Xms2g -Xmx2g -Duser.timezone=UTC -Dfile.encoding=UTF-8 -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager -XX:MaxDirectMemorySize=1g -XX:+UseG1GC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Dcom.sun.management.jmxremote.port=17071 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
- S3_SECRET_KEY=${S3_SECRET_KEY}
- METADATA_STORAGE_USER=${MYSQL_USER_NAME}
- METADATA_STORAGE_PASSWORD=${MYSQL_PASSWORD}
historical:
build: ./druid
image: druid-historical:latest
container_name: druid-historical
hostname: historical
networks:
- druid-net
ports:
- "8083:8083"
depends_on:
- mysql
- zookeeper
- s3-minio
- coordinator
# 2.2gb
mem_limit: "2.2g"
mem_reservation: 200m
env_file:
- common_env_config
environment:
- DRUID_SERVICE=historical
- DRUID_JVM_ARGS=-server -Xms1g -Xmx1g -XX:MaxDirectMemorySize=1g -Duser.timezone=UTC -Dfile.encoding=UTF-8 -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager -XX:+UseConcMarkSweepGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
- S3_SECRET_KEY=${S3_SECRET_KEY}
- METADATA_STORAGE_USER=${MYSQL_USER_NAME}
- METADATA_STORAGE_PASSWORD=${MYSQL_PASSWORD}
overlord:
build: ./druid
image: druid-overlord:latest
container_name: druid-overlord
hostname: overlord
networks:
- druid-net
ports:
- "8090:8090"
depends_on:
- mysql
- zookeeper
- s3-minio
- coordinator
env_file:
- common_env_config
environment:
- DRUID_SERVICE=overlord
- DRUID_JVM_ARGS=-server -Xms256m -Xmx256m -Duser.timezone=UTC -Dfile.encoding=UTF-8 -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
- S3_SECRET_KEY=${S3_SECRET_KEY}
- METADATA_STORAGE_USER=${MYSQL_USER_NAME}
- METADATA_STORAGE_PASSWORD=${MYSQL_PASSWORD}
middlemanager:
build: ./druid
image: druid-middlemanager:latest
container_name: druid-middlemanager
hostname: middlemanager
networks:
- druid-net
ports:
- "8091:8091"
depends_on:
- mysql
- zookeeper
- s3-minio
- coordinator
env_file:
- common_env_config
environment:
- DRUID_SERVICE=middleManager
- DRUID_JVM_ARGS=-server -Xms64m -Xmx64m -Duser.timezone=UTC -Dfile.encoding=UTF-8 -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
- S3_SECRET_KEY=${S3_SECRET_KEY}
- METADATA_STORAGE_USER=${MYSQL_USER_NAME}
- METADATA_STORAGE_PASSWORD=${MYSQL_PASSWORD}
router:
build: ./druid
image: druid-router:latest
container_name: druid-router
hostname: router
networks:
- druid-net
ports:
- "8080:8080"
depends_on:
- mysql
- zookeeper
- s3-minio
- coordinator
- broker
env_file:
- common_env_config
environment:
- DRUID_SERVICE=router
- DRUID_JVM_ARGS=-server -Xms2g -Xmx2g -Duser.timezone=UTC -Dfile.encoding=UTF-8 -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
- S3_SECRET_KEY=${S3_SECRET_KEY}
networks:
druid-net:
driver: bridge