forked from vkorukanti/spark-docker-compose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
59 lines (56 loc) · 1.63 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
# Container that runs HDFS NameNode and DataNode services
hdfs-namenode:
image: hdfs-namenode
hostname: hdfs-namenode-host
ports:
# HDFS port
- "9000:9000"
# HDFS NameNode WebUI
- "50070:50070"
# Adjust according to the resources available on host machine
cpu_shares: 3000
mem_limit: 2g
# Container that runs HDFS DataNode service
hdfs-datanode:
image: hdfs-datanode
hostname: hdfs-datanode-host
links:
- hdfs-namenode
environment:
# NAMENODE_HOSTNAME is the hostname of the container running Namenode service
- NAMENODE_HOSTNAME=hdfs-namenode-host
# Adjust according to the resources available on host machine
cpu_shares: 3000
mem_limit: 2g
# Container that runs Spark Master and Worker services
spark-master:
image: spark-master
hostname: spark-master-host
links:
- hdfs-namenode
ports:
# Spark master WebUI port
- "8080:8080"
# Spark master job submission port
- "7077:7077"
environment:
# NAMENODE_HOSTNAME is the hostname of the container running Namenode service
- NAMENODE_HOSTNAME=hdfs-namenode-host
# Adjust according to the resources available on host machine
cpu_shares: 3000
mem_limit: 2g
# Container that runs Spark Worker service
spark-slave:
image: spark-slave
hostname: spark-slave-host
links:
- hdfs-namenode
- spark-master
environment:
# NAMENODE_HOSTNAME is the hostname of the container running Namenode service
- NAMENODE_HOSTNAME=hdfs-namenode-host
# MASTER_HOSTNAME is the hostname of the container running Spark master service
- MASTER_HOSTNAME=spark-master-host
# Adjust according to the resources available on host machine
cpu_shares: 3000
mem_limit: 2g