forked from project-koku/koku
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
604 lines (586 loc) · 21.8 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
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
version: '3'
services:
koku-base:
image: koku_base
build:
context: .
args:
GIT_COMMIT: ${GIT_COMMIT-local-dev}
PIPENV_DEV: "True"
USER_ID: ${USER_ID-1000}
command: "echo 'Base Image Should Not Run'"
depends_on:
- db
- redis
- unleash
koku-server:
container_name: koku_server
image: koku_base
working_dir: /koku
entrypoint:
- /koku/run_server.sh
environment:
- DATABASE_SERVICE_NAME=POSTGRES_SQL
- DATABASE_ENGINE=postgresql
- DATABASE_NAME=${DATABASE_NAME-postgres}
- POSTGRES_SQL_SERVICE_HOST=db
- POSTGRES_SQL_SERVICE_PORT=5432
- DATABASE_USER=${DATABASE_USER-postgres}
- DATABASE_PASSWORD=${DATABASE_PASSWORD-postgres}
- KOKU_SOURCES_CLIENT_HOST=${KOKU_SOURCES_CLIENT_HOST-sources-client}
- KOKU_SOURCES_CLIENT_PORT=${KOKU_SOURCES_CLIENT_PORT-9000}
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- DJANGO_READ_DOT_ENV_FILE=True
- DEVELOPMENT=${DEVELOPMENT-True}
- RBAC_SERVICE_HOST=${RBAC_SERVICE_HOST-rbac-server}
- RBAC_SERVICE_PORT=${RBAC_SERVICE_PORT-9000}
- RBAC_SERVICE_PATH=${RBAC_SERVICE_PATH-/r/insights/platform/rbac/v1/access/}
- REDIS_HOST=${REDIS_HOST-redis}
- REDIS_PORT=${REDIS_PORT-6379}
- RABBITMQ_HOST=${RABBITMQ_HOST-koku-rabbit}
- RABBITMQ_PORT=5672
- USE_RABBIT=${USE_RABBIT-False}
- RBAC_CACHE_TTL
- PROMETHEUS_MULTIPROC_DIR=/tmp
- API_PATH_PREFIX=${API_PATH_PREFIX-/api/cost-management}
- GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS-}
- DEMO_ACCOUNTS
- ACCOUNT_ENHANCED_METRICS=${ACCOUNT_ENHANCED_METRICS-False}
- RUN_GUNICORN=${RUN_GUNICORN-}
- POD_CPU_LIMIT=${POD_CPU_LIMIT-1}
- GUNICORN_THREADS=${GUNICORN_THREADS-False}
- RETAIN_NUM_MONTHS=${RETAIN_NUM_MONTHS-4}
- NOTIFICATION_CHECK_TIME=${NOTIFICATION_CHECK_TIME-24}
- UNLEASH_HOST=${UNLEASH_HOST-unleash}
- UNLEASH_PORT=${UNLEASH_PORT-4242}
- UNLEASH_LOG_LEVEL=${UNLEASH_LOG_LEVEL-WARNING}
- OCI_CLI_USER=${OCI_CLI_USER}
- OCI_CLI_FINGERPRINT=${OCI_CLI_FINGERPRINT}
- OCI_CLI_TENANCY=${OCI_CLI_TENANCY}
- OCI_CLI_KEY_FILE=${OCI_CLI_KEY_FILE}
- OCI_PYTHON_SDK_NO_SERVICE_IMPORTS=True
- QE_SCHEMA=${QE_SCHEMA}
- ENHANCED_ORG_ADMIN=${ENHANCED_ORG_ADMIN-True}
ports:
- 8000:8000
- 8001:9000
volumes:
- './koku:/koku/koku'
- './.unleash:/koku/.unleash'
- './db_functions:/koku/db_functions'
- './scripts:/koku/scripts'
- './run_server.sh:/koku/run_server.sh'
- './testing/auth_files/:/testing/auth_files/'
depends_on:
- koku-base
masu-server:
container_name: masu_server
image: koku_base
working_dir: /koku
entrypoint:
- /koku/run_server.sh
environment:
- MASU=True
- DATABASE_SERVICE_NAME=POSTGRES_SQL
- DATABASE_ENGINE=postgresql
- DATABASE_NAME=${DATABASE_NAME-postgres}
- POSTGRES_SQL_SERVICE_HOST=db
- POSTGRES_SQL_SERVICE_PORT=5432
- DATABASE_USER=${DATABASE_USER-postgres}
- DATABASE_PASSWORD=${DATABASE_PASSWORD-postgres}
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- DJANGO_READ_DOT_ENV_FILE=True
- DEVELOPMENT=${DEVELOPMENT-True}
- RBAC_SERVICE_HOST=${RBAC_SERVICE_HOST-rbac-server}
- RBAC_SERVICE_PORT=${RBAC_SERVICE_PORT-9000}
- RBAC_SERVICE_PATH=${RBAC_SERVICE_PATH-/r/insights/platform/rbac/v1/access/}
- REDIS_HOST=${REDIS_HOST-redis}
- REDIS_PORT=${REDIS_PORT-6379}
- RABBITMQ_HOST=${RABBITMQ_HOST-koku-rabbit}
- RABBITMQ_PORT=5672
- USE_RABBIT=${USE_RABBIT-False}
- RBAC_CACHE_TTL
- PROMETHEUS_MULTIPROC_DIR=/tmp
- API_PATH_PREFIX=${API_PATH_PREFIX-/api/cost-management}
- ACCOUNT_ENHANCED_METRICS=${ACCOUNT_ENHANCED_METRICS-False}
- SOURCES_API_SVC_HOST=${SOURCES_API_HOST-sources}
- SOURCES_API_SVC_PORT=${SOURCES_API_PORT-3000}
- SOURCES_API_PREFIX=${SOURCES_API_PREFIX-/api/sources/v1.0}
- SOURCES_PSK=${SOURCES_PSK-thisMustBeEphemeralOrMinikube}
- MASU_DATE_OVERRIDE
- RUN_GUNICORN=${RUN_GUNICORN-}
- POD_CPU_LIMIT=${POD_CPU_LIMIT-1}
- GUNICORN_THREADS=${GUNICORN_THREADS-False}
- RETAIN_NUM_MONTHS=${RETAIN_NUM_MONTHS-4}
- NOTIFICATION_CHECK_TIME=${NOTIFICATION_CHECK_TIME-24}
- UNLEASH_HOST=${UNLEASH_HOST-unleash}
- UNLEASH_PORT=${UNLEASH_PORT-4242}
- UNLEASH_LOG_LEVEL=${UNLEASH_LOG_LEVEL-WARNING}
- GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS-}
- OCI_CLI_USER=${OCI_CLI_USER}
- OCI_CLI_FINGERPRINT=${OCI_CLI_FINGERPRINT}
- OCI_CLI_TENANCY=${OCI_CLI_TENANCY}
- OCI_CLI_KEY_FILE=${OCI_CLI_KEY_FILE}
- OCI_PYTHON_SDK_NO_SERVICE_IMPORTS=True
- ENHANCED_ORG_ADMIN=${ENHANCED_ORG_ADMIN-True}
- PRESTO_HOST=${PRESTO_HOST-trino}
- PRESTO_PORT=${PRESTO_PORT-8080}
ports:
- 5042:8000
- 5001:9000
volumes:
- './koku:/koku/koku'
- './.unleash:/koku/.unleash'
- './db_functions:/koku/db_functions'
- './scripts:/koku/scripts'
- './run_server.sh:/koku/run_server.sh'
- './testing/auth_files/:/testing/auth_files/'
depends_on:
- koku-base
koku-worker:
hostname: koku-worker-1
image: koku_base
working_dir: /koku/koku
entrypoint: ['watchmedo', 'auto-restart', '--directory=./', '--pattern=*.py', '--ignore-patterns=*test*', '--recursive', '--', 'celery', '-A', 'koku', 'worker', '--without-gossip', '-l', 'info', '-Q', 'celery,download,hcs,ocp,priority,summary,cost_model,refresh']
environment:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- DATABASE_SERVICE_NAME=POSTGRES_SQL
- DATABASE_ENGINE=postgresql
- DATABASE_NAME=${DATABASE_NAME-postgres}
- POSTGRES_SQL_SERVICE_HOST=db
- POSTGRES_SQL_SERVICE_PORT=5432
- DATABASE_USER=${DATABASE_USER-postgres}
- DATABASE_PASSWORD=${DATABASE_PASSWORD-postgres}
- REDIS_HOST=${REDIS_HOST-redis}
- REDIS_PORT=${REDIS_PORT-6379}
- RABBITMQ_HOST=${RABBITMQ_HOST-koku-rabbit}
- RABBITMQ_PORT=5672
- USE_RABBIT=${USE_RABBIT-False}
- DEVELOPMENT=${DEVELOPMENT-True}
- CELERY_LOG_LEVEL=${CELERY_LOG_LEVEL-INFO}
- DJANGO_LOG_LEVEL=${DJANGO_LOG_LEVEL-INFO}
- UNLEASH_LOG_LEVEL=${UNLEASH_LOG_LEVEL-WARNING}
- DJANGO_SETTINGS_MODULE=koku.settings
- PROMETHEUS_MULTIPROC_DIR=/tmp
- PROMETHEUS_PUSHGATEWAY=${PROMETHEUS_PUSHGATEWAY-pushgateway:9091}
- ENABLE_S3_ARCHIVING=${ENABLE_S3_ARCHIVING-False}
- ENABLE_HCS_DEBUG=${ENABLE_HCS_DEBUG-False}
- S3_BUCKET_NAME=${S3_BUCKET_NAME-koku-bucket}
- S3_BUCKET_PATH=${S3_BUCKET_PATH-data_archive}
- S3_ENDPOINT
- S3_ACCESS_KEY
- S3_SECRET
- PVC_DIR=${PVC_DIR-/testing/pvc_dir}
- GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS-}
- KOKU_CELERY_ENABLE_SENTRY
- KOKU_CELERY_SENTRY_DSN
- KOKU_SENTRY_ENVIRONMENT=development
- DEMO_ACCOUNTS
- INITIAL_INGEST_OVERRIDE=${INITIAL_INGEST_OVERRIDE-False}
- INITIAL_INGEST_NUM_MONTHS=${INITIAL_INGEST_NUM_MONTHS-2}
- AUTO_DATA_INGEST=${AUTO_DATA_INGEST-True}
- REPORT_PROCESSING_BATCH_SIZE=${REPORT_PROCESSING_BATCH_SIZE-100000}
- PRESTO_HOST=${PRESTO_HOST-trino}
- PRESTO_PORT=${PRESTO_PORT-8080}
- SOURCES_API_HOST=${SOURCES_API_HOST-sources-server}
- SOURCES_API_PORT=${SOURCES_API_PORT-3000}
- DATE_OVERRIDE
- TRINO_DATE_STEP=${TRINO_DATE_STEP-31}
- MAX_CELERY_TASKS_PER_WORKER=${MAX_CELERY_TASKS_PER_WORKER-10}
- RETAIN_NUM_MONTHS=${RETAIN_NUM_MONTHS-4}
- NOTIFICATION_CHECK_TIME=${NOTIFICATION_CHECK_TIME-24}
- UNLEASH_HOST=${UNLEASH_HOST-unleash}
- UNLEASH_PORT=${UNLEASH_PORT-4242}
- OCI_CLI_USER=${OCI_CLI_USER}
- OCI_CLI_FINGERPRINT=${OCI_CLI_FINGERPRINT}
- OCI_CLI_TENANCY=${OCI_CLI_TENANCY}
- OCI_CLI_KEY_FILE=${OCI_CLI_KEY_FILE}
- OCI_PYTHON_SDK_NO_SERVICE_IMPORTS=True
- ENHANCED_ORG_ADMIN=${ENHANCED_ORG_ADMIN-True}
ports:
- 6001-6020:9000
volumes:
- './koku:/koku/koku'
- './.unleash:/koku/.unleash'
- './db_functions:/koku/db_functions'
- './scripts:/koku/scripts'
- './testing:/testing'
- './testing/local_providers/azure_local:/tmp/local_container'
- './testing/local_providers/oci_local:/tmp/oci_local'
- './testing/local_providers/aws_local:/tmp/local_bucket'
- './testing/local_providers/aws_local_0:/tmp/local_bucket_0'
- './testing/local_providers/aws_local_1:/tmp/local_bucket_1'
- './testing/local_providers/aws_local_2:/tmp/local_bucket_2'
- './testing/local_providers/aws_local_3:/tmp/local_bucket_3'
- './testing/local_providers/aws_local_4:/tmp/local_bucket_4'
- './testing/local_providers/aws_local_5:/tmp/local_bucket_5'
- './testing/local_providers/insights_local:/var/tmp/masu/insights_local'
- './testing/local_providers/gcp_local/:/tmp/gcp_local_bucket'
- './testing/local_providers/gcp_local_0/:/tmp/gcp_local_bucket_0'
- './testing/local_providers/gcp_local_1/:/tmp/gcp_local_bucket_1'
- './testing/local_providers/gcp_local_2/:/tmp/gcp_local_bucket_2'
- './testing/local_providers/gcp_local_3/:/tmp/gcp_local_bucket_3'
- './testing/auth_files/:/testing/auth_files/'
depends_on:
- koku-base
koku-listener:
container_name: koku_listener
image: koku_base
working_dir: /koku/
entrypoint: ['watchmedo', 'auto-restart', '--directory=./koku', '--pattern=*.py', '--ignore-patterns=*test*', '--recursive', '--', 'python', 'koku/manage.py', 'listener']
environment:
- DJANGO_READ_DOT_ENV_FILE=True
- DATABASE_SERVICE_NAME=POSTGRES_SQL
- POSTGRES_SQL_SERVICE_HOST=db
- POSTGRES_SQL_SERVICE_PORT=5432
- DATABASE_ENGINE=postgresql
- DATABASE_NAME=${DATABASE_NAME-postgres}
- DATABASE_HOST=db
- DATABASE_PORT=5432
- RABBITMQ_HOST=${RABBITMQ_HOST-koku-rabbit}
- RABBITMQ_PORT=5672
- USE_RABBIT=${USE_RABBIT-False}
- DATABASE_USER=${DATABASE_USER-postgres}
- DATABASE_PASSWORD=${DATABASE_PASSWORD-postgres}
- REDIS_HOST=${REDIS_HOST-redis}
- REDIS_PORT=${REDIS_PORT-6379}
- INSIGHTS_KAFKA_HOST=kafka
- INSIGHTS_KAFKA_PORT=29092
- KAFKA_CONNECT=True
- PROMETHEUS_MULTIPROC_DIR=/tmp
- MASU_DATE_OVERRIDE
- KOKU_LOG_LEVEL=${KOKU_LOG_LEVEL-INFO}
- DJANGO_LOG_LEVEL=${DJANGO_LOG_LEVEL-INFO}
- UNLEASH_LOG_LEVEL=${UNLEASH_LOG_LEVEL-WARNING}
- INITIAL_INGEST_NUM_MONTHS=1
- PYTHONPATH=/koku/koku
- ENABLE_S3_ARCHIVING=${ENABLE_S3_ARCHIVING-False}
- S3_BUCKET_NAME=${S3_BUCKET_NAME-koku-bucket}
- S3_BUCKET_PATH=${S3_BUCKET_PATH-data_archive}
- S3_ENDPOINT
- S3_ACCESS_KEY
- S3_SECRET
- PRESTO_HOST=${PRESTO_HOST-trino}
- PRESTO_PORT=${PRESTO_PORT-8080}
- UNLEASH_HOST=${UNLEASH_HOST-unleash}
- UNLEASH_PORT=${UNLEASH_PORT-4242}
- ENHANCED_ORG_ADMIN=${ENHANCED_ORG_ADMIN-True}
ports:
- 7001-7020:9000
volumes:
- './koku:/koku/koku'
- './.unleash:/koku/.unleash'
- './db_functions:/koku/db_functions'
- './scripts:/koku/scripts'
depends_on:
- koku-base
sources-client:
container_name: sources_client
image: koku_base
restart: on-failure:25
working_dir: /koku/
entrypoint: ['watchmedo', 'auto-restart', '--directory=./koku', '--pattern=*.py', '--ignore-patterns=*test*', '--recursive', '--', 'python', 'koku/manage.py', 'sources']
environment:
- DJANGO_READ_DOT_ENV_FILE=True
- SOURCES=True
- DATABASE_SERVICE_NAME=POSTGRES_SQL
- DATABASE_ENGINE=postgresql
- DATABASE_NAME=${DATABASE_NAME-postgres}
- POSTGRES_SQL_SERVICE_HOST=db
- POSTGRES_SQL_SERVICE_PORT=5432
- DATABASE_USER=${DATABASE_USER-postgres}
- DATABASE_PASSWORD=${DATABASE_PASSWORD-postgres}
- KOKU_API_HOST=${KOKU_API_HOST-koku-server}
- KOKU_API_PORT=${KOKU_API_PORT-8000}
- KOKU_API_PATH_PREFIX=${KOKU_API_PATH_PREFIX-/api/cost-management/v1}
- SOURCES_API_SVC_HOST=${SOURCES_API_HOST-sources-server}
- SOURCES_API_SVC_PORT=${SOURCES_API_PORT-3000}
- RABBITMQ_HOST=${RABBITMQ_HOST-koku-rabbit}
- RABBITMQ_PORT=5672
- REDIS_HOST=${REDIS_HOST-redis}
- REDIS_PORT=${REDIS_PORT-6379}
- INSIGHTS_KAFKA_HOST=${INSIGHTS_KAFKA_HOST-kafka}
- INSIGHTS_KAFKA_PORT=${INSIGHTS_KAFKA_PORT-29092}
- KOKU_SOURCES_CLIENT_PORT=${KOKU_SOURCES_CLIENT_PORT-9000}
- GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS-}
- DEMO_ACCOUNTS
- PROMETHEUS_MULTIPROC_DIR=/tmp
- KOKU_LOG_LEVEL=${KOKU_LOG_LEVEL-DEBUG}
- DJANGO_LOG_LEVEL=${DJANGO_LOG_LEVEL-INFO}
- UNLEASH_LOG_LEVEL=${UNLEASH_LOG_LEVEL-WARNING}
- SOURCES_API_PREFIX=${SOURCES_API_PREFIX-/api/sources/v1.0}
- SOURCES_PSK=${SOURCES_PSK-thisMustBeEphemeralOrMinikube}
- AUTO_DATA_INGEST=${AUTO_DATA_INGEST-True}
- RUN_GUNICORN=${RUN_GUNICORN-}
- POD_CPU_LIMIT=${POD_CPU_LIMIT-1}
- GUNICORN_THREADS=${GUNICORN_THREADS-False}
- UNLEASH_HOST=${UNLEASH_HOST-unleash}
- UNLEASH_PORT=${UNLEASH_PORT-4242}
- OCI_CLI_USER=${OCI_CLI_USER}
- OCI_CLI_FINGERPRINT=${OCI_CLI_FINGERPRINT}
- OCI_CLI_TENANCY=${OCI_CLI_TENANCY}
- OCI_CLI_KEY_FILE=${OCI_CLI_KEY_FILE}
- OCI_PYTHON_SDK_NO_SERVICE_IMPORTS=True
- ENHANCED_ORG_ADMIN=${ENHANCED_ORG_ADMIN-True}
ports:
- 4000:8000
- 4001:9000
volumes:
- './koku:/koku/koku'
- './.unleash:/koku/.unleash'
- './db_functions:/koku/db_functions'
- './scripts:/koku/scripts'
- './testing/auth_files/:/testing/auth_files/'
depends_on:
- koku-base
koku-beat:
container_name: koku_beat
hostname: koku_beat
image: koku_base
working_dir: /koku/koku
entrypoint: ['celery', '--pidfile=', '-A', 'koku', 'beat', '-l', 'info']
environment:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- DATABASE_SERVICE_NAME=POSTGRES_SQL
- DATABASE_ENGINE=postgresql
- DATABASE_NAME=${DATABASE_NAME-postgres}
- POSTGRES_SQL_SERVICE_HOST=db
- POSTGRES_SQL_SERVICE_PORT=5432
- DATABASE_USER=${DATABASE_USER-postgres}
- DATABASE_PASSWORD=${DATABASE_PASSWORD-postgres}
- REDIS_HOST=${REDIS_HOST-redis}
- REDIS_PORT=${REDIS_PORT-6379}
- RABBITMQ_HOST=${RABBITMQ_HOST-koku-rabbit}
- RABBITMQ_PORT=5672
- USE_RABBIT=${USE_RABBIT-False}
- LOG_LEVEL=INFO
- DJANGO_SETTINGS_MODULE=koku.settings
- PROMETHEUS_MULTIPROC_DIR=/tmp
- SCHEDULE_REPORT_CHECKS=True
- REPORT_DOWNLOAD_SCHEDULE="0 4,16 * * *"
- SOURCE_STATUS_FREQUENCY_MINUTES
- UPLOAD_NORMALIZED_DATA_INTERVAL=10000000
- UNLEASH_HOST=${UNLEASH_HOST-unleash}
- UNLEASH_PORT=${UNLEASH_PORT-4242}
- ENHANCED_ORG_ADMIN=${ENHANCED_ORG_ADMIN-True}
volumes:
- './koku:/koku/koku'
- './.unleash:/koku/.unleash'
- './db_functions:/koku/db_functions'
- './scripts:/koku/scripts'
depends_on:
- koku-base
### Utilities
db:
container_name: koku_db
image: postgres:13
environment:
- POSTGRES_DB=${DATABASE_NAME-postgres}
- POSTGRES_USER=${DATABASE_USER-postgres}
- POSTGRES_PASSWORD=${DATABASE_PASSWORD-postgres}
- _PG_CREATE_DATABASES=${DATABASE_NAME-postgres}|${DATABASE_USER-postgres},unleash|${DATABASE_USER-postgres}
ports:
- 15432:5432
volumes:
- ./pg_data:/var/lib/${DATABASE_DATA_DIR-postgresql}/data
- ./pg_init:/docker-entrypoint-initdb.d
command:
# This command give more precise control over the parameter settings
# Included are loading the pg_stat_statements lib
# as well as autovacuum settings that are designed to make more efficient
# use of the autovacuum processes
# The pg_init mount is still needed to enable the necesary extensions.
- postgres
- -c
- ssl=on
- -c
- ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
- -c
- ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
- -c
- max_connections=1710
- -c
- shared_preload_libraries=pg_stat_statements
- -c
- autovacuum_max_workers=8
- -c
- autovacuum_vacuum_cost_limit=4800
- -c
- autovacuum_vacuum_cost_delay=10
- -c
- max_locks_per_transaction=72
- -c
- pg_stat_statements.max=2000
- -c
- pg_stat_statements.save=off
- -c
- pg_stat_statements.track_utility=off
- -c
- track_activity_query_size=2048
- -c
- track_functions=pl
- -c
- log_min_error_statement=error
- -c
- log_min_duration_statement=2000
- -c
- logging_collector=on
# Log line prefix (this matches RDS):
# %t = timestamp without milliseconds
# %r = remote host name/ip and remote port
# %u = user name
# %d = database name
# %p = process id (postgres backend)
- -c
- "log_line_prefix=%t:%r:%u@%d:[%p]:"
# Change mod to all to log all statements including SELECT
- -c
- log_statement=mod
# Uncomment this to get duration information on all statements, whether
# the statement is logged or not.
# - -c
# - log_duration=true
# Uncomment this parameter to get statistics details in the logs
# This will really increase the log file size
# - -c
# - log_statement_stats=true
redis:
container_name: koku_redis
image: redis:5.0.4
ports:
- 6379:6379
pushgateway:
container_name: koku-pushgateway
image: prom/pushgateway
ports:
- 9091:9091
pgadmin:
container_name: pgAdmin
image: dpage/pgadmin4
environment:
- PGADMIN_DEFAULT_EMAIL=${[email protected]}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_PASSWORD-postgres}
ports:
- "${PGADMIN_PORT-8432}:80"
volumes:
- ./pgadmin_servers.json:/pgadmin4/servers.json
grafana:
container_name: koku_grafana
build:
context: grafana
dockerfile: Dockerfile-grafana
ports:
- 3001:3000
depends_on:
- db
unleash:
container_name: koku-unleash
image: unleashorg/unleash-server:3.9 # 3.9 to match clowder
environment:
- AUTH_ENABLE_API_TOKEN=true
- CHECK_VERSION=false
- DATABASE_HOST=db
- DATABASE_NAME=unleash
- DATABASE_USERNAME=${DATABASE_USER-postgres}
- DATABASE_PASSWORD=${DATABASE_PASSWORD-postgres}
- DATABASE_SSL=false
- IMPORT_DROP_BEFORE_IMPORT=false
- IMPORT_FILE=/.unleash/flags.json
- LOG_LEVEL=INFO
ports:
- 4242:4242
volumes:
- './.unleash:/.unleash'
depends_on:
- db
koku-minio:
image: local-minio:latest
build:
context: .
dockerfile: Dockerfile.minio
container_name: kokuminio
environment:
MINIO_ROOT_USER: kokuminioaccess
MINIO_ROOT_PASSWORD: kokuminiosecret
ports:
- 9000:9000
- 9090:9090
command: server /data --console-address ":9090"
volumes:
- ./.trino/parquet_data:/data
koku-create-parquet-bucket:
image: minio/mc:latest
depends_on:
- koku-minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host rm local;
/usr/bin/mc config host add --quiet --api s3v4 local http://kokuminio:9000 kokuminioaccess kokuminiosecret;
/usr/bin/mc rb --force local/koku-bucket/;
/usr/bin/mc mb --quiet local/koku-bucket/;
/usr/bin/mc policy set public local/koku-bucket;
/usr/bin/mc rb --force local/metastore/;
/usr/bin/mc mb --quiet local/metastore/;
/usr/bin/mc policy set public local/metastore;
"
hive-metastore:
container_name: hive-metastore
image: quay.io/cloudservices/ubi-hive:3.1.2-metastore-008
ports:
- 9083:8000
environment:
- HIVE_LOGLEVEL=INFO
- S3_HOST=kokuminio
- S3_PORT=9000
- S3_ACCESS_KEY=${S3_ACCESS_KEY-kokuminioaccess}
- S3_SECRET=${S3_SECRET-kokuminiosecret}
- S3_BUCKET_NAME=${S3_BUCKET_NAME-koku-bucket}
- S3_BUCKET_PATH=${S3_BUCKET_PATH-data}
- POSTGRES_SQL_SERVICE_HOST=db
- POSTGRES_SQL_SERVICE_PORT=5432
- DATABASE_NAME=${DATABASE_NAME-hive}
- DATABASE_USER=${DATABASE_USER-hive}
- DATABASE_PASSWORD=${DATABASE_PASSWORD-hive}
depends_on:
- koku-create-parquet-bucket
trino:
container_name: trino
image: quay.io/cloudservices/ubi-trino:latest
user: root
ports:
- 8080:8080
- 10000:10000
environment:
- MY_NODE_ID=${MY_NODE_ID-localhost}
- LOCAL=TRUE
- TRINO_LOG_LEVEL=${LOG_LEVEL-INFO}
- AWS_ACCESS_KEY_ID=${S3_ACCESS_KEY-kokuminioaccess}
- AWS_SECRET_ACCESS_KEY=${S3_SECRET-kokuminiosecret}
- S3_ENDPOINT=${S3_ENDPOINT-http://kokuminio:9000}
- S3_BUCKET_NAME=${S3_BUCKET_NAME-koku-bucket}
- S3_ACCESS_KEY=${S3_ACCESS_KEY-kokuminioaccess}
- S3_SECRET=${S3_SECRET-kokuminiosecret}
- DATABASE_NAME=${DATABASE_NAME-postgres}
- DATABASE_USER=${DATABASE_USER-postgres}
- DATABASE_PASSWORD=${DATABASE_PASSWORD-postgres}
volumes:
- ./deploy/trino/etc/config.properties:/etc/trino/config.properties
- ./deploy/trino/etc/jvm.config:/etc/trino/jvm.config
- ./deploy/trino/etc/log.properties:/etc/trino/log.properties
- ./deploy/trino/etc/catalog/hive.properties:/etc/trino/catalog/hive.properties
- ./deploy/trino/etc/catalog/postgres.properties:/etc/trino/catalog/postgres.properties
- ./deploy/hadoop/hadoop-config/core-site.xml:/etc/trino/hadoop-config/core-site.xml
- ./.trino/trino/trino-data:/data/trino/data
- ./.trino/trino/trino-logs:/data/trino/logs
links:
- hive-metastore
depends_on:
- hive-metastore
ulimits:
nofile:
soft: 4096
hard: 4096