-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
515 lines (486 loc) · 13.1 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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
version: "3.8"
services:
magnetar:
build:
context: ..
dockerfile: magnetar/Dockerfile
image: magnetar
container_name: magnetar
hostname: ${MAGNETAR_HOSTNAME}
restart: on-failure
environment:
- NATS_ADDRESS=${NATS_HOSTNAME}:${NATS_PORT}
- ETCD_ADDRESS=${ETCD_HOSTNAME}:${ETCD_PORT}
- MAGNETAR_ADDRESS=:${MAGNETAR_PORT}
- OORT_ADDRESS=${OORT_HOSTNAME}:${OORT_PORT}
- APOLLO_ADDRESS=${IAM_HOSTNAME}:${IAM_PORT}
- SECRET_KEY=${SECRET_KEY}
- MERIDIAN_ADDRESS=${MERIDIAN_ADDRESS}
- GRAVITY_ADDRESS=${GRAVITY_ADDRESS}
networks:
network:
ipv4_address: 10.5.0.101
depends_on:
- nats
- etcd
oort:
build:
context: ..
dockerfile: oort/Dockerfile
image: oort
container_name: oort
hostname: ${OORT_HOSTNAME}
environment:
- OORT_PORT=${OORT_PORT}
- NEO4J_HOSTNAME=${NEO4J_HOSTNAME}
- NEO4J_BOLT_PORT=${NEO4J_BOLT_PORT}
- NEO4J_DBNAME=${NEO4J_DBNAME}
- NATS_HOSTNAME=${NATS_HOSTNAME}
- NATS_PORT=${NATS_PORT}
networks:
network:
ipv4_address: 10.5.0.102
depends_on:
- neo4j
- nats
kuiper:
build:
context: ..
dockerfile: kuiper/Dockerfile
image: kuiper
container_name: kuiper
hostname: ${KUIPER_HOSTNAME}
expose:
- ${KUIPER_PORT}
ports:
- ${KUIPER_PORT}:${KUIPER_PORT}
environment:
- KUIPER_ADDRESS=:${KUIPER_PORT}
- WEBHOOK_ADDRESS=:${KUIPER_WEBHOOK_PORT}
- WEBHOOK_URL=http://${KUIPER_HOSTNAME}:${KUIPER_WEBHOOK_PORT}
- OORT_ADDRESS=${OORT_HOSTNAME}:${OORT_PORT}
- MAGNETAR_ADDRESS=${MAGNETAR_HOSTNAME}:${MAGNETAR_PORT}
- QUASAR_ADDRESS=${QUASAR_HOSTNAME}:${QUASAR_PORT}
- NATS_ADDRESS=${NATS_HOSTNAME}:${NATS_PORT}
- AGENT_QUEUE_ADDRESS=${AGENT_QUEUE_HOSTNAME}:${AGENT_QUEUE_PORT}
- ETCD_ADDRESS=${KUIPER_ETCD_HOSTNAME}:${KUIPER_ETCD_PORT}
- SECRET_KEY=${SECRET_KEY}
- MERIDIAN_ADDRESS=${MERIDIAN_ADDRESS}
networks:
network:
ipv4_address: 10.5.0.103
depends_on:
- nats
- kuiper_etcd
- agent_queue
quasar:
build:
context: ..
dockerfile: quasar/Dockerfile
image: quasar
container_name: quasar
hostname: ${QUASAR_HOSTNAME}
environment:
- SERVER_PORT=${QUASAR_PORT}
- ETCD_ADDRESS=${QUASAR_ETCD_HOSTNAME}:${QUASAR_ETCD_PORT}
- NATS_ADDRESS=${NATS_HOSTNAME}:${NATS_PORT}
- SECRET_KEY=${SECRET_KEY}
- MERIDIAN_ADDRESS=${MERIDIAN_ADDRESS}
networks:
network:
ipv4_address: 10.5.0.104
depends_on:
- quasar_etcd
- nats
agent_queue:
build:
context: ../gravity
dockerfile: Dockerfile
args:
- GRPC_PORT=${AGENT_QUEUE_PORT}
image: agent_queue
container_name: agent_queue
restart: always
networks:
network:
ipv4_address: 10.5.0.105
environment:
GRPC_PORT: ${AGENT_QUEUE_PORT}
NATS_CONN_ADDRESS: ${NATS_HOSTNAME}:${NATS_PORT}
SECRET_KEY: ${SECRET_KEY}
depends_on:
- nats
apollo:
build:
context: ..
dockerfile: apollo/Dockerfile
image: apollo
container_name: apollo
hostname: ${IAM_HOSTNAME}
restart: on-failure
volumes:
- ./../apollo/vault/config/api_key.json:/etc/apollo/api_key.json
environment:
- IAM_ADDRESS=:${IAM_PORT}
- OORT_ADDRESS=${OORT_HOSTNAME}:${OORT_PORT}
- MAGNETAR_ADDRESS=${MAGNETAR_HOSTNAME}:${MAGNETAR_PORT}
- NATS_HOSTNAME=${NATS_HOSTNAME}
- NATS_PORT=${NATS_PORT}
- SECRET_KEY=${SECRET_KEY}
- VAULT_HOSTNAME=${VAULT_HOSTNAME}
- VAULT_HTTP_PORT=${VAULT_HTTP_PORT}
- VAULT_KEYS_FILE=${VAULT_KEYS_FILE}
- APOLLO_DB_CONSISTENCY=${APOLLO_DB_CONSISTENCY}
- APOLLO_DB_KEYSPACE=${APOLLO_DB_KEYSPACE}
- APOLLO_DB_CLUSTER=${APOLLO_DB_CLUSTER}
networks:
network:
ipv4_address: 10.5.0.106
depends_on:
nats:
condition: service_started
vault:
condition: service_started
scylla:
condition: service_healthy
vault:
build:
context: ..
dockerfile: tools/vault/Dockerfile
container_name: vault
hostname: ${VAULT_HOSTNAME}
restart: on-failure
environment:
- VAULT_ADDR=${VAULT_ADDR}:${VAULT_HTTP_PORT}
- VAULT_API_ADDR=${VAULT_ADDR}:${VAULT_HTTP_PORT}
cap_add:
- IPC_LOCK
command: vault server -config=/vault/config/vault.json
healthcheck:
test: ["CMD", "vault", "status"]
interval: 5s
timeout: 2s
retries: 10
networks:
network:
ipv4_address: 10.5.0.107
neo4j:
image: neo4j:4.4.12
container_name: neo4j
hostname: ${NEO4J_HOSTNAME}
restart: on-failure
environment:
- NEO4J_apoc_export_file_enabled=${NEO4J_apoc_export_file_enabled}
- NEO4J_apoc_import_file_enabled=${NEO4J_apoc_import_file_enabled}
- NEO4J_apoc_import_file_use__neo4j__config=${NEO4J_apoc_import_file_use__neo4j__config}
- NEO4JLABS_PLUGINS=${NEO4J_PLUGINS}
- NEO4J_dbms_connector_bolt_listen__address=:${NEO4J_BOLT_PORT}
- NEO4J_dbms_connector_http_listen__address=:${NEO4J_HTTP_PORT}
- NEO4J_dbms_security_auth__enabled=${NEO4J_AUTH_ENABLED}
networks:
network:
ipv4_address: 10.5.0.108
volumes:
- neo4jdata:/data
- neo4jlogs:/logs
nats:
image: nats:latest
container_name: nats
ports:
- ${NATS_PORT}:${NATS_PORT}
- 8222:8222
volumes:
- ./nats.conf:/etc/nats/nats-server.conf
hostname: ${NATS_HOSTNAME}
restart: on-failure
networks:
network:
ipv4_address: 10.5.0.109
scylla:
build:
context: ..
dockerfile: tools/scylla/Dockerfile
container_name: scylla
restart: on-failure
volumes:
- scylla_data:/var/lib/scylla
expose:
- 9042
ports:
- 9042:9042
healthcheck:
test: ["CMD-SHELL", "cqlsh scylla -e 'describe cluster'"]
interval: 15s # This specifies how often the health check command is executed
timeout: 10s
retries: 10
networks:
network:
ipv4_address: 10.5.0.113
etcd:
image: "bitnami/etcd:latest"
container_name: etcd
hostname: ${ETCD_HOSTNAME}
environment:
- ALLOW_NONE_AUTHENTICATION=yes
- ETCD_ADVERTISE_CLIENT_URLS=http://${ETCD_HOSTNAME}:${ETCD_PORT}
volumes:
- etcd_data:/bitnami/etcd
networks:
network:
ipv4_address: 10.5.0.110
kuiper_etcd:
image: "bitnami/etcd:latest"
container_name: kuiper_etcd
hostname: ${KUIPER_ETCD_HOSTNAME}
environment:
- ALLOW_NONE_AUTHENTICATION=yes
- ETCD_ADVERTISE_CLIENT_URLS=http://${KUIPER_ETCD_HOSTNAME}:${KUIPER_ETCD_PORT}
volumes:
- kuiper_etcd_data:/bitnami/etcd
networks:
network:
ipv4_address: 10.5.0.111
quasar_etcd:
image: "bitnami/etcd:latest"
container_name: quasar_etcd
hostname: ${QUASAR_ETCD_HOSTNAME}
environment:
- ALLOW_NONE_AUTHENTICATION=yes
- ETCD_ADVERTISE_CLIENT_URLS=http://${QUASAR_ETCD_HOSTNAME}:${QUASAR_ETCD_PORT}
volumes:
- quasar_etcd_data:/bitnami/etcd
networks:
network:
ipv4_address: 10.5.0.112
lunar-gateway:
image: lunar-gateway
container_name: lunar-gateway
build:
context: ..
dockerfile: ./lunar-gateway/Dockerfile
restart: on-failure
env_file:
- ./../lunar-gateway/.env
ports:
- 5555:5555
networks:
network:
ipv4_address: 10.5.0.114
depends_on:
- magnetar
- oort
- apollo
- kuiper
- quasar
- rate_limiter_service
consul:
image: hashicorp/consul:latest
hostname: consul
ports:
- "8500:8500"
- "8600:8600/tcp"
- "8600:8600/udp"
environment:
- CONSUL_LOCAL_CONFIG={"server":true,"server_rejoin_age_max":"8760h"}
command: "agent -ui -server -bind 0.0.0.0 -client 0.0.0.0 -bootstrap-expect 1"
volumes:
- ./heliosphere/consul:/consul/data
networks:
network:
ipv4_address: 10.5.0.115
rate_limiter_service:
image: rate_limiter_service
container_name: rate_limiter_service
hostname: rate_limiter_service
build:
context: ..
dockerfile: ./heliosphere/rate-limiter-service/Dockerfile
restart: always
depends_on:
- consul
environment:
- DB_CONSUL=${DB_CONSUL}
- DBPORT_CONSUL=${DBPORT_CONSUL}
networks:
network:
ipv4_address: 10.5.0.116
meridian:
build:
context: ../
dockerfile: ./meridian/Dockerfile
image: meridian
container_name: meridian
hostname: meridian
restart: "no"
ports:
- ${MERIDIAN_LISTEN_PORT}:${MERIDIAN_LISTEN_PORT}
environment:
- PULSAR_ADDRESS=${PULSAR_ADDRESS}
- GRAVITY_ADDRESS=${GRAVITY_ADDRESS}
- MAGNETAR_ADDRESS=${MAGNETAR_HOSTNAME}:${MAGNETAR_PORT}
- NEO4J_ADDRESS=${MERIDIAN_NEO4J_ADDRESS}
- NEO4J_DB_NAME=${MERIDIAN_NEO4J_DB_NAME}
- LISTEN_ADDRESS=0.0.0.0:${MERIDIAN_LISTEN_PORT}
- NATS_ADDRESS=${NATS_HOSTNAME}:${NATS_PORT}
- SECRET_KEY=${SECRET_KEY}
depends_on:
meridian_neo4j:
condition: service_healthy
nats:
condition: service_started
networks:
network:
ipv4_address: 10.5.0.117
meridian_neo4j:
image: neo4j:4.4.12
container_name: meridian_neo4j
restart: on-failure
environment:
- NEO4J_dbms_connector_bolt_listen__address=:${MERIDIAN_NEO4J_BOLT_PORT}
- NEO4J_dbms_connector_http_listen__address=:${MERIDIAN_NEO4J_HTTP_PORT}
- NEO4J_dbms_security_auth__enabled=${MERIDIAN_NEO4J_AUTH_ENABLED}
volumes:
- meridian_neo4j_data:/data
healthcheck:
test: wget http://localhost:7474 || exit 1
interval: 1s
timeout: 10s
retries: 20
start_period: 3s
networks:
network:
ipv4_address: 10.5.0.118
pulsar:
build:
context: ../
dockerfile: ./pulsar/Dockerfile
image: pulsar
container_name: pulsar
hostname: pulsar
restart: on-failure
environment:
- ETCD_ADDRESS=${PULSAR_ETCD_ADDRESS}
- LISTEN_ADDRESS=${PULSAR_LISTEN_ADDRESS}
- SECRET_KEY=${SECRET_KEY}
depends_on:
- pulsar_etcd
networks:
network:
ipv4_address: 10.5.0.119
pulsar_etcd:
image: 'bitnami/etcd:latest'
container_name: pulsar_etcd
environment:
- ALLOW_NONE_AUTHENTICATION=yes
- ETCD_ADVERTISE_CLIENT_URLS=http://${PULSAR_ETCD_ADDRESS}
volumes:
- pulsar_etcd_data:/bitnami/etcd
networks:
network:
ipv4_address: 10.5.0.120
protostar_healthcheck:
build:
context: ..
dockerfile: ./protostar/health-check/Dockerfile
image: health-check
container_name: health-check
hostname: health-check
restart: on-failure
ports:
- 8013:8080
environment:
- PORT=8080
- NATS_ADDRESS=${NATS_HOSTNAME}:${NATS_PORT}
- MAGNETAR_ADDRESS=${MAGNETAR_HOSTNAME}:${MAGNETAR_PORT}
- PROMETHEUS_URL=${PROMETHEUS_HEALTCHECK_URL}
- PROMETHEUS_PORT=${PROMETHEUS_HEALTHCHECK_PORT}
networks:
network:
ipv4_address: 10.5.0.121
protostar_metrics:
build:
context: ..
dockerfile: ./protostar/node-metrics/Dockerfile
image: node-metrics
container_name: node-metrics
hostname: node-metrics
restart: on-failure
ports:
- 8086:8080
environment:
- PORT=8080
- PROMETHEUS_URL=${PROMETHEUS_HEALTCHECK_URL}
- PROMETHEUS_PORT=${PROMETHEUS_HEALTHCHECK_PORT}
networks:
network:
ipv4_address: 10.5.0.122
prometheus_healthcheck:
image: prom/prometheus:latest
volumes:
- ./prometheus_healthcheck/prometheus.yml:/etc/prometheus/prometheus.yml
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.retention.time=2d"
ports:
- 9092:9090
networks:
network:
ipv4_address: 10.5.0.123
node_exporter:
image: quay.io/prometheus/node-exporter:latest
container_name: node_exporter
command:
- '--path.rootfs=/host'
# network_mode: host
# pid: host
# privileged: true
restart: unless-stopped
volumes:
- '/:/host:ro,rslave'
networks:
network:
ipv4_address: 10.5.0.124
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.47.1
# network_mode: host
# pid: host
# privileged: true
# volumes:
# - /:/rootfs:ro
# - /var/run:/var/run:rw
# - /sys:/sys:ro
# - /var/lib/docker/:/var/lib/docker:ro
# - /var/lib/dbus/machine-id:/var/lib/dbus/machine-id:ro
# - /var/run/docker.sock:/var/run/docker.sock:ro
# - /etc/machine-id:/etc/machine-id:ro
networks:
network:
ipv4_address: 10.5.0.125
networks:
network:
driver: bridge
ipam:
config:
- subnet: 10.5.0.0/16
gateway: 10.5.0.1
volumes:
neo4jdata:
driver: local
neo4jlogs:
driver: local
etcd_data:
driver: local
kuiper_etcd_data:
driver: local
quasar_etcd_data:
driver: local
scylla_data:
driver: local
vault_data:
driver: local
meridian_neo4j_data:
driver: local
meridian_neo4j_logs:
driver: local
pulsar_etcd_data:
driver: local