-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
514 lines (498 loc) · 19.9 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
services:
conductor:
profiles: ["platform", "songDev", "scoreDev", "maestroDev", "arrangerDev", "stageDev"]
image: alpine/curl:8.8.0
container_name: conductor
ports:
- "9204:9204"
volumes:
- ./persistentStorage/data-keycloak-db:/keycloak/db-folder-init
- ./persistentStorage/data-song-db:/song/db-folder-init
- ./configurationFiles/elasticsearchConfigs/quickstart_index_template.json:/usr/share/elasticsearch/config/quickstart_index_template.json
- ./configurationFiles/elasticsearchConfigs/es-docs:/es-docs
- ./conductorScripts:/scripts
- ./health:/health
environment:
- PROFILE=${PROFILE:-platform}
command: >
sh -c '
set -e
echo "Profile is set to: $PROFILE"
case "$PROFILE" in
platform)
echo "Running platform deployment..."
chmod +x scripts/deployments/platform.sh
scripts/deployments/platform.sh
;;
stageDev)
echo "Running Stage development environment..."
chmod +x scripts/deployments/stageDev.sh
scripts/deployments/stageDev.sh
;;
arrangerDev)
echo "Running Arranger development environment..."
chmod +x scripts/deployments/arrangerDev.sh
scripts/deployments/arrangerDev.sh
;;
maestroDev)
echo "Running Maestro development environment..."
chmod +x scripts/deployments/maestroDev.sh
scripts/deployments/maestroDev.sh
;;
songDev)
echo "Running Song development environment..."
chmod +x scripts/deployments/songDev.sh
scripts/deployments/songDev.sh
;;
scoreDev)
echo "Running Score development environment..."
chmod +x scripts/deployments/scoreDev.sh
scripts/deployments/scoreDev.sh
;;
*)
echo "Invalid profile: $PROFILE. Available options are [platform, songDev, scoreDev, maestroDev, arrangerDev, stageDev]."
exit 1
;;
esac
exit 0
'
healthcheck:
test: ["CMD", "test", "-f", "/health/conductor_health"]
interval: 5s
timeout: 40s
retries: 100
start_period: 30s
# ==================================================================================
# OAuth (KeyCloak)
# ==================================================================================
# ======================================
# Keycloak Database
# --------------------------------------
# Pre-populated with a system wide API key: 68fb42b4-f1ed-4e8c-beab-3724b99fe528, required for Songs SCORE_ACCESSTOKEN env variable
# Documentation Link: https://www.overture.bio/documentation/guides/deployment/oauth/#setting-up-the-keycloak-database
# --------------------------------------
keycloak-db:
profiles: ["platform", "songDev" , "scoreDev" ,"maestroDev", "stageDev"]
depends_on:
- conductor
image: postgres:14
platform: linux/amd64
container_name: keycloak-db
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin123
POSTGRES_DB: keycloakDb
volumes:
- ./persistentStorage/data-keycloak-db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin -d keycloakDb"]
interval: 20s
timeout: 10s
retries: 10
start_period: 20s
# ==========================
# Keycloak
# ==========================
# Authorization and authentication service
# Documentation Link: https://www.overture.bio/documentation/guides/deployment/oauth/#setting-up-keycloak
# --------------------------------------
keycloak:
profiles: ["platform", "songDev", "scoreDev", "maestroDev", "stageDev"]
image: quay.io/keycloak/keycloak:22.0
container_name: keycloak
platform: linux/amd64
depends_on:
keycloak-db:
condition: service_healthy
ports:
- "8180:8080"
environment:
# Postgres Variables
KC_DB: postgres
KC_DB_USERNAME: admin
KC_DB_PASSWORD: admin123
KC_DB_URL: jdbc:postgresql://keycloak-db:5432/keycloakDb
# Keycloak Variables
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin123
KC_HOSTNAME: localhost
KC_HEALTH_ENABLED: true
volumes:
- ./configurationFiles/keycloakConfigs/keycloak-apikeys-1.0.1.jar:/opt/keycloak/providers/keycloak-apikeys.jar
- ./configurationFiles/keycloakConfigs/myrealm-realm.json:/opt/keycloak/data/import/myrealm-realm.json
- ./configurationFiles/keycloakConfigs/myrealm-users-0.json:/opt/keycloak/data/import/myrealm-users-0.json
command: >
start-dev
--import-realm
--hostname-port=8180
# ==================================================================================
# File Management (Song, Score, Kafka, Minio)
# ==================================================================================
# ======================================
# Kafka
# ======================================
# Messaging system for Song and Maestro, used to orchestrate asynchronous communication, job execution, queuing, and processing.
# Documentation Link: https://www.overture.bio/documentation/guides/deployment/datamanagement/#running-kafka
# --------------------------------------
kafka:
profiles: ["platform", "maestroDev"]
image: confluentinc/cp-kafka:7.6.1
container_name: kafka
platform: linux/amd64
ports:
- "9092:9092"
- "29092:29092"
volumes:
- ./conductorScripts/services/kafkaSetup.sh:/scripts/kafkaSetup.sh
environment:
# Core Kafka Configuration
KAFKA_PROCESS_ROLES: broker,controller
KAFKA_NODE_ID: 1
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,EXTERNAL://localhost:29092
KAFKA_LISTENERS: PLAINTEXT://kafka:9092,EXTERNAL://0.0.0.0:29092,CONTROLLER://kafka:9093
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka:9093
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
# Storage Configuration
KAFKA_LOG_DIRS: /var/lib/kafka/data
KAFKA_LOG_RETENTION_HOURS: 168 # 7 days
KAFKA_LOG_RETENTION_BYTES: -1 # Unlimited size
# Topic Configuration
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_AUTO_CREATE_TOPICS_ENABLE: false
KAFKA_NUM_PARTITIONS: 1
KAFKA_DEFAULT_REPLICATION_FACTOR: 1
KAFKA_MIN_INSYNC_REPLICAS: 1
# Performance Tuning
KAFKA_MESSAGE_MAX_BYTES: 5242880 # 5MB max message size
KAFKA_REPLICA_FETCH_MAX_BYTES: 5242880
# Logging Configuration
KAFKA_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO"
KAFKA_LOG4J_ROOT_LOGLEVEL: INFO
# Cluster Configuration
CLUSTER_ID: "q1Sh-9_ISia_zwGINzRvyQ"
command: >
sh -c '
echo "Setting up Kafka..."
chmod +x /scripts/kafkaSetup.sh
/scripts/kafkaSetup.sh &
# Start Kafka broker
/etc/confluent/docker/run
'
healthcheck:
test:
- "CMD-SHELL"
- >
/bin/kafka-topics --bootstrap-server kafka:9092 --list
interval: 10s
timeout: 5s
retries: 10
# ======================================
# Song Database
# ======================================
# Postgres database populated with 30 pre-published analyses (metadata files)
# Documentation Link: https://www.overture.bio/documentation/guides/deployment/datamanagement/#running-song
# --------------------------------------
song-db:
profiles: ["platform", "songDev", "scoreDev", "maestroDev"]
depends_on:
- conductor
image: postgres:11.1
container_name: song-db
platform: linux/amd64
ports:
- "5433:5432"
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin123
POSTGRES_DB: songDb
volumes:
- ./persistentStorage/data-song-db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin -d songDb"]
interval: 20s
timeout: 10s
retries: 10
start_period: 20s
# ======================================
# Song
# ======================================
# Metadata management service with a customizable and automated submission validation system
# Documentation Link: https://www.overture.bio/documentation/guides/deployment/datamanagement/#running-song
# --------------------------------------
song:
profiles: ["platform", "scoreDev", "maestroDev"]
image: ghcr.io/overture-stack/song-server:5.2.0
container_name: song
platform: linux/amd64
depends_on:
keycloak:
condition: service_started
kafka:
condition: service_healthy
song-db:
condition: service_healthy
ports:
- "8080:8080"
environment:
# Spring Variables
SPRING_PROFILES_ACTIVE: prod,secure,kafka
# Flyway variables
SPRING_FLYWAY_ENABLED: true
# Song Variables
ID_USELOCAL: true
SCHEMAS_ENFORCELATEST: true
# Score Variables
SCORE_URL: http://score:8087
SCORE_ACCESSTOKEN: 68fb42b4-f1ed-4e8c-beab-3724b99fe528
# Keycloak Variables
AUTH_SERVER_PROVIDER: keycloak
AUTH_SERVER_CLIENTID: dms
AUTH_SERVER_CLIENTSECRET: t016kqXfI648ORoIP5gepqCzqtsRjlcc
AUTH_SERVER_TOKENNAME: apiKey
AUTH_SERVER_KEYCLOAK_HOST: http://keycloak:8080
AUTH_SERVER_KEYCLOAK_REALM: myrealm
AUTH_SERVER_SCOPE_STUDY_PREFIX: STUDY.
AUTH_SERVER_SCOPE_STUDY_SUFFIX: .WRITE
AUTH_SERVER_SCOPE_SYSTEM: song.WRITE
SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWK_SET_URI: http://keycloak:8080/realms/myrealm/protocol/openid-connect/certs
AUTH_SERVER_INTROSPECTIONURI: http://keycloak:8080/realms/myrealm/apikey/check_api_key/
# Postgres Variables
SPRING_DATASOURCE_URL: jdbc:postgresql://song-db:5432/songDb?stringtype=unspecified
SPRING_DATASOURCE_USERNAME: admin
SPRING_DATASOURCE_PASSWORD: admin123
# Kafka Variables
SPRING_KAFKA_BOOTSTRAPSERVERS: kafka:9092
SPRING_KAFKA_TEMPLATE_DEFAULTTOPIC: song-analysis
# Swagger Variable
SWAGGER_ALTERNATEURL: /swagger-api
# ======================================
# Minio
# ======================================
# High-performance open-source object storage provider
# Used here for local object storage found at persistentStorage/data-minio
# data-minio contains 60 data files linked to the pre-populated analyses in the song-db. This folder is passed into the image on startup
# Documentation Link: https://www.overture.bio/documentation/guides/deployment/datamanagement/#setting-up-object-storage
# --------------------------------------
minio:
profiles: ["platform", "scoreDev", "songDev", "maestroDev"]
image: minio/minio:RELEASE.2018-05-11T00-29-24Z
container_name: minio
platform: linux/amd64
ports:
- 9000:9000
environment:
MINIO_ACCESS_KEY: admin
MINIO_SECRET_KEY: admin123
command: server /data
volumes:
- ./persistentStorage/data-minio:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
# ======================================
# Score
# ======================================
# File transfer microservice
# Documentation Link: https://www.overture.bio/documentation/guides/deployment/datamanagement/#running-score
# --------------------------------------
score:
profiles: ["platform", "songDev", "maestroDev"]
image: ghcr.io/overture-stack/score-server:5.11.0
container_name: score
platform: linux/amd64
depends_on:
keycloak:
condition: service_started
ports:
- "8087:8087"
environment:
# Spring Variables
SPRING_PROFILES_ACTIVE: default,collaboratory,prod,secure,jwt
SERVER_PORT: 8087
# Song Variable
METADATA_URL: http://song:8080
# Score Variables
SERVER_SSL_ENABLED: "false"
# Object Storage Variables
S3_ENDPOINT: http://host.docker.internal:9000
S3_ACCESSKEY: admin
S3_SECRETKEY: admin123
S3_SIGV4ENABLED: true
S3_SECURED: false
OBJECT_SENTINEL: heliograph
BUCKET_NAME_OBJECT: object
BUCKET_NAME_STATE: state
UPLOAD_PARTSIZE: 1073741824
UPLOAD_CONNECTION_TIMEOUT: 1200000
# Keycloak Variables
AUTH_SERVER_PROVIDER: keycloak
AUTH_SERVER_CLIENTID: dms
AUTH_SERVER_CLIENTSECRET: t016kqXfI648ORoIP5gepqCzqtsRjlcc
AUTH_SERVER_TOKENNAME: apiKey
AUTH_SERVER_KEYCLOAK_HOST: http://keycloak:8080
AUTH_SERVER_KEYCLOAK_REALM: myrealm
AUTH_SERVER_SCOPE_STUDY_PREFIX: STUDY.
AUTH_SERVER_SCOPE_DOWNLOAD_SUFFIX: .READ
AUTH_SERVER_SCOPE_DOWNLOAD_SYSTEM: score.READ
AUTH_SERVER_SCOPE_UPLOAD_SYSTEM: score.WRITE
AUTH_SERVER_SCOPE_UPLOAD_SUFFIX: .WRITE
AUTH_SERVER_URL: http://keycloak:8080/realms/myrealm/apikey/check_api_key/
AUTH_JWT_PUBLICKEYURL: http://keycloak:8080/oauth/token/public_key
SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWK_SET_URI: http://keycloak:8080/realms/myrealm/protocol/openid-connect/certs
# ==================================================================================
# E. Search (Elasticsearch, Maestro, Arranger)
# ==================================================================================
# ======================================
# Elasticsearch
# ======================================
# Search and analytics engine used to help query massive datasets flexibly and efficiently.
# Documentation Link: https://www.overture.bio/documentation/guides/deployment/dataportal/#setting-up-elasticsearch
# --------------------------------------
elasticsearch:
profiles: ["platform", "stageDev", "arrangerDev", "maestroDev"]
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.1
container_name: elasticsearch
platform: linux/amd64
ports:
- "9200:9200"
environment:
discovery.type: single-node
cluster.name: workflow.elasticsearch
ES_JAVA_OPTS: -Xms512m -Xmx2048m
ELASTIC_PASSWORD: myelasticpassword
xpack.security.enabled: "true"
MANAGE_INDEX_TEMPLATES: "true"
NETWORK_HOST: http://localhost:9200
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "10"
healthcheck:
test: "curl --silent --fail localhost:9200/_cluster/health?wait_for_status=yellow&timeout=50s || exit 1"
interval: 10s
timeout: 10s
retries: 5
start_period: 25s
# ======================================
# Maestro
# ======================================
# Indexing service that transforms metadata in Song into Elasticsearch documents
# Documentation Link: https://www.overture.bio/documentation/guides/deployment/dataportal/#running-maestro
# --------------------------------------
maestro:
profiles: ["platform"]
image: ghcr.io/overture-stack/maestro:4.3.0
container_name: maestro
platform: linux/amd64
depends_on:
song:
condition: service_started
kafka:
condition: service_started
conductor:
condition: service_healthy
ports:
- "11235:11235"
environment:
# Maestro Variables
MAESTRO_FAILURELOG_ENABLED: true
MAESTRO_FAILURELOG_DIR: app/logs/maestro
MAESTRO_LOGGING_LEVEL_ROOT: INFO
MAESTRO_NOTIFICATIONS_SLACK_ENABLED: false
# Song Variables
MAESTRO_REPOSITORIES_0_CODE: song.overture
MAESTRO_REPOSITORIES_0_URL: http://song:8080
MAESTRO_REPOSITORIES_0_NAME: Overture
MAESTRO_REPOSITORIES_0_ORGANIZATION: OICR
MAESTRO_REPOSITORIES_0_COUNTRY: CA
# Elasticsearch Variables
MAESTRO_ELASTICSEARCH_CLUSTER_NODES: http://elasticsearch:9200
MAESTRO_ELASTICSEARCH_CLIENT_BASICAUTH_USER: elastic
MAESTRO_ELASTICSEARCH_CLIENT_BASICAUTH_PASSWORD: myelasticpassword
MAESTRO_ELASTICSEARCH_CLIENT_TRUSTSELFSIGNCERT: true
MAESTRO_ELASTICSEARCH_INDEXES_ANALYSISCENTRIC_ENABLED: false
MAESTRO_ELASTICSEARCH_INDEXES_FILECENTRIC_ENABLED: true
MAESTRO_ELASTICSEARCH_INDEXES_FILECENTRIC_NAME: overture-quickstart-index
MAESTRO_ELASTICSEARCH_INDEXES_FILECENTRIC_ALIAS: file_centric
MAESTRO_ELASTICSEARCH_CLIENT_BASICAUTH_ENABLED: true
MANAGEMENT_HEALTH_ELASTICSEARCH_ENABLED: false
# Spring Variables
SPRING_MVC_ASYNC_REQUESTTIMEOUT: -1
SPRINGDOC_SWAGGERUI_PATH: /swagger-api
# Kafka Variables
SPRING_CLOUD_STREAM_KAFKA_BINDER_BROKERS: kafka:9092
SPRING_CLOUD_STREAM_BINDINGS_SONGINPUT_DESTINATION: song-analysis
# ======================================
# Arranger-Server
# ======================================
# Search API generation with compatible search UI components
# Documentation Link: https://www.overture.bio/documentation/guides/deployment/dataportal/#running-arranger
# --------------------------------------
arranger-server:
profiles: ["platform", "stageDev"]
image: ghcr.io/overture-stack/arranger-server:3.0.0-beta.33
container_name: arranger-server
platform: linux/amd64
depends_on:
conductor:
condition: service_healthy
ports:
- "5050:5050"
volumes:
- ./configurationFiles/arrangerConfigs/base.json:/app/modules/server/configs/base.json
- ./configurationFiles/arrangerConfigs/extended.json:/app/modules/server/configs/extended.json
- ./configurationFiles/arrangerConfigs/facets.json:/app/modules/server/configs/facets.json
- ./configurationFiles/arrangerConfigs/matchbox.json:/app/modules/server/configs/matchbox.json
- ./configurationFiles/arrangerConfigs/table.json:/app/modules/server/configs/table.json
environment:
# Arranger Variables
ENABLE_LOGS: false
# Elasticsearch Variables
ES_HOST: http://elasticsearch:9200
ES_USER: elastic
ES_PASS: myelasticpassword
# ==================================================================================
# F. Discovery (Stage)
# ==================================================================================
# ======================================
# Stage
# ======================================
# The react-based, front end portal UI for Overture
# Documentation Link: https://www.overture.bio/documentation/guides/deployment/dataportal/#setting-up-stage
# --------------------------------------
stage:
profiles: ["platform", "arrangerDev"]
image: ghcr.io/overture-stack/stage:a211593
container_name: stage
platform: linux/amd64
depends_on:
conductor:
condition: service_healthy
ports:
- "3000:3000"
environment:
# Stage Variables
NEXTAUTH_URL: http://localhost:3000/api/auth
NEXT_PUBLIC_LAB_NAME: Overture QuickStart Portal
NEXT_PUBLIC_ADMIN_EMAIL: [email protected]
NEXT_PUBLIC_DEBUG: true
NEXT_PUBLIC_SHOW_MOBILE_WARNING: true
# Keycloak Variables
NEXT_PUBLIC_AUTH_PROVIDER: keycloak
ACCESSTOKEN_ENCRYPTION_SECRET: super_secret
SESSION_ENCRYPTION_SECRET: this_is_a_super_secret_secret
NEXT_PUBLIC_KEYCLOAK_HOST: http://keycloak:8080
NEXT_PUBLIC_KEYCLOAK_REALM: myrealm
NEXT_PUBLIC_KEYCLOAK_CLIENT_ID: webclient
KEYCLOAK_CLIENT_SECRET: ikksyrYaKX07acf4hpGrpKWcUGaFkEdM
NEXT_PUBLIC_KEYCLOAK_PERMISSION_AUDIENCE: dms
# Arranger Variables
NEXT_PUBLIC_ARRANGER_DOCUMENT_TYPE: file
NEXT_PUBLIC_ARRANGER_INDEX: file_centric
NEXT_PUBLIC_ARRANGER_API_URL: http://arranger-server:5050
NEXT_PUBLIC_ARRANGER_MANIFEST_COLUMNS: repositories.code, analysis.analysis_id, object_id, study_id, file_type, file.name, file.size, file.md5sum, file.index_file.object_id, donors.donor_id, donors.specimens.samples.sample_id