-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
58 lines (54 loc) · 1.48 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
version: '2'
services:
kafka:
image: wurstmeister/kafka
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_CREATE_TOPICS: "android:1:1,acceleration:1:1"
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
master:
image: jairamc/spark-kafka-streaming
hostname: master
environment:
SPARK_HOME: /usr/local/spark
MASTER: spark://master:7077
SPARK_CONF_DIR: /usr/local/spark/conf
SPARK_PUBLIC_DNS: localhost
ports:
- 8080:8080
- 7077:7077
- 6066:6066
command: /usr/local/spark/bin/spark-class org.apache.spark.deploy.master.Master -h master
slave:
image: jairamc/spark-kafka-streaming
hostname: worker
depends_on:
- master
environment:
SPARK_HOME: /usr/local/spark
SPARK_CONF_DIR: /usr/local/spark/conf
SPARK_WORKER_CORES: 2
SPARK_WORKER_MEMORY: 1g
SPARK_WORKER_PORT: 8881
SPARK_WORKER_WEBUI_PORT: 8081
SPARK_PUBLIC_DNS: localhost
ports:
- 8081:8081
command: /usr/local/spark/bin/spark-class org.apache.spark.deploy.worker.Worker spark://master:7077
notebook:
image: jairamc/spark-notebook
environment:
SPARK_OPTS: '--master=spark://master:7077'
command: jupyter notebook --ip=0.0.0.0
ports:
- 8888:8888
volumes:
- ./notebooks:/notebooks