-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
288 lines (275 loc) · 6.63 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
version: '3'
services:
redis:
image: redis:alpine
container_name: redis
command: redis-server --requirepass ${REDIS_PASSWORD}
environment:
- REDIS_REPLICATION_MODE=master
networks:
lab-network:
ipv4_address: 172.23.0.20
volumes:
- redis-data:/var/lib/redis
- ${PWD}/redis/redis.conf:/usr/local/etc/redis/redis.conf
postgres:
image: postgres
container_name: postgres
environment:
- POSTGRES_USER=lab
- POSTGRES_PASSWORD=lab
- POSTGRES_DB=lab
networks:
lab-network:
ipv4_address: 172.23.0.30
volumes:
- postgres-data:/var/lib/postgresql/data
- postgres-initdbd:/docker-entrypoint-initdb.d
zookeeper:
image: bitnami/zookeeper:latest
container_name: zookeeper
hostname: zookeeper
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
- ZOO_AUTOPURGE_INTERVAL=1
networks:
lab-network:
ipv4_address: 172.23.0.10
kafka:
image: bitnami/kafka:latest
container_name: kafka01
environment:
- KAFKA_BROKER_ID=1
- KAFKA_LISTENERS=PLAINTEXT://:9092
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true
volumes:
- kafka-data:/bitnami
networks:
lab-network:
ipv4_address: 172.23.0.50
depends_on:
- zookeeper
clickhouse01:
image: yandex/clickhouse-server:${CLICKHOUSE_VER}
container_name: clickhouse01
hostname: clickhouse01
networks:
lab-network:
ipv4_address: 172.23.0.11
ports:
- "127.0.0.1:8123:8123"
- "127.0.0.1:9000:9000"
ulimits:
nproc: 65535
nofile:
soft: 262144
hard: 262144
volumes:
- clickhouse01-data:/var/lib/clickhouse
- clickhouse01-config:/etc/clickhouse-server
depends_on:
- zookeeper
- minios3
clickhouse02:
image: yandex/clickhouse-server:${CLICKHOUSE_VER}
container_name: clickhouse02
hostname: clickhouse02
networks:
lab-network:
ipv4_address: 172.23.0.12
ulimits:
nproc: 65535
nofile:
soft: 262144
hard: 262144
volumes:
- clickhouse02-data:/var/lib/clickhouse
- clickhouse02-config:/etc/clickhouse-server
depends_on:
- zookeeper
- minios3
clickhouse03:
image: yandex/clickhouse-server:${CLICKHOUSE_VER}
container_name: clickhouse03
hostname: clickhouse03
networks:
lab-network:
ipv4_address: 172.23.0.13
ulimits:
nproc: 65535
nofile:
soft: 262144
hard: 262144
volumes:
- clickhouse03-data:/var/lib/clickhouse
- clickhouse03-config:/etc/clickhouse-server
depends_on:
- zookeeper
- minios3
clickhouse04:
image: yandex/clickhouse-server:${CLICKHOUSE_VER}
container_name: clickhouse04
hostname: clickhouse04
networks:
lab-network:
ipv4_address: 172.23.0.14
ulimits:
nproc: 65535
nofile:
soft: 262144
hard: 262144
volumes:
- clickhouse04-data:/var/lib/clickhouse
- clickhouse04-config:/etc/clickhouse-server
depends_on:
- zookeeper
- minios3
airflow-scheduler:
image: apache/airflow
container_name: airflow-scheduler
entrypoint: ./scripts/scheduler/entrypoint.sh
restart: on-failure
depends_on:
- postgres
environment:
- AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres/airflow
- AIRFLOW__CORE__EXECUTOR=LocalExecutor
networks:
lab-network:
ipv4_address: 172.23.0.60
volumes:
- airflow-dags:/opt/airflow/dags
- airflow-logs:/opt/airflow/logs
- airflow-scripts:/opt/airflow/scripts
airflow-webserver:
image: apache/airflow
container_name: airflow-webserver
entrypoint: ./scripts/webserver/entrypoint.sh
restart: on-failure
depends_on:
- postgres
- airflow-scheduler
environment:
- AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres/airflow
- AIRFLOW__CORE__EXECUTOR=LocalExecutor
networks:
lab-network:
ipv4_address: 172.23.0.61
volumes:
- airflow-dags:/opt/airflow/dags
- airflow-logs:/opt/airflow/logs
- airflow-scripts:/opt/airflow/scripts
minios3:
image: minio/minio
container_name: minios3
user: "1000:1000"
command: minio server /data
volumes:
- minio-data:/data
environment:
MINIO_ACCESS_KEY: lab
MINIO_SECRET_KEY: lab12345
networks:
lab-network:
ipv4_address: 172.23.0.90
sshnode:
build:
context: ./ssh_node
args:
SSH_PASS: ${SSH_PASS}
SSH_NODE_INSTALL: ${SSH_NODE_INSTALL}
image: jumpbox:latest
container_name: jumpbox
hostname: jumpbox
restart: always
volumes:
- ${PWD}/ssh_node/sshd_config:/etc/ssh/sshd_config
- jumpbox-home:/home/${SSH_USER}
ports:
- "0.0.0.0:${HOST_SSH_PORT}:22"
networks:
lab-network:
ipv4_address: 172.23.0.40
networks:
lab-network:
ipam:
config:
- subnet: 172.23.0.0/24
volumes:
minio-data:
driver: local
driver_opts:
o: bind
type: none
device: ${PWD}/minio-data
postgres-data:
driver: local
postgres-initdbd:
driver: local
driver_opts:
o: bind
type: none
device: ${PWD}/postgres_initdb.d
redis-data:
driver: local
kafka-data:
driver: local
clickhouse01-data:
driver: local
clickhouse02-data:
driver: local
clickhouse03-data:
driver: local
clickhouse04-data:
driver: local
jumpbox-home:
driver: local
driver_opts:
o: bind
type: none
device: ${PWD}/jumpbox_home
clickhouse01-config:
driver: local
driver_opts:
o: bind
type: none
device: ${PWD}/config/clickhouse01
clickhouse02-config:
driver: local
driver_opts:
o: bind
type: none
device: ${PWD}/config/clickhouse02
clickhouse03-config:
driver: local
driver_opts:
o: bind
type: none
device: ${PWD}/config/clickhouse03
clickhouse04-config:
driver: local
driver_opts:
o: bind
type: none
device: ${PWD}/config/clickhouse04
airflow-dags:
driver: local
driver_opts:
o: bind
type: none
device: ${PWD}/airflow-dags
airflow-scripts:
driver: local
driver_opts:
o: bind
type: none
device: ${PWD}/airflow-scripts
airflow-logs:
driver: local
driver_opts:
o: bind
type: none
device: ${PWD}/airflow-logs