-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
56 lines (56 loc) · 1.54 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
version: "3.5"
services:
slave1:
build:
context: .
shm_size: '2gb'
container_name: slave1
networks:
default:
ipv4_address: 172.10.0.3
extra_hosts:
- "master: 172.10.0.2"
- "slave2: 172.10.0.4"
command: bash -c "hadoop-daemon.sh --config /usr/local/hadoop/etc/hadoop start datanode && yarn-daemon.sh --config /usr/local/hadoop/etc/hadoop start nodemanager && tail -f /dev/null"
hostname: slave1
restart: always
slave2:
build:
context: .
shm_size: '2gb'
container_name: slave2
networks:
default:
ipv4_address: 172.10.0.4
extra_hosts:
- "master: 172.10.0.2"
- "slave1: 172.10.0.3"
command: bash -c "hadoop-daemon.sh --config /usr/local/hadoop/etc/hadoop start datanode && yarn-daemon.sh --config /usr/local/hadoop/etc/hadoop start nodemanager && tail -f /dev/null"
hostname: slave2
restart: always
master:
build:
context: .
shm_size: '2gb'
args:
FORMAT_NAMENODE_COMMAND: hdfs namenode -format
container_name: master
networks:
default:
ipv4_address: 172.10.0.2
extra_hosts:
- "slave1: 172.10.0.3"
- "slave2: 172.10.0.4"
command: bash -c "start-dfs.sh && start-yarn.sh && mr-jobhistory-daemon.sh start historyserver && start-hbase.sh && tail -f /dev/null"
ports:
- 50070:50070
- 8088:8088
- 8080:8080
- 4040:4040
- 16010:16010
hostname: master
restart: always
networks:
default:
external:
name: hadoop-network