-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
113 lines (108 loc) · 4.16 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
version: "3.8"
services:
namenode-1:
container_name: ${NN_ACTIVE_NAME}
hostname: ${NN_ACTIVE_NAME}
image: hadoop-cluster:latest
ports:
- 18080:8080
- 50171:50071 # Namenode_Master WEB UI
- 19888:19888
volumes:
- ./config/core-site.xml:/home/hadoop/bin/hadoop/etc/hadoop/core-site.xml
- ./config/hdfs-site.xml:/home/hadoop/bin/hadoop/etc/hadoop/hdfs-site.xml
- ./config/yarn-site.xml:/home/hadoop/bin/hadoop/etc/hadoop/yarn-site.xml
- ./config/mapred-site.xml:/home/hadoop/bin/hadoop/etc/hadoop/mapred-site.xml
- ./config/hadoop-env.sh:/home/hadoop/bin/hadoop/etc/hadoop/hadoop-env.sh
- ./config/slaves:/home/hadoop/bin/hadoop/etc/hadoop/slaves
- ./config/zookeeper/zoo.cfg:/home/hadoop/bin/zookeeper/conf/zoo.cfg
networks:
hadoop-network:
ipv4_address: 172.72.0.2
extra_hosts:
- "nn-active:172.72.0.2"
- "nn-standby:172.72.0.3"
- "dn-1:172.72.0.4"
- "dn-2:172.72.0.5"
- "dn-3:172.72.0.6"
tty: true
namenode-2:
container_name: ${NN_STANDBY_NAME}
hostname: ${NN_STANDBY_NAME}
image: hadoop-cluster:latest
ports:
- 28080:8080
- 50271:50071 # Namenode_StandBy WEB UI
- 29888:19888
- 8280:8081
- 8380:8083
- 8480:8084
volumes:
- ./config/core-site.xml:/home/hadoop/bin/hadoop/etc/hadoop/core-site.xml
- ./config/hdfs-site.xml:/home/hadoop/bin/hadoop/etc/hadoop/hdfs-site.xml
- ./config/yarn-site.xml:/home/hadoop/bin/hadoop/etc/hadoop/yarn-site.xml
- ./config/mapred-site.xml:/home/hadoop/bin/hadoop/etc/hadoop/mapred-site.xml
- ./config/hadoop-env.sh:/home/hadoop/bin/hadoop/etc/hadoop/hadoop-env.sh
- ./config/slaves:/home/hadoop/bin/hadoop/etc/hadoop/slaves
- ./config/zookeeper/zoo.cfg:/home/hadoop/bin/zookeeper/conf/zoo.cfg
networks:
hadoop-network:
ipv4_address: 172.72.0.3
tty: true
datanode-1:
container_name: ${DN_NAME}-1
hostname: ${DN_NAME}-1
image: hadoop-cluster:latest
ports:
- 50172:50072 # Datanode WEB UI
volumes:
- ./config/core-site.xml:/home/hadoop/bin/hadoop/etc/hadoop/core-site.xml
- ./config/hdfs-site.xml:/home/hadoop/bin/hadoop/etc/hadoop/hdfs-site.xml
- ./config/yarn-site.xml:/home/hadoop/bin/hadoop/etc/hadoop/yarn-site.xml
- ./config/mapred-site.xml:/home/hadoop/bin/hadoop/etc/hadoop/mapred-site.xml
- ./config/hadoop-env.sh:/home/hadoop/bin/hadoop/etc/hadoop/hadoop-env.sh
- ./config/slaves:/home/hadoop/bin/hadoop/etc/hadoop/slaves
- ./config/zookeeper/zoo.cfg:/home/hadoop/bin/zookeeper/conf/zoo.cfg
networks:
hadoop-network:
ipv4_address: 172.72.0.4
tty: true
datanode-2:
container_name: ${DN_NAME}-2
hostname: ${DN_NAME}-2
image: hadoop-cluster:latest
ports:
- 50272:50072 # Datanode WEB UI
volumes:
- ./config/core-site.xml:/home/hadoop/bin/hadoop/etc/hadoop/core-site.xml
- ./config/hdfs-site.xml:/home/hadoop/bin/hadoop/etc/hadoop/hdfs-site.xml
- ./config/yarn-site.xml:/home/hadoop/bin/hadoop/etc/hadoop/yarn-site.xml
- ./config/mapred-site.xml:/home/hadoop/bin/hadoop/etc/hadoop/mapred-site.xml
- ./config/hadoop-env.sh:/home/hadoop/bin/hadoop/etc/hadoop/hadoop-env.sh
- ./config/slaves:/home/hadoop/bin/hadoop/etc/hadoop/slaves
networks:
hadoop-network:
ipv4_address: 172.72.0.5
tty: true
datanode-3:
container_name: ${DN_NAME}-3
hostname: ${DN_NAME}-3
image: hadoop-cluster:latest
ports:
- 50372:50072 # Datanode WEB UI
volumes:
- ./config/core-site.xml:/home/hadoop/bin/hadoop/etc/hadoop/core-site.xml
- ./config/hdfs-site.xml:/home/hadoop/bin/hadoop/etc/hadoop/hdfs-site.xml
- ./config/yarn-site.xml:/home/hadoop/bin/hadoop/etc/hadoop/yarn-site.xml
- ./config/mapred-site.xml:/home/hadoop/bin/hadoop/etc/hadoop/mapred-site.xml
- ./config/hadoop-env.sh:/home/hadoop/bin/hadoop/etc/hadoop/hadoop-env.sh
- ./config/slaves:/home/hadoop/bin/hadoop/etc/hadoop/slaves
networks:
hadoop-network:
ipv4_address: 172.72.0.6
tty: true
#
networks:
hadoop-network:
driver: bridge
external: true