forked from mvillarrealb/docker-spark-cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
75 lines (75 loc) · 1.78 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
version: "3.7"
services:
spark-master:
image: spark-master:2.3.1
container_name: spark-master
hostname: spark-master
ports:
- "8080:8080"
- "7077:7077"
networks:
spark-network:
ipv4_address: 10.5.0.2
volumes:
- /mnt/spark-apps:/opt/spark-apps
- /mnt/spark-data:/opt/spark-data
environment:
- "SPARK_LOCAL_IP=spark-master"
spark-worker-1:
image: spark-worker:2.3.1
container_name: spark-worker-1
hostname: spark-worker-1
depends_on:
- spark-master
ports:
- "8081:8081"
env_file: ./env/spark-worker.sh
environment:
- "SPARK_LOCAL_IP=spark-worker-1"
networks:
spark-network:
ipv4_address: 10.5.0.3
volumes:
- /mnt/spark-apps:/opt/spark-apps
- /mnt/spark-data:/opt/spark-data
spark-worker-2:
image: spark-worker:2.3.1
container_name: spark-worker-2
hostname: spark-worker-2
depends_on:
- spark-master
ports:
- "8082:8081"
env_file: ./env/spark-worker.sh
environment:
- "SPARK_LOCAL_IP=spark-worker-2"
networks:
spark-network:
ipv4_address: 10.5.0.4
volumes:
- /mnt/spark-apps:/opt/spark-apps
- /mnt/spark-data:/opt/spark-data
spark-worker-3:
image: spark-worker:2.3.1
container_name: spark-worker-3
hostname: spark-worker-3
depends_on:
- spark-master
ports:
- "8083:8081"
env_file: ./env/spark-worker.sh
environment:
- "SPARK_LOCAL_IP=spark-worker-3"
networks:
spark-network:
ipv4_address: 10.5.0.5
volumes:
- /mnt/spark-apps:/opt/spark-apps
- /mnt/spark-data:/opt/spark-data
networks:
spark-network:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.5.0.0/16