-
Notifications
You must be signed in to change notification settings - Fork 92
/
docker-compose.yml
687 lines (668 loc) · 25.4 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
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
name: koku
services:
koku-base:
image: koku_base
build:
context: .
args:
GIT_COMMIT: ${GIT_COMMIT-local-dev}
PIPENV_DEV: "True"
USER_ID: ${USER_ID:?}
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}
- 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}
- RBAC_CACHE_TTL
- PROMETHEUS_MULTIPROC_DIR=/tmp
- API_PATH_PREFIX=${API_PATH_PREFIX-/api/cost-management}
- MAX_GROUP_BY_OVERRIDE=${MAX_GROUP_BY_OVERRIDE-3}
- AWS_SHARED_CREDENTIALS_FILE=${AWS_SHARED_CREDENTIALS_FILE-}
- GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS-}
- OCI_SHARED_CREDENTIALS_FILE=${OCI_SHARED_CREDENTIALS_FILE-}
- OCI_CLI_KEY_FILE=${OCI_CLI_KEY_FILE-}
- OCI_PYTHON_SDK_NO_SERVICE_IMPORTS=True
- DEMO_ACCOUNTS
- ACCOUNT_ENHANCED_METRICS=${ACCOUNT_ENHANCED_METRICS-False}
- RUN_GUNICORN=${RUN_GUNICORN-}
- POD_CPU_LIMIT=${POD_CPU_LIMIT-1}
- GUNICORN_WORKERS=${GUNICORN_WORKERS-3}
- 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_PREFIX=${UNLEASH_PREFIX-http}
- UNLEASH_PORT=${UNLEASH_PORT-4242}
- UNLEASH_TOKEN=${UNLEASH_TOKEN:?}
- UNLEASH_LOG_LEVEL=${UNLEASH_LOG_LEVEL-WARNING}
- QE_SCHEMA=${QE_SCHEMA}
- ENHANCED_ORG_ADMIN=${ENHANCED_ORG_ADMIN-True}
- TAG_ENABLED_LIMIT=${TAG_ENABLED_LIMIT-200}
- DELAYED_TASK_TIME=${DELAYED_TASK_TIME-20}
- DELAYED_TASK_POLLING_MINUTES=${DELAYED_TASK_POLLING_MINUTES-5}
ports:
- 8000:8000
- 8001:9000
volumes:
- './koku:/koku/koku'
- './dev/containers/unleash:/koku/.unleash'
- './db_functions:/koku/db_functions'
- './scripts:/koku/scripts'
- './run_server.sh:/koku/run_server.sh'
- './dev/credentials:/etc/credentials'
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}
- S3_BUCKET_NAME_OCP_INGRESS=${S3_BUCKET_NAME_OCP_INGRESS-ocp-ingress}
- S3_BUCKET_NAME=${S3_BUCKET_NAME-koku-bucket}
- S3_ENDPOINT
- S3_ACCESS_KEY
- S3_SECRET
- 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}
- 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_WORKERS=${GUNICORN_WORKERS-3}
- 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_PREFIX=${UNLEASH_PREFIX-http}
- UNLEASH_PORT=${UNLEASH_PORT-4242}
- UNLEASH_TOKEN=${UNLEASH_TOKEN:?}
- UNLEASH_LOG_LEVEL=${UNLEASH_LOG_LEVEL-WARNING}
- AWS_SHARED_CREDENTIALS_FILE=${AWS_SHARED_CREDENTIALS_FILE-}
- GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS-}
- OCI_SHARED_CREDENTIALS_FILE=${OCI_SHARED_CREDENTIALS_FILE-}
- OCI_CLI_KEY_FILE=${OCI_CLI_KEY_FILE-}
- OCI_PYTHON_SDK_NO_SERVICE_IMPORTS=True
- ENHANCED_ORG_ADMIN=${ENHANCED_ORG_ADMIN-True}
- TRINO_HOST=${TRINO_HOST-trino}
- TRINO_PORT=${TRINO_PORT-8080}
- TAG_ENABLED_LIMIT=${TAG_ENABLED_LIMIT-200}
ports:
- 5042:8000
- 5001:9000
volumes:
- './koku:/koku/koku'
- './dev/containers/unleash:/koku/.unleash'
- './db_functions:/koku/db_functions'
- './scripts:/koku/scripts'
- './run_server.sh:/koku/run_server.sh'
- './dev/credentials:/etc/credentials'
depends_on:
- koku-base
koku-worker:
hostname: koku-worker-1
image: koku_base
working_dir: /koku/koku
entrypoint:
- python
- manage.py
- restart_celery
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}
- REDIS_HOST=${REDIS_HOST-redis}
- REDIS_PORT=${REDIS_PORT-6379}
- DEBUG_ATTACH=${DEBUG_ATTACH-False}
- DEVELOPMENT=${DEVELOPMENT-True}
- KOKU_LOG_LEVEL=${KOKU_LOG_LEVEL-DEBUG}
- 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}
- ENABLE_SUBS_DEBUG=${ENABLE_SUBS_DEBUG-False}
- ENABLE_SUBS_PROVIDER_TYPES=${ENABLE_SUBS_PROVIDER_TYPES}
- ENABLE_ROS_DEBUG=${ENABLE_ROS_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
- DATA_DIR=${DATA_DIR-/testing/data}
- AWS_SHARED_CREDENTIALS_FILE=${AWS_SHARED_CREDENTIALS_FILE-}
- GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS-}
- OCI_SHARED_CREDENTIALS_FILE=${OCI_SHARED_CREDENTIALS_FILE-}
- OCI_CLI_KEY_FILE=${OCI_CLI_KEY_FILE-}
- OCI_PYTHON_SDK_NO_SERVICE_IMPORTS=True
- DEMO_ACCOUNTS
- INITIAL_INGEST_OVERRIDE=${INITIAL_INGEST_OVERRIDE-False}
- INITIAL_INGEST_NUM_MONTHS=${INITIAL_INGEST_NUM_MONTHS-2}
- POLLING_TIMER=${POLLING_TIMER-60}
- PROCESSING_WAIT_TIMER=${PROCESSING_WAIT_TIMER-3}
- LARGE_PROCESSING_WAIT_TIMER=${LARGE_PROCESSING_WAIT_TIMER-7}
- POLLING_BATCH_SIZE=${POLLING_BATCH_SIZE-100}
- DELAYED_TASK_TIME=${DELAYED_TASK_TIME-20}
- DELAYED_TASK_POLLING_MINUTES=${DELAYED_TASK_POLLING_MINUTES-5}
- TAG_ENABLED_LIMIT=${TAG_ENABLED_LIMIT-200}
- AUTO_DATA_INGEST=${AUTO_DATA_INGEST-True}
- REPORT_PROCESSING_BATCH_SIZE=${REPORT_PROCESSING_BATCH_SIZE-100000}
- TRINO_HOST=${TRINO_HOST-trino}
- TRINO_PORT=${TRINO_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}
- VALIDATION_RANGE=${VALIDATION_RANGE-5}
- 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_PREFIX=${UNLEASH_PREFIX-http}
- UNLEASH_PORT=${UNLEASH_PORT-4242}
- UNLEASH_TOKEN=${UNLEASH_TOKEN:?}
- ENHANCED_ORG_ADMIN=${ENHANCED_ORG_ADMIN-True}
ports:
- 6001-6020:9000
- 5678:5678
volumes:
- './koku:/koku/koku'
- './dev/containers/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'
- './dev/credentials:/etc/credentials'
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
- 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
- TRINO_HOST=${TRINO_HOST-trino}
- TRINO_PORT=${TRINO_PORT-8080}
- UNLEASH_HOST=${UNLEASH_HOST-unleash}
- UNLEASH_PREFIX=${UNLEASH_PREFIX-http}
- UNLEASH_PORT=${UNLEASH_PORT-4242}
- UNLEASH_TOKEN=${UNLEASH_TOKEN:?}
- ENHANCED_ORG_ADMIN=${ENHANCED_ORG_ADMIN-True}
ports:
- 7001-7020:9000
volumes:
- './koku:/koku/koku'
- './dev/containers/unleash:/koku/.unleash'
- './db_functions:/koku/db_functions'
- './scripts:/koku/scripts'
depends_on:
- koku-base
subs-worker:
container_name: subs_worker
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', 'subs_extraction,subs_transmission']
environment:
- DJANGO_READ_DOT_ENV_FILE=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}
- ENABLE_SUBS_DEBUG=${ENABLE_SUBS_DEBUG-False}
- ENABLE_SUBS_PROVIDER_TYPES=${ENABLE_SUBS_PROVIDER_TYPES}
- S3_BUCKET_NAME=${S3_BUCKET_NAME-koku-bucket}
- S3_BUCKET_PATH=${S3_BUCKET_PATH-data_archive}
- S3_ENDPOINT
- S3_ACCESS_KEY
- S3_SECRET
- AWS_SHARED_CREDENTIALS_FILE=${AWS_SHARED_CREDENTIALS_FILE-}
- REDIS_HOST=${REDIS_HOST-redis}
- REDIS_PORT=${REDIS_PORT-6379}
- INSIGHTS_KAFKA_HOST=${INSIGHTS_KAFKA_HOST-kafka}
- INSIGHTS_KAFKA_PORT=${INSIGHTS_KAFKA_PORT-29092}
- 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}
- AUTO_DATA_INGEST=${AUTO_DATA_INGEST-True}
- RUN_GUNICORN=${RUN_GUNICORN-}
- POD_CPU_LIMIT=${POD_CPU_LIMIT-1}
- GUNICORN_WORKERS=${GUNICORN_WORKERS-3}
- GUNICORN_THREADS=${GUNICORN_THREADS-False}
- UNLEASH_HOST=${UNLEASH_HOST-unleash}
- UNLEASH_PREFIX=${UNLEASH_PREFIX-http}
- UNLEASH_PORT=${UNLEASH_PORT-4242}
- UNLEASH_TOKEN=${UNLEASH_TOKEN:?}
- ENHANCED_ORG_ADMIN=${ENHANCED_ORG_ADMIN-True}
ports:
- 7021:9000
volumes:
- './koku:/koku/koku'
- './dev/containers/unleash:/koku/.unleash'
- './db_functions:/koku/db_functions'
- './scripts:/koku/scripts'
- './dev/credentials:/etc/credentials'
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}
- 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}
- AWS_SHARED_CREDENTIALS_FILE=${AWS_SHARED_CREDENTIALS_FILE-}
- GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS-}
- OCI_SHARED_CREDENTIALS_FILE=${OCI_SHARED_CREDENTIALS_FILE-}
- OCI_CLI_KEY_FILE=${OCI_CLI_KEY_FILE-}
- OCI_PYTHON_SDK_NO_SERVICE_IMPORTS=True
- 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_WORKERS=${GUNICORN_WORKERS-3}
- GUNICORN_THREADS=${GUNICORN_THREADS-False}
- UNLEASH_HOST=${UNLEASH_HOST-unleash}
- UNLEASH_PREFIX=${UNLEASH_PREFIX-http}
- UNLEASH_PORT=${UNLEASH_PORT-4242}
- UNLEASH_TOKEN=${UNLEASH_TOKEN:?}
- ENHANCED_ORG_ADMIN=${ENHANCED_ORG_ADMIN-True}
ports:
- 4000:8000
- 4001:9000
volumes:
- './koku:/koku/koku'
- './dev/containers/unleash:/koku/.unleash'
- './db_functions:/koku/db_functions'
- './scripts:/koku/scripts'
- './dev/credentials:/etc/credentials'
depends_on:
- koku-base
koku-beat:
container_name: koku_beat
hostname: koku_beat
image: koku_base
working_dir: /koku/koku
entrypoint: ['celery', '-A', 'koku', 'beat', '-l', 'info']
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}
- REDIS_HOST=${REDIS_HOST-redis}
- REDIS_PORT=${REDIS_PORT-6379}
- LOG_LEVEL=INFO
- DJANGO_SETTINGS_MODULE=koku.settings
- PROMETHEUS_MULTIPROC_DIR=/tmp
- SCHEDULE_REPORT_CHECKS=True
- SOURCE_STATUS_SCHEDULE
- UPLOAD_NORMALIZED_DATA_INTERVAL=10000000
- UNLEASH_HOST=${UNLEASH_HOST-unleash}
- UNLEASH_PREFIX=${UNLEASH_PREFIX-http}
- UNLEASH_PORT=${UNLEASH_PORT-4242}
- UNLEASH_TOKEN=${UNLEASH_TOKEN:?}
- ENHANCED_ORG_ADMIN=${ENHANCED_ORG_ADMIN-True}
volumes:
- './koku:/koku/koku'
- './dev/containers/unleash:/koku/.unleash'
- './db_functions:/koku/db_functions'
- './scripts:/koku/scripts'
depends_on:
- koku-base
### Utilities
db:
container_name: koku-db
image: koku-db:14
build:
context: dev/containers/postgresql
args:
USER_ID: ${USER_ID:?}
GROUP_ID: ${GROUP_ID:?}
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:
- ${POSTGRES_SQL_SERVICE_PORT-15432}:5432
volumes:
- ./dev/containers/postgresql/data:/var/lib/${DATABASE_DATA_DIR-postgresql}/data
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
healthcheck:
test:
- "CMD"
- "pg_isready"
- "--host=127.0.0.1"
- "--port=5432"
interval: 1s
timeout: 30s
retries: 10
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=${PGADMIN_EMAIL-postgres@local.dev}
- 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:5.8.2
environment:
- INIT_ADMIN_API_TOKENS=${UNLEASH_ADMIN_TOKEN:?}
- INIT_CLIENT_API_TOKENS=${UNLEASH_TOKEN:?}
- 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=true
- IMPORT_FILE=/.unleash/flags.json
- LOG_LEVEL=INFO
ports:
- 4242:4242
volumes:
- './dev/containers/unleash:/.unleash'
depends_on:
db:
condition: service_healthy
minio:
container_name: koku-minio
image: minio/minio:RELEASE.2023-09-20T22-49-55Z
environment:
MINIO_ROOT_USER: kokuminioaccess
MINIO_ROOT_PASSWORD: kokuminiosecret
MINIO_USERNAME: kminio
MINIO_GROUPNAME: kminio
MINIO_UID: ${USER_ID:?}
MINIO_GID: ${GROUP_ID:?}
ports:
- 9000:9000
- 9090:9090
command: server /home/kminio/data --console-address ":9090"
volumes:
- ./dev/containers/minio:/home/kminio/data
create-parquet-bucket:
image: minio/mc:latest
depends_on:
- minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host rm local;
/usr/bin/mc config host add --quiet --api s3v4 local $S3_ENDPOINT $S3_ACCESS_KEY $S3_SECRET;
/usr/bin/mc rb --force local/koku-bucket/;
/usr/bin/mc mb --quiet local/koku-bucket/;
/usr/bin/mc anonymous set public local/koku-bucket;
/usr/bin/mc rb --force local/ocp-ingress/;
/usr/bin/mc mb --quiet local/ocp-ingress/;
/usr/bin/mc anonymous set public local/ocp-ingress;
/usr/bin/mc rb --force local/metastore/;
/usr/bin/mc mb --quiet local/metastore/;
/usr/bin/mc anonymous set public local/metastore;
"
hive-metastore:
container_name: hive-metastore
image: quay.io/redhat-services-prod/cost-mgmt-dev-tenant/ubi-hive:2f89bfb
ports:
- 9083:8000
environment:
- HIVE_LOGLEVEL=INFO
- S3_HOST=koku-minio
- 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:
- db
- minio
- create-parquet-bucket
trino:
container_name: trino
image: quay.io/redhat-services-prod/cost-mgmt-dev-tenant/ubi-trino:461-002
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://koku-minio: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:
- ./dev/containers/trino/etc/config.properties:/etc/trino/config.properties
- ./dev/containers/trino/etc/jvm.config:/etc/trino/jvm.config
- ./dev/containers/trino/etc/log.properties:/etc/trino/log.properties
- ./dev/containers/trino/etc/catalog/hive.properties:/etc/trino/catalog/hive.properties
- ./dev/containers/trino/etc/catalog/postgres.properties:/etc/trino/catalog/postgres.properties
- ./dev/containers/trino/data:/data/trino/data
- ./dev/containers/trino/logs:/data/trino/logs
links:
- hive-metastore
depends_on:
- hive-metastore
ulimits:
nofile:
soft: 4096
hard: 4096