-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
84 lines (79 loc) · 1.77 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
services:
jupyter:
image: quay.io/jupyter/pyspark-notebook:python-3.11
container_name: jupyter-notebook
restart: unless-stopped
environment:
- JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/
ports:
- "8888:8888"
volumes:
- ./work:/home/jovyan/work
command: "start-notebook.sh --NotebookApp.token="
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
namenode: &hadoop
build:
context: .
container_name: hdfs-namenode
restart: unless-stopped
ports:
- "8088:8088"
- "9000:9000"
- "9870:9870"
volumes:
- namenode_data:/data
command: >
bash -c "hdfs namenode & yarn resourcemanager "
hostname: hdfs-namenode
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
datanode-1:
<<: *hadoop
container_name: hadoop-datanode-1
hostname: datanode-1
depends_on:
- namenode
command: >
bash -c "hdfs datanode & yarn nodemanager "
ports:
- "9864"
volumes:
- datanode_1_data:/data
links:
- namenode:hdfs-namenode
datanode-2:
<<: *hadoop
container_name: hadoop-datanode-2
hostname: datanode-2
depends_on:
- namenode
command: >
bash -c "hdfs datanode & yarn nodemanager "
ports:
- "9864"
volumes:
- datanode_2_data:/data
links:
- namenode:hdfs-namenode
secondarynamenode:
<<: *hadoop
container_name: hadoop-secondarynamenode
command: hdfs secondarynamenode
ports:
- "9868:9868"
volumes:
- secondarynamenode_data:/data
links:
- namenode:hdfs-namenode
volumes:
namenode_data: {}
datanode_1_data: {}
datanode_2_data: {}
secondarynamenode_data: {}