From 29f9d2e2f080de36f96570789f779a76c80abf74 Mon Sep 17 00:00:00 2001 From: Marcel-Jan Krijgsman Date: Sun, 27 Sep 2020 11:59:46 +0200 Subject: [PATCH] Spark master and worker added All containers seem to startup nicely --- docker-compose.yml | 48 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ed40dc62..21d34360 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,8 +12,11 @@ services: - hadoop_namenode:/hadoop/dfs/name environment: - CLUSTER_NAME=test + - CORE_CONF_fs_defaultFS=hdfs://namenode:8020 env_file: - ./hadoop.env + networks: + - spark-net datanode: image: bde2020/hadoop-datanode:2.0.0-hadoop3.2.1-java8 @@ -23,9 +26,12 @@ services: - hadoop_datanode:/hadoop/dfs/data environment: SERVICE_PRECONDITION: "namenode:9870" + CORE_CONF_fs_defaultFS: hdfs://namenode:8020 env_file: - ./hadoop.env - + networks: + - spark-net + resourcemanager: image: bde2020/hadoop-resourcemanager:2.0.0-hadoop3.2.1-java8 container_name: resourcemanager @@ -34,6 +40,8 @@ services: SERVICE_PRECONDITION: "namenode:9000 namenode:9870 datanode:9864" env_file: - ./hadoop.env + networks: + - spark-net nodemanager1: image: bde2020/hadoop-nodemanager:2.0.0-hadoop3.2.1-java8 @@ -43,7 +51,9 @@ services: SERVICE_PRECONDITION: "namenode:9000 namenode:9870 datanode:9864 resourcemanager:8088" env_file: - ./hadoop.env - + networks: + - spark-net + historyserver: image: bde2020/hadoop-historyserver:2.0.0-hadoop3.2.1-java8 container_name: historyserver @@ -54,8 +64,40 @@ services: - hadoop_historyserver:/hadoop/yarn/timeline env_file: - ./hadoop.env - + networks: + - spark-net + + spark-master: + image: bde2020/spark-master:3.0.0-hadoop3.2 + container_name: spark-master + ports: + - "8080:8080" + - "7077:7077" + environment: + - INIT_DAEMON_STEP=setup_spark + - CORE_CONF_fs_defaultFS=hdfs://namenode:8020 + networks: + - spark-net + + spark-worker-1: + image: bde2020/spark-worker:3.0.0-hadoop3.2 + container_name: spark-worker-1 + depends_on: + - spark-master + ports: + - "8081:8081" + environment: + - "SPARK_MASTER=spark://spark-master:7077" + - CORE_CONF_fs_defaultFS=hdfs://namenode:8020 + networks: + - spark-net + volumes: hadoop_namenode: hadoop_datanode: hadoop_historyserver: + +networks: + spark-net: + external: + name: spark-net