forked from paypay/DataEngineerChallenge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
96 lines (92 loc) · 2.44 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
version: "2"
services:
spark-master:
image: spark-base:latest
entrypoint:
- '/spark/sbin/start-master.sh'
ports:
- "8080:8080"
- "7077:7077"
- "6066:6066"
environment:
- SPARK_LOCAL_IP=spark-master
- SPARK_MASTER_IP=spark-master
- SPARK_MASTER_PORT=7077
- SPARK_MASTER_WEBUI_PORT=8080
- SPARK_MASTER_LOG=/spark/logs
- SPARK_NO_DAEMONIZE=true
- SPARK_HOME=/spark
volumes:
- app-volume:/target/scala-2.12
- ./data:/data
- ./logs:/spark/logs
spark-worker-1:
image: spark-base:latest
entrypoint:
- '/spark/sbin/start-slave.sh'
- 'spark://spark-master:7077'
depends_on:
- spark-master
ports:
- "8081:8081"
environment:
- SPARK_MASTER=spark://spark-master:7077
- SPARK_WORKER_CORES=1
- SPARK_WORKER_MEMORY=3G
- SPARK_DRIVER_MEMORY=2G
- SPARK_WORKER_WEBUI_PORT=8081
- SPARK_WORKER_LOG=/spark/logs
- SPARK_LOCAL_IP=spark-worker-1
- SPARK_MASTER_IP=spark-master
- SPARK_NO_DAEMONIZE=true
- SPARK_HOME=/spark
volumes:
- app-volume:/target/scala-2.12
- ./data:/data
- ./logs:/spark/logs
spark-worker-2:
image: spark-base:latest
depends_on:
- spark-master
entrypoint:
- '/spark/sbin/start-slave.sh'
- 'spark://spark-master:7077'
ports:
- "8082:8082"
environment:
- SPARK_MASTER=spark://spark-master:7077
- SPARK_WORKER_CORES=1
- SPARK_WORKER_MEMORY=3G
- SPARK_DRIVER_MEMORY=2G
- SPARK_WORKER_WEBUI_PORT=8082
- SPARK_WORKER_LOG=/spark/logs
- SPARK_LOCAL_IP=spark-worker-2
- SPARK_MASTER_IP=spark-master
- SPARK_NO_DAEMONIZE=true
- SPARK_HOME=/spark
volumes:
- app-volume:/target/scala-2.12
- ./data:/data
- ./logs:/spark/logs
spark-submit:
image: spark-base:latest
depends_on:
- spark-master
- spark-worker-1
- spark-worker-2
environment:
- SPARK_APPLICATION_MAIN_CLASS=DataChallenge
- SPARK_MASTER=spark://spark-master:7077
- SPARK_MASTER_IP=spark-master
- SPARK_SUBMIT_ARGS=
- SPARK_APPLICATION_JAR_LOCATION=/target/scala-2.12/data-challenge_2.12-1.0.jar
- SPARK_APPLICATION_ARGS=
- SPARK_NO_DAEMONIZE=true
- SPARK_HOME=/spark
volumes:
- app-volume:/target/scala-2.12
- ./data:/data
- ./logs:/spark/logs
volumes:
app-volume:
# data: