-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
388 lines (359 loc) · 9.21 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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
version: "3.7"
volumes:
# Monitoring
prometheus_data: {}
grafana_data: {}
# Druid
metadata_data: {}
druid_middle_var: {}
historical_var: {}
druid_broker_var: {}
druid_coordinator_var: {}
druid_router_var: {}
# Superset
superset_home:
superset_node_modules:
superset_db:
redis:
# JuoyteHub
jupyterhub-data:
jupyterhub-db:
# Superset
x-superset-build: &superset-build
args:
NPM_BUILD_CMD: build-dev
context: ./
dockerfile: Dockerfile
target: dev
x-superset-volumes: &superset-volumes
# /app/pythonpath_docker will be appended to the PYTHONPATH in the final container
- ./incubator-superset/docker/docker-init.sh:/app/docker-init.sh
- ./incubator-superset/docker/pythonpath_dev:/app/pythonpath
- ./incubator-superset/superset:/app/superset
- ./incubator-superset/superset-frontend:/app/superset-frontend
- superset_node_modules:/app/superset-frontend/superset_node_modules
- superset_home:/app/superset_home
networks:
monitor-net:
services:
# Monitoring
prometheus:
image: prom/prometheus:v2.17.2
container_name: prometheus
volumes:
- ./prometheus:/etc/prometheus
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--storage.tsdb.retention.time=200h'
- '--web.enable-lifecycle'
restart: unless-stopped
ports:
- "9090:9090"
networks:
- monitor-net
nodeexporter:
image: prom/node-exporter:v0.18.1
container_name: nodeexporter
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)'
restart: unless-stopped
networks:
- monitor-net
cadvisor:
image: gcr.io/google-containers/cadvisor:v0.36.0
container_name: cadvisor
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker:/var/lib/docker:ro
#- /cgroup:/cgroup:ro #doesn't work on MacOS only for Linux
restart: unless-stopped
privileged: true
networks:
- monitor-net
grafana:
image: grafana/grafana:6.7.3
container_name: grafana
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
restart: unless-stopped
ports:
- "3000:3000"
networks:
- monitor-net
pushgateway:
image: prom/pushgateway:v1.2.0
container_name: pushgateway
restart: unless-stopped
networks:
- monitor-net
# Zookeeper
zookeeper:
container_name: zookeeper
image: zookeeper:3.6
environment:
- ZOO_MY_ID=1
# Druid
druid_postgres:
container_name: druid_postgres
image: postgres:10
volumes:
- metadata_data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=FoolishPassword
- POSTGRES_USER=druid
- POSTGRES_DB=druid
druid_coordinator:
image: apache/druid:0.17.0
container_name: druid_coordinator
volumes:
- ./storage:/opt/data
- druid_coordinator_var:/opt/druid/var
depends_on:
- zookeeper
- druid_postgres
ports:
- "8081:8081"
command:
- coordinator
env_file:
- druid.env
druid_broker:
image: apache/druid:0.17.0
container_name: druid_broker
volumes:
- druid_broker_var:/opt/druid/var
depends_on:
- zookeeper
- druid_postgres
- druid_coordinator
ports:
- "8082:8082"
command:
- broker
env_file:
- druid.env
druid_historical:
image: apache/druid:0.17.0
container_name: druid_historical
volumes:
- ./storage:/opt/data
- historical_var:/opt/druid/var
depends_on:
- zookeeper
- druid_postgres
- druid_coordinator
ports:
- "8083:8083"
command:
- historical
env_file:
- druid.env
druid_middlemanager:
image: apache/druid:0.17.0
container_name: druid_middlemanager
volumes:
- ./storage:/opt/data
- druid_middle_var:/opt/druid/var
depends_on:
- zookeeper
- druid_postgres
- druid_coordinator
ports:
- "8091:8091"
command:
- middleManager
env_file:
- druid.env
druid_router:
image: apache/druid:0.17.0
container_name: druid_router
volumes:
- druid_router_var:/opt/druid/var
depends_on:
- zookeeper
- druid_postgres
- druid_coordinator
ports:
- "8888:8888"
command:
- router
env_file:
- druid.env
# Kafka
kafka:
image: wurstmeister/kafka:2.12-2.4.1
container_name: kafka
ports:
- "9092:9092"
environment:
# KAFKA_ADVERTISED_HOST_NAME: 192.168.99.100
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- zookeeper
- druid_broker
- druid_coordinator
# NiFi
# Add https://github.com/hortonworks-gallery/nifi-templates
nifi:
image: apache/nifi:1.11.4
ports:
- 2000
environment:
- NIFI_WEB_HTTP_PORT=2000
- NIFI_CLUSTER_IS_NODE=true
- NIFI_CLUSTER_NODE_PROTOCOL_PORT=8082
- NIFI_ZK_CONNECT_STRING=zookeeper:2181
- NIFI_ELECTION_MAX_WAIT=1 min
depends_on:
- zookeeper
- druid_broker
- druid_coordinator
# Superset
redis:
image: redis:3.2
container_name: superset_cache
restart: unless-stopped
volumes:
- redis:/data
depends_on:
- druid_broker
superset_db:
env_file: superset.env
image: postgres:10
container_name: superset_db
restart: unless-stopped
volumes:
- superset_db:/var/lib/postgresql/data
depends_on:
- druid_broker
superset:
env_file: superset.env
build: *superset-build
container_name: superset_app
command: ["flask", "run", "-p", "8088", "--with-threads", "--reload", "--debugger", "--host=0.0.0.0"]
restart: unless-stopped
ports:
- 8088:8088
depends_on:
- superset_db
- redis
- druid_broker
volumes: *superset-volumes
superset-init:
build: *superset-build
container_name: superset_init
command: ["/app/docker-init.sh"]
env_file: superset.env
depends_on:
- superset_db
- redis
- druid_broker
volumes: *superset-volumes
superset-node:
image: node:10-jessie
container_name: superset_node
command: ["bash", "-c", "cd /app/superset-frontend && npm install --global webpack webpack-cli && npm install && npm run dev"]
env_file: superset.env
depends_on:
- superset_db
- redis
- druid_broker
volumes: *superset-volumes
superset-worker:
build: *superset-build
container_name: superset_worker
command: ["celery", "worker", "--app=superset.tasks.celery_app:app", "-Ofair"]
env_file: superset.env
restart: unless-stopped
depends_on:
- superset_db
- redis
- druid_broker
volumes: *superset-volumes
# Zeppelin
# namenode:
# image: bde2020/hadoop-namenode:1.1.0-hadoop2.8-java8
# container_name: namenode
# restart: unless-stopped
# volumes:
# - ./data/namenode:/hadoop/dfs/name
# environment:
# - CLUSTER_NAME=test
# - CORE_CONF_fs_defaultFS=hdfs://namenode:8020
# datanode:
# image: bde2020/hadoop-datanode:1.1.0-hadoop2.8-java8
# container_name: datanode
# restart: unless-stopped
# volumes:
# - ./data/datanode:/hadoop/dfs/data
# environment:
# - CORE_CONF_fs_defaultFS=hdfs://namenode:8020
# depends_on:
# - namenode
# spark-master:
# image: bde2020/spark-master:2.1.0-hadoop2.8-hive-java8
# container_name: spark-master
# restart: unless-stopped
# # ports:
# # - "8080:8080"
# # - "7077:7077"
# environment:
# - CORE_CONF_fs_defaultFS=hdfs://namenode:8020
# depends_on:
# - namenode
# - datanode
# spark-worker:
# image: bde2020/spark-worker:2.1.0-hadoop2.8-hive-java8
# container_name: spark-worker
# restart: unless-stopped
# environment:
# - "SPARK_MASTER=spark://spark-master:7077"
# environment:
# - CORE_CONF_fs_defaultFS=hdfs://namenode:8020
# depends_on:
# - spark-master
zeppelin:
image: apache/zeppelin:0.9.0
container_name: zeppelin
restart: unless-stopped
ports:
- 3001:8080
volumes:
- ./zeppelin:/opt/zeppelin/notebook
# environment:
# CORE_CONF_fs_defaultFS: "hdfs://namenode:8020"
# SPARK_MASTER: "spark://spark-master:7077"
# MASTER: "spark://spark-master:7077"
# #SPARK_SUBMIT_OPTIONS: "--jars /opt/sansa-examples/jars/sansa-examples-spark-2016-12.jar"
# depends_on:
# - spark-master
# - namenode
# JupyterHub
jupyterhub:
image: jupyterhub/jupyterhub:1.2
restart: unless-stopped
container_name: jupyterhub
volumes:
- "./jupyterlab:/data"
ports:
- "3002:8000"