-
Notifications
You must be signed in to change notification settings - Fork 23
/
docker-compose.yml
322 lines (297 loc) · 7.45 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
version: "3.8"
x-deploy: &default-deploy
replicas: 1
restart_policy:
condition: on-failure
x-deploy-manager: &default-deploy-manager
<<: *default-deploy
placement:
constraints:
- "node.role==manager"
x-deploy-worker: &default-deploy-worker
<<: *default-deploy
placement:
constraints:
- "node.role==worker"
x-service-database-env: &default-service-database-env
- DATABASE_URL=mongodb://root:owl45#21@databaseprimary,databasesecondary
- DATABASE_PORT=27017
- DATABASE_REPLICA_SET=replica_set
- DATABASE_NAME=database
services:
databaseapi:
build: microservices/database_api_image
image: learningorchestra/database_api
ports:
- "5000:5000"
depends_on:
- databaseprimary
- images
deploy: *default-deploy-manager
volumes:
- "database_api:/datasets"
networks:
- database
environment: *default-service-database-env
databaseprimary:
image: "bitnami/mongodb:3.6.17-ol-7-r26"
ports:
- "27017:27017"
environment:
- MONGODB_ROOT_PASSWORD=owl45#21
- MONGODB_ADVERTISED_HOSTNAME=databaseprimary
- MONGODB_REPLICA_SET_MODE=primary
- MONGODB_REPLICA_SET_KEY=replicasetkey
- MONGODB_REPLICA_SET_NAME=replica_set
volumes:
- "database:/bitnami"
networks:
- database
deploy: *default-deploy-manager
databasesecondary:
image: "bitnami/mongodb:3.6.17-ol-7-r26"
depends_on:
- databaseprimary
environment:
- MONGODB_PRIMARY_HOST=databaseprimary
- MONGODB_PRIMARY_PORT_NUMBER=27017
- MONGODB_PRIMARY_ROOT_PASSWORD=owl45#21
- MONGODB_ADVERTISED_HOSTNAME=databasesecondary
- MONGODB_REPLICA_SET_NAME=replica_set
- MONGODB_REPLICA_SET_KEY=replicasetkey
- MONGODB_REPLICA_SET_MODE=secondary
networks:
- database
deploy: *default-deploy-worker
databasearbiter:
image: "bitnami/mongodb:3.6.17-ol-7-r26"
depends_on:
- databaseprimary
environment:
- MONGODB_PRIMARY_HOST=databaseprimary
- MONGODB_PRIMARY_PORT_NUMBER=27017
- MONGODB_PRIMARY_ROOT_PASSWORD=owl45#21
- MONGODB_ADVERTISED_HOSTNAME=databasearbiter
- MONGODB_REPLICA_SET_KEY=replicasetkey
- MONGODB_REPLICA_SET_NAME=replica_set
- MONGODB_REPLICA_SET_MODE=arbiter
networks:
- database
deploy: *default-deploy-worker
agent:
image: portainer/agent:linux-amd64-2.1.0-alpine
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
networks:
- portainer
deploy:
mode: global
placement:
constraints:
- "node.platform.os==linux"
portainer:
image: portainer/portainer-ce:2.1.1-alpine
command: -H tcp://tasks.agent:9001 --tlsskipverify
ports:
- "9000:9000"
- "8000:8000"
volumes:
- portainer:/data
networks:
- portainer
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- "node.role==manager"
sparkmaster:
build: microservices/spark_image
image: learningorchestra/spark
ports:
- "4040:4040"
- "7077:7077"
- "8080:8080"
environment:
- SPARK_ROLE=master
deploy: *default-deploy-worker
networks:
- spark
- database
sparkworker:
image: learningorchestra/spark
entrypoint: dockerize -wait tcp://sparkmaster:7077 -timeout 240s /sbin/my_init
ports:
- "8081:8081"
- "41352:41352"
links:
- sparkmaster
environment:
- SPARK_MASTER=sparkmaster
- SPARK_ROLE=slave
deploy:
replicas: 3
restart_policy:
condition: on-failure
placement:
constraints:
- "node.role==worker"
networks:
- spark
- database
projection:
build: microservices/projection_image
image: learningorchestra/projection
ports:
- "5001:5001"
- "41000:41000"
extra_hosts:
- "projection:0.0.0.0"
depends_on:
- databaseprimary
- images
- sparkmaster
- sparkworker
deploy: *default-deploy-worker
networks:
- database
- spark
environment: *default-service-database-env
builder:
build: microservices/builder_image
image: learningorchestra/builder
ports:
- "5002:5002"
- "41100:41100"
extra_hosts:
- "builder:0.0.0.0"
depends_on:
- databaseprimary
- images
- sparkmaster
- sparkworker
deploy: *default-deploy-worker
networks:
- database
- spark
environment: *default-service-database-env
datatypehandler:
build: microservices/data_type_handler_image
image: learningorchestra/data_type_handler
ports:
- "5003:5003"
depends_on:
- databaseprimary
- images
deploy: *default-deploy-worker
networks:
- database
environment: *default-service-database-env
histogram:
build: microservices/histogram_image
image: learningorchestra/histogram
ports:
- "5004:5004"
depends_on:
- databaseprimary
- images
deploy: *default-deploy-worker
networks:
- database
environment: *default-service-database-env
databasexecutor:
build: microservices/database_executor_image
image: learningorchestra/database_executor
ports:
- "5006:5006"
depends_on:
- databaseprimary
- images
deploy: *default-deploy-manager
volumes:
- "database_executor:/explore"
- "database_executor:/transform"
- "model:/models"
- "binary_executor:/binaries"
- "code_executor:/code_executions"
networks:
- database
environment: *default-service-database-env
gatewayapi:
build: microservices/krakend
image: learningorchestra/gatewayapi
ports:
- "80:8080"
- "8090:8090"
deploy: *default-deploy-manager
networks:
- database
- spark
model:
build: microservices/model_image
image: learningorchestra/model
ports:
- "5007:5007"
depends_on:
- databaseprimary
- images
deploy: *default-deploy-manager
networks:
- database
environment: *default-service-database-env
volumes:
- "code_executor:/code_executions"
- "database_executor:/explore"
- "database_executor:/transform"
- "model:/models"
- "binary_executor:/binaries"
binaryexecutor:
build: microservices/binary_executor_image
image: learningorchestra/binary_executor
ports:
- "5008:5008"
depends_on:
- databaseprimary
- images
deploy: *default-deploy-manager
networks:
- database
environment: *default-service-database-env
volumes:
- "model:/models"
- "binary_executor:/binaries"
- "database_executor:/transform"
- "code_executor:/code_executions"
codexecutor:
build: microservices/code_executor_image
image: learningorchestra/code_executor
ports:
- "5009:5009"
depends_on:
- databaseprimary
- images
deploy: *default-deploy-manager
volumes:
- "code_executor:/code_executions"
- "database_executor:/explore"
- "database_executor:/transform"
- "model:/models"
- "binary_executor:/binaries"
- "database_api:/datasets"
networks:
- database
environment: *default-service-database-env
networks:
database:
spark:
portainer:
volumes:
images:
database:
database_api:
database_executor:
code_executor:
model:
binary_executor:
portainer: