-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
94 lines (93 loc) · 2.17 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
networks:
spark-cluster:
name: spark-cluster
driver: bridge
services:
jupyterlab:
image: jupyterlab:latest
container_name: jupyterlab
ports:
- 8888:8888
networks:
- spark-cluster
links:
- minio
- spark-master
volumes:
- ./workspace/:/opt/workspace/
depends_on:
- minio
- spark-master
minio:
image: quay.io/minio/minio:LATEST
container_name: minio
command: server /data --console-address ":9001"
environment:
- MINIO_ROOT_USER=minio
- MINIO_ROOT_PASSWORD=minio123
- MINIO_SERVER_URL=http://minio:9000
healthcheck:
test:
[
"CMD",
"curl",
"-f",
"http://minio:9000/minio/health/live"
]
interval: 30s
timeout: 20s
retries: 3
ports:
- 9000:9000
- 9001:9001
networks:
- spark-cluster
volumes:
- ./minio_data:/data
minio-init:
image: quay.io/minio/mc:LATEST
container_name: minio-init
entrypoint: >
/bin/sh -c "mc config host add minio http://minio:9000 minio minio123; mc mb minio/lake; mc mb minio/incoming"
networks:
- spark-cluster
depends_on:
- minio
spark-master:
image: spark-master:latest
container_name: spark-master
environment:
- SPARK_WORKLOAD=master
ports:
- 8080:8080
- 7077:7077
networks:
- spark-cluster
links:
- minio
volumes:
- ./spark-conf/spark-defaults.conf:/opt/spark/conf/spark-defaults.conf
- ./hadoop-conf/core-site.xml:/opt/spark/etc/hadoop/core-site.xml
spark-workers:
image: spark-worker:latest
deploy:
replicas: 1
restart_policy:
condition: on-failure
environment:
- SPARK_MASTER=spark://spark-master:7077
- SPARK_WORKLOAD=worker
- SPARK_WORKER_CORES=1
- SPARK_WORKER_MEMORY=2G
ports:
- 9091-9099:8080
- 7000-7009:7000
networks:
- spark-cluster
links:
- minio
volumes:
- ./spark-conf/spark-defaults.conf:/opt/spark/conf/spark-defaults.conf
- ./hadoop-conf/core-site.xml:/opt/spark/etc/hadoop/core-site.xml
depends_on:
- spark-master