From 215027781a47a0a564ff2c684e7904107188154d Mon Sep 17 00:00:00 2001 From: barbadosian Date: Tue, 6 Feb 2024 12:48:01 -0600 Subject: [PATCH] Update compose file --- dockers/docker-compose.yml | 50 +++++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 9 deletions(-) diff --git a/dockers/docker-compose.yml b/dockers/docker-compose.yml index 5fbddb4594836..944907b8e0b75 100644 --- a/dockers/docker-compose.yml +++ b/dockers/docker-compose.yml @@ -12,29 +12,61 @@ services: volumes: - ./core-site.xml:/opt/hadoop-3.5.0-SNAPSHOT/etc/hadoop/core-site.xml - ./hdfs-site.xml:/opt/hadoop-3.5.0-SNAPSHOT/etc/hadoop/hdfs-site.xml + - volume-name-1:/data entrypoint: bash namenode-entrypoint.sh networks: - intra - datanode: + datanode-1: + image: hdfs-runtime:latest + restart: always + volumes: + - ./core-site.xml:/opt/hadoop-3.5.0-SNAPSHOT/etc/hadoop/core-site.xml + - ./hdfs-site.xml:/opt/hadoop-3.5.0-SNAPSHOT/etc/hadoop/hdfs-site.xml + - volume-data-1:/data + entrypoint: hdfs datanode + networks: + - intra + + datanode-2: + image: hdfs-runtime:latest + restart: always + volumes: + - ./core-site.xml:/opt/hadoop-3.5.0-SNAPSHOT/etc/hadoop/core-site.xml + - ./hdfs-site.xml:/opt/hadoop-3.5.0-SNAPSHOT/etc/hadoop/hdfs-site.xml + - volume-data-2:/data + entrypoint: hdfs datanode + networks: + - intra + + datanode-3: + image: hdfs-runtime:latest + restart: always + volumes: + - ./core-site.xml:/opt/hadoop-3.5.0-SNAPSHOT/etc/hadoop/core-site.xml + - ./hdfs-site.xml:/opt/hadoop-3.5.0-SNAPSHOT/etc/hadoop/hdfs-site.xml + - volume-data-3:/data + entrypoint: hdfs datanode + networks: + - intra + + datanode-4: image: hdfs-runtime:latest restart: always - environment: - HDFS_DATANODE_USER: root volumes: - ./core-site.xml:/opt/hadoop-3.5.0-SNAPSHOT/etc/hadoop/core-site.xml - ./hdfs-site.xml:/opt/hadoop-3.5.0-SNAPSHOT/etc/hadoop/hdfs-site.xml + - volume-data-4:/data entrypoint: hdfs datanode networks: - intra - deploy: - mode: replicated - replicas: 3 networks: intra: volumes: - test_volume_1: - test_volume_2: - test_volume_3: + volume-name-1: + volume-data-1: + volume-data-2: + volume-data-3: + volume-data-4: \ No newline at end of file