-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
354 lines (335 loc) · 8.26 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
version: '2.1'
services:
######################################################
# DATABASE SERVICE
######################################################
postgres:
build: './docker/postgres'
restart: always
container_name: postgres
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
ports:
- 32769:5432
#volumes:
#- ./mnt/postgres:/var/lib/postgresql/data/pgdata
environment:
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow_db
#- PGDATA=/var/lib/postgresql/data/pgdata
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "airflow_db", "-U", "airflow" ]
timeout: 45s
interval: 10s
retries: 10
networks:
- bigdata-network
adminer:
image: wodby/adminer:latest
restart: always
container_name: adminer
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
ports:
- 32767:9000
environment:
- ADMINER_DEFAULT_DB_DRIVER=psql
- ADMINER_DEFAULT_DB_HOST=postgres
- ADMINER_DEFAULT_DB_NAME=airflow_db
healthcheck:
test: [ "CMD", "nc", "-z", "adminer", "9000" ]
timeout: 45s
interval: 10s
retries: 10
networks:
- bigdata-network
######################################################
# HADOOP SERVICES
######################################################
namenode:
build: ./docker/hadoop/hadoop-namenode
restart: always
container_name: namenode
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
ports:
- 32763:9870
volumes:
- ./mnt/hadoop/namenode:/hadoop/dfs/name
environment:
- CLUSTER_NAME=hadoop_cluster
healthcheck:
test: [ "CMD", "nc", "-z", "namenode", "9870" ]
timeout: 45s
interval: 10s
retries: 10
networks:
- bigdata-network
datanode:
build: ./docker/hadoop/hadoop-datanode
restart: always
container_name: datanode
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
depends_on:
- namenode
volumes:
- ./mnt/hadoop/datanode:/hadoop/dfs/data
environment:
- SERVICE_PRECONDITION=namenode:9870
healthcheck:
test: [ "CMD", "nc", "-z", "datanode", "9864" ]
timeout: 45s
interval: 10s
retries: 10
networks:
- bigdata-network
hive-metastore:
build: ./docker/hive/hive-metastore
restart: always
container_name: hive-metastore
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
depends_on:
- namenode
- datanode
- postgres
environment:
- SERVICE_PRECONDITION=namenode:9870 datanode:9864 postgres:5432
ports:
- 32761:9083
healthcheck:
test: [ "CMD", "nc", "-z", "hive-metastore", "9083" ]
timeout: 45s
interval: 10s
retries: 10
networks:
- bigdata-network
hive-server:
build: ./docker/hive/hive-server
restart: always
container_name: hive-server
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
depends_on:
- hive-metastore
environment:
- SERVICE_PRECONDITION=hive-metastore:9083
ports:
- 32760:10000
- 32759:10002
healthcheck:
test: [ "CMD", "nc", "-z", "hive-server", "10002" ]
timeout: 45s
interval: 10s
retries: 10
networks:
- bigdata-network
hive-webhcat:
build: ./docker/hive/hive-webhcat
restart: always
container_name: hive-webhcat
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
depends_on:
- hive-server
environment:
- SERVICE_PRECONDITION=hive-server:10000
healthcheck:
test: [ "CMD", "nc", "-z", "hive-webhcat", "50111" ]
timeout: 45s
interval: 10s
retries: 10
networks:
- bigdata-network
hue:
build: ./docker/hue
restart: always
container_name: hue
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
depends_on:
- hive-server
- postgres
ports:
- 32762:8888
volumes:
- ./mnt/hue/hue.ini:/usr/share/hue/desktop/conf/z-hue.ini
environment:
- SERVICE_PRECONDITION=hive-server:10000 postgres:5432
healthcheck:
test: [ "CMD", "nc", "-z", "hue", "8888" ]
timeout: 45s
interval: 10s
retries: 10
networks:
- bigdata-network
######################################################
# SPARK SERVICES
######################################################
spark-master:
build: ./docker/spark/spark-master
restart: always
container_name: spark-master
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
ports:
- 32766:8082
- 32765:7077
volumes:
- ./mnt/spark/apps:/opt/spark-apps
- ./mnt/spark/data:/opt/spark-data
healthcheck:
test: [ "CMD", "nc", "-z", "spark-master", "8082" ]
timeout: 45s
interval: 10s
retries: 10
networks:
- bigdata-network
spark-worker:
build: ./docker/spark/spark-worker
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
depends_on:
- spark-master
ports:
- 32764:8081
volumes:
- ./mnt/spark/apps:/opt/spark-apps
- ./mnt/spark/data:/opt/spark-data
healthcheck:
test: [ "CMD", "nc", "-z", "spark-worker", "8081" ]
timeout: 45s
interval: 10s
retries: 10
networks:
- bigdata-network
livy:
build: ./docker/livy
restart: always
container_name: livy
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
depends_on:
- spark-worker
ports:
- 32758:8998
environment:
- SPARK_MASTER_ENDPOINT=spark-master
- SPARK_MASTER_PORT=7077
- DEPLOY_MODE=client
healthcheck:
test: [ "CMD", "nc", "-z", "livy", "8998" ]
timeout: 45s
interval: 10s
retries: 10
networks:
- bigdata-network
######################################################
# AIRFLOW
######################################################
airflow:
build: ./docker/airflow
restart: always
container_name: airflow
volumes:
- ./mnt/airflow/airflow.cfg:/opt/airflow/airflow.cfg
- ./mnt/airflow/dags:/opt/airflow/dags
ports:
- 8080:8080
healthcheck:
test: [ "CMD", "nc", "-z", "airflow", "8080" ]
timeout: 45s
interval: 10s
retries: 10
networks:
- bigdata-network
######################################################
# KAFKA
######################################################
kafka-bigdata:
image: docker.io/bitnami/kafka:3.6
restart: always
container_name: kafka-bigdata
ports:
- 9092:9092
- 9093:9093
environment:
- KAFKA_CFG_NODE_ID=0
- KAFKA_CFG_PROCESS_ROLES=controller,broker
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@kafka:9093
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
networks:
- bigdata-network
######################################################
# FLINK SERVICES
######################################################
jobmanager:
image: flink:latest
restart: always
container_name: jobmanager
ports:
- 8081:8081
command: jobmanager
environment:
- |
FLINK_PROPERTIES=
jobmanager.rpc.address: jobmanager
networks:
- bigdata-network
taskmanager:
image: flink:latest
restart: always
container_name: taskmanager
depends_on:
- jobmanager
command: taskmanager
environment:
- |
FLINK_PROPERTIES=
jobmanager.rpc.address: jobmanager
taskmanager.numberOfTaskSlots: 2
networks:
- bigdata-network
######################################################
# NETWORK
######################################################
networks:
bigdata-network:
external: true