-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
138 lines (138 loc) · 3.12 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
networks:
provider_network:
external:
name: provider_network
services:
kafka:
container_name: kafka
depends_on:
- zookeeper
environment:
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:9092,EXTERNAL://nedeljko:9094
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_LISTENERS: INTERNAL://kafka:9092,EXTERNAL://:9094
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_LOG4J_ROOT_LOGLEVEL: WARN
KAFKA_TOOLS_LOG4J_LOGLEVEL: ERROR
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
TZ: Europe/Zurich
image: wurstmeister/kafka
networks:
- provider_network
ports:
- 9092:9092
mongo_db:
container_name: mongo_db
environment:
TZ: Europe/Zurich
image: mongo:3.6.18
networks:
- provider_network
volumes:
- ../data/mongodir/:/data/db
provider:
build: provider
container_name: provider
depends_on:
- sql_db
environment:
DNS_NAME: http://localhost
KAFKA_HOST: kafka:9092
MONGO_HOST: mongo_db
SPARK_BLOCKMANAGER_PORT: 13666
SPARK_DRIVER_HOST: provider
SPARK_DRIVER_PORT: 5005
SPARK_HOST: spark-master
SQL_DBNAME: sample
SQL_HOST: mysql+pymysql://mysql:mysql@sql_db/
TZ: Europe/Zurich
networks:
- provider_network
ports:
- 80:5000
- 5005:5005
- 50051:50051
- 13666:13666
volumes:
- ../:/local/data
spark-master:
container_name: spark-master
environment:
PACKAGES: org.apache.spark:spark-sql-kafka-0-10_2.11:2.4.0
SPARK_CONF_DIR: /conf
TZ: Europe/Zurich
expose:
- 7001
- 7002
- 7003
- 7004
- 7005
- 7006
- 7077
- 6066
image: nedeljkoradulovic88/spark
networks:
- provider_network
ports:
- 4040:4040
- 6066:6066
- 7077:7077
- 8080:8080
sql_db:
command:
- mysqld
- --default-authentication-plugin=mysql_native_password
container_name: sql_db
depends_on:
- spark-master
environment:
MYSQL_DATABASE: sample
MYSQL_PASSWORD: mysql
MYSQL_ROOT_PASSWORD: yHnIXC1Skr9k2
MYSQL_USER: mysql
TZ: Europe/Zurich
image: mysql:5.7.21
networks:
- provider_network
ports:
- 3306:3306
volumes:
- ../data/sqldir/:/var/lib/mysql
worker1:
command: bin/spark-class org.apache.spark.deploy.worker.Worker spark://spark-master:7077
container_name: worker1
environment:
PACKAGES: org.apache.spark:spark-sql-kafka-0-10_2.11:2.4.0
SPARK_CONF_DIR: /conf
SPARK_WORKER_CORES: 2
SPARK_WORKER_MEMORY: 2g
SPARK_WORKER_PORT: 8881
SPARK_WORKER_WEBUI_PORT: 8082
TZ: Europe/Zurich
expose:
- 7012
- 7013
- 7014
- 7015
- 7016
- 8881
hostname: worker1
image: nedeljkoradulovic88/spark
links:
- spark-master
networks:
- provider_network
ports:
- 8082:8082
volumes:
- ../spark/:/tmp
zookeeper:
container_name: zookeeper
environment:
TZ: Europe/Zurich
image: wurstmeister/zookeeper
networks:
- provider_network
ports:
- 2181:2181
version: '3'