-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose.sparkcluster.yml
73 lines (70 loc) · 2.03 KB
/
docker-compose.sparkcluster.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
version: '3.2'
services:
# spark-master:
# build:
# context: ./spark
# dockerfile: Dockerfile
# args:
# SPARK_VERSION: "${SPARK_VERSION}"
# HADOOP_VERSION_SHORT: "${HADOOP_VERSION_SHORT}"
# volumes:
# - ./combinelib:/combinelib
# - type: volume
# source: hdfs
# target: /hdfs
# read_only: true
# - type: volume
# source: hadoop_binaries
# target: /opt/hadoop
# read_only: true
# - type: volume
# source: spark_binaries
# target: /opt/spark
# read_only: false # owner of dir
# ports:
# - 8080:8080
# - 7077:7077
# - 4040:4040
# environment:
# - "SPARK_HOME=/opt/spark"
# - "SPARK_MASTER_HOST=spark-master"
# - "SPARK_DRIVER_HOST=spark-master"
# - "SPARK_LOCAL_IP=spark-master"
# - "SPARK_DRIVER_CORES=1"
# - "SPARK_DRIVER_MEMORY=1G"
# - "SPARK_PUBLIC_DNS=10.5.0.1"
# command: /opt/spark/bin/spark-class org.apache.spark.deploy.master.Master
# networks:
# combinenet:
# ipv4_address: 10.5.0.8
# spark-worker:
# build:
# context: ./spark
# dockerfile: Dockerfile
# args:
# SPARK_VERSION: "${SPARK_VERSION}"
# HADOOP_VERSION_SHORT: "${HADOOP_VERSION_SHORT}"
# volumes:
# - ./combinelib:/combinelib
# - type: volume
# source: hdfs
# target: /hdfs
# read_only: true
# - type: volume
# source: hadoop_binaries
# target: /opt/hadoop
# read_only: true
# ports:
# - 8081:8081
# environment:
# - "SPARK_HOME=/opt/spark"
# - "SPARK_MASTER=spark://spark-master:7077"
# - "SPARK_MASTER_HOST=spark-master"
# - "SPARK_DRIVER_HOST=spark-master"
# - "SPARK_WORKER_CORES=2"
# - "SPARK_WORKER_MEMORY=4G"
# - "SPARK_PUBLIC_DNS=10.5.0.1"
# command: /opt/spark/bin/spark-class org.apache.spark.deploy.worker.Worker spark-master:7077
# networks:
# combinenet:
# ipv4_address: 10.5.0.9