-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
110 lines (104 loc) · 2.65 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
version: '3.5'
services:
# #######################################
# primary namenode (namenode1)
# secondary namenode (namenode2)
#
namenode1:
build: .
hostname: namenode1
domainname: cluster.local
container_name: namenode1
networks:
hadoop:
ipv4_address: 10.5.0.11
environment:
ZOOKEEPER_ID: 1
volumes:
- "./srv-namenode.cfg:/etc/supervisord.d/services.cfg:ro"
- "./init.d:/etc/hadoop/init.d:ro"
- "./etc:/etc/hadoop/conf:ro"
- "./environment.env:/etc/environment:ro"
- "./workspace/scripts:/workspace/scripts:ro"
- "./workspace/tmp:/workspace/tmp:rw"
- "namenode1:/storage"
namenode2:
build: .
hostname: namenode2
domainname: cluster.local
container_name: namenode2
networks:
hadoop:
ipv4_address: 10.5.0.12
environment:
ZOOKEEPER_ID: 2
volumes:
- "./srv-secondarynamenode.cfg:/etc/supervisord.d/services.cfg:ro"
- "./init.d:/etc/hadoop/init.d:ro"
- "./etc:/etc/hadoop/conf:ro"
- "./environment.env:/etc/environment:ro"
- "namenode2:/storage"
# #######################################
# datanodes: 1..3
#
datanode1:
build: .
hostname: datanode1
domainname: cluster.local
container_name: datanode1
networks:
hadoop:
ipv4_address: 10.5.0.21
environment:
ZOOKEEPER_ID: 3
volumes:
- "./srv-datanode.cfg:/etc/supervisord.d/services.cfg:ro"
- "./init.d:/etc/hadoop/init.d:ro"
- "./etc:/etc/hadoop/conf:ro"
- "./environment.env:/etc/environment:ro"
- "datanode1:/storage"
datanode2:
build: .
hostname: datanode2
domainname: cluster.local
container_name: datanode2
networks:
hadoop:
ipv4_address: 10.5.0.22
environment:
ZOOKEEPER_ID: 4
volumes:
- "./srv-datanode.cfg:/etc/supervisord.d/services.cfg:ro"
- "./init.d:/etc/hadoop/init.d:ro"
- "./etc:/etc/hadoop/conf:ro"
- "./environment.env:/etc/environment:ro"
- "datanode2:/storage"
datanode3:
build: .
hostname: datanode3
domainname: cluster.local
container_name: datanode3
networks:
hadoop:
ipv4_address: 10.5.0.23
environment:
ZOOKEEPER_ID: 5
volumes:
- "./srv-datanode.cfg:/etc/supervisord.d/services.cfg:ro"
- "./init.d:/etc/hadoop/init.d:ro"
- "./etc:/etc/hadoop/conf:ro"
- "./environment.env:/etc/environment:ro"
- "datanode3:/storage"
volumes:
namenode1:
namenode2:
datanode1:
datanode2:
datanode3:
networks:
hadoop:
name: cluster.local
driver: bridge
ipam:
config:
- subnet: 10.5.0.0/16