-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
87 lines (81 loc) · 1.88 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
# docker-spark-1 acts as a Spark Master
# Spark Master Web UI on port 9090
version: '2'
services:
docker-spark-1:
image: kduda/spark:latest
container_name: docker-spark-1
hostname: docker-spark-1
environment:
- SPARK_NODE_ROLE=master
- SPARK_MASTER_CORES=1
- SPARK_MASTER_MEMORY=1g
- SPARK_PUBLIC_DNS=localhost
volumes:
- data-1:/tmp
ports:
- 4040:4040
- 6066:6066
- 7077:7077
- 9090:8080
networks:
- spark-network
docker-spark-2:
image: kduda/spark:latest
container_name: docker-spark-2
environment:
- SPARK_NODE_ROLE=slave
- SPARK_MASTER_URL=docker-spark-1:7077
- SPARK_PUBLIC_DNS=localhost
- SPARK_WORKER_CORES=1
- SPARK_WORKER_MEMORY=1g
volumes:
- data-2:/tmp
links:
- docker-spark-1
ports:
- 8081:8081
networks:
- spark-network
docker-zeppelin:
image: kduda/zeppelin:latest
container_name: docker-zeppelin
#volumes:
# - /Projects/spark-zeppelin-tutorial/logs:/opt/zeppelin/logs
# - /Projects/spark-zeppelin-tutorial/notebook:/opt/zeppelin/notebook
links:
- docker-spark-1
ports:
- 9080:8080
- 9443:8443
networks:
- spark-network
mysql:
container_name: mysql
image: mysql:8.0.12
restart: always
command: --default-authentication-plugin=mysql_native_password
expose:
- "3306" #for service mysql-proxy
ports:
- "3307:3306" #for external connection
volumes:
- mysql-data:/var/lib/mysql #mysql-data
environment:
TZ: Asia/Shanghai
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: database
MYSQL_USER: root
MYSQL_PASSWORD: root
networks:
- spark-network
volumes:
data-1:
driver: local
data-2:
driver: local
mysql-data:
driver: local
networks:
spark-network:
driver: bridge