forked from gettyimages/docker-spark
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
120 lines (114 loc) · 3.21 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
version: "3"
services:
master:
image: sauloricci/docker-spark-master
command: bin/spark-class org.apache.spark.deploy.master.Master -h master
hostname: master
deploy:
mode: global
placement:
constraints:
- node.labels.type == master
- node.labels.spark == true
environment:
MASTER: spark://master:7077
SPARK_PUBLIC_DNS: $EXTERNAL_IP
expose:
- 7001
- 7002
- 7003
- 7004
- 7005
- 7006
- 7077
- 6066
- 8080
- 4040
- 5005
ports:
- 5005:5005
volumes:
- /mnt/spark_data:/data
- /data1:/data1
- /data2:/data2
- /data3:/data3
- /data4:/data4
extra_hosts:
- "kafka1:13.65.242.208"
- "zk1:13.65.242.208"
- "kafka2:13.84.50.174"
- "zk2:13.84.50.174"
- "kafka3:104.210.144.204"
- "zk3:104.210.144.204"
worker:
image: sauloricci/docker-spark-worker
command: bin/spark-class org.apache.spark.deploy.worker.Worker spark://master:7077
hostname: worker
deploy:
mode: global
placement:
constraints:
- node.labels.type == worker
- node.labels.spark == true
environment:
SPARK_WORKER_PORT: 8881
SPARK_WORKER_WEBUI_PORT: 8081
SPARK_PUBLIC_DNS: $EXTERNAL_IP
links:
- master
expose:
- 7012
- 7013
- 7014
- 7015
- 7016
- 8881
volumes:
- /data1:/data1
- /data2:/data2
- /data3:/data3
- /data4:/data4
extra_hosts:
- "kafka1:13.65.242.208"
- "zk1:13.65.242.208"
- "kafka2:13.84.50.174"
- "zk2:13.84.50.174"
- "kafka3:104.210.144.204"
- "zk3:104.210.144.204"
notebook:
image: sauloricci/all-spark-notebook
command: start-notebook.sh --NotebookApp.token='' --NotebookApp.ip='notebook' --NotebookApp.allow_origin='*'
hostname: notebook
deploy:
placement:
constraints:
- node.labels.type == master
- node.labels.spark == true
environment:
TINI_SUBREAPER: "true"
GRANT_SUDO: "yes"
SPARK_PUBLIC_DNS: $EXTERNAL_IP
SPARK_OPTS: "--master=spark://master:7077"
links:
- master
expose:
- 8888
pid: "host"
volumes:
- /notebook:/home/jovyan/work
proxy:
image: sauloricci/docker_spark_proxy
hostname: proxy
deploy:
placement:
constraints:
- node.labels.type == master
- node.labels.spark == true
links:
- master
- notebook
ports:
- 666:666
- 667:667
- 4040:4040
- 4041:4041