forked from nedRad88/SCALAR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
151 lines (143 loc) · 3.43 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
139
140
141
142
143
144
145
146
147
148
149
150
151
version: '3'
services:
zookeeper:
environment:
TZ: "Europe/Paris"
networks:
- provider_network
image: wurstmeister/zookeeper
ports:
- "2181:2181"
container_name: zookeeper
kafka:
image: wurstmeister/kafka
ports:
- "9092:9092"
networks:
- provider_network
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LISTENERS:
"INTERNAL://kafka:9092,\
EXTERNAL://:9094"
KAFKA_ADVERTISED_LISTENERS:
"INTERNAL://kafka:9092,\
EXTERNAL://user:9094"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP:
"INTERNAL:PLAINTEXT,\
EXTERNAL:PLAINTEXT"
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_LOG4J_ROOT_LOGLEVEL: WARN
KAFKA_TOOLS_LOG4J_LOGLEVEL: ERROR
TZ: "Europe/Paris"
container_name: kafka
depends_on:
- zookeeper
mongo_db:
image: mongo:3.6.18
networks:
- provider_network
environment:
TZ: "Europe/Paris"
volumes:
- ../data/mongodir/:/data/db
container_name: mongo_db
sql_db:
image: mysql:5.7.21
networks:
- provider_network
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: yHnIXC1Skr9k2
MYSQL_DATABASE: sample
MYSQL_USER: mysql
MYSQL_PASSWORD: mysql
TZ: "Europe/Paris"
volumes:
- ../data/sqldir/:/var/lib/mysql
container_name: sql_db
command: [mysqld, --default-authentication-plugin=mysql_native_password]
depends_on:
- spark-master
provider:
build: provider
ports:
- "80:5000"
- "5005:5005"
- "50051:50051"
- "13666:13666"
networks:
- provider_network
environment:
TZ: "Europe/Paris"
DNS_NAME: "http://localhost"
SPARK_HOST: "spark-master"
MONGO_HOST: "mongo_db"
SPARK_DRIVER_HOST: "provider"
SPARK_DRIVER_PORT: 5005
SPARK_BLOCKMANAGER_PORT: 13666
KAFKA_HOST: "kafka:9092"
SQL_HOST: "mysql+pymysql://mysql:mysql@sql_db/"
SQL_DBNAME: "sample"
volumes:
- ../:/local/data
container_name: provider
depends_on:
- sql_db
spark-master:
image: nedeljkoradulovic88/spark
networks:
- provider_network
environment:
TZ: "Europe/Paris"
SPARK_CONF_DIR: /conf
PACKAGES: 'org.apache.spark:spark-sql-kafka-0-10_2.11:2.4.0'
ports:
- "4040:4040"
- "6066:6066"
- "7077:7077"
- "8080:8080"
container_name: spark-master
expose:
- 7001
- 7002
- 7003
- 7004
- 7005
- 7006
- 7077
- 6066
#command: ['bin/spark-class org.apache.spark.deploy.master.Master', './bin/pyspark --packages org.apache.spark:spark-sql-kafka-0-10_2.11:2.4.0']
worker1:
image: nedeljkoradulovic88/spark
networks:
- provider_network
command: 'bin/spark-class org.apache.spark.deploy.worker.Worker spark://spark-master:7077'
hostname: worker1
environment:
SPARK_CONF_DIR: /conf
SPARK_WORKER_CORES: 2
SPARK_WORKER_MEMORY: 2g
SPARK_WORKER_PORT: 8881
SPARK_WORKER_WEBUI_PORT: 8082
PACKAGES: 'org.apache.spark:spark-sql-kafka-0-10_2.11:2.4.0'
TZ: "Europe/Paris"
links:
- spark-master
expose:
- 7012
- 7013
- 7014
- 7015
- 7016
- 8881
ports:
- 8082:8082
container_name: worker1
volumes:
- ../spark/:/tmp
networks:
provider_network:
external:
name: provider_network