Skip to content

Commit

Permalink
Map ports (big-data-europe#105) and access WebHDFS (big-data-europe#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
alessiamarcolini committed Dec 14, 2021
1 parent 8414e2b commit f77014a
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
version: "3"

networks:
frontend:
ipam:
config:
- subnet: 172.20.0.0/24

services:
namenode:
image: bde2020/hadoop-namenode:2.0.0-hadoop3.2.1-java8
container_name: namenode
hostname: "172.20.0.6"
restart: always
networks:
frontend:
ipv4_address: 172.20.0.6
ports:
- 9870:9870
- 9000:9000
volumes:
- hadoop_namenode:/hadoop/dfs/name
- ./data-master:/data
environment:
- CLUSTER_NAME=test
env_file:
Expand All @@ -18,7 +29,11 @@ services:
datanode:
image: bde2020/hadoop-datanode:2.0.0-hadoop3.2.1-java8
container_name: datanode
hostname: "172.20.0.7"
restart: always
networks:
frontend:
ipv4_address: 172.20.0.7
volumes:
- hadoop_datanode:/hadoop/dfs/data
environment:
Expand All @@ -30,6 +45,11 @@ services:
image: bde2020/hadoop-resourcemanager:2.0.0-hadoop3.2.1-java8
container_name: resourcemanager
restart: always
ports:
- 8088:8088
networks:
frontend:
ipv4_address: 172.20.0.8
environment:
SERVICE_PRECONDITION: "namenode:9000 namenode:9870 datanode:9864"
env_file:
Expand All @@ -39,6 +59,9 @@ services:
image: bde2020/hadoop-nodemanager:2.0.0-hadoop3.2.1-java8
container_name: nodemanager
restart: always
networks:
frontend:
ipv4_address: 172.20.0.9
environment:
SERVICE_PRECONDITION: "namenode:9000 namenode:9870 datanode:9864 resourcemanager:8088"
env_file:
Expand All @@ -48,6 +71,11 @@ services:
image: bde2020/hadoop-historyserver:2.0.0-hadoop3.2.1-java8
container_name: historyserver
restart: always
networks:
frontend:
ipv4_address: 172.20.0.10
ports:
- 8188:8188
environment:
SERVICE_PRECONDITION: "namenode:9000 namenode:9870 datanode:9864 resourcemanager:8088"
volumes:
Expand All @@ -58,4 +86,4 @@ services:
volumes:
hadoop_namenode:
hadoop_datanode:
hadoop_historyserver:
hadoop_historyserver:

0 comments on commit f77014a

Please sign in to comment.