forked from project-koku/koku
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
297 lines (285 loc) · 9.6 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
version: '3'
services:
koku-server:
container_name: koku_server
build:
context: .
dockerfile: Dockerfile-env
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}
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- DJANGO_READ_DOT_ENV_FILE=True
- DEVELOPMENT=${DEVELOPMENT-True}
- DJANGO_DEBUG=${DJANGO_DEBUG-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}
- MASU_SERVICE_HOST=${MASU_SERVICE_HOST-masu-server}
- MASU_SERVICE_PORT=${MASU_SERVICE_PORT-8000}
- RABBITMQ_HOST=${RABBITMQ_HOST-koku-rabbit}
- RABBITMQ_PORT=5672
- RBAC_CACHE_TTL
- MASU_SECRET_KEY=abc
- prometheus_multiproc_dir=/tmp
- API_PATH_PREFIX=${API_PATH_PREFIX-/api/cost-management}
- GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS}
privileged: true
ports:
- 8000:8000
volumes:
- '.:/koku/'
links:
- db
- koku-rabbit
- masu-server
depends_on:
- db
masu-server:
container_name: masu_server
build:
context: .
dockerfile: Dockerfile-env
working_dir: /koku
entrypoint:
- /koku/run_internal.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}
- DJANGO_DEBUG=${DJANGO_DEBUG-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}
- MASU_SERVICE_HOST=${MASU_SERVICE_HOST-masu-server}
- MASU_SERVICE_PORT=${MASU_SERVICE_PORT-8000}
- RABBITMQ_HOST=${RABBITMQ_HOST-koku-rabbit}
- RABBITMQ_PORT=5672
- RBAC_CACHE_TTL
- MASU_SECRET_KEY=abc
- prometheus_multiproc_dir=/tmp
- API_PATH_PREFIX=${API_PATH_PREFIX-/api/cost-management}
privileged: true
ports:
- 5000:8000
volumes:
- '.:/koku/'
links:
- db
- koku-rabbit
depends_on:
- db
redis:
container_name: koku_redis
image: redis:5.0.4
ports:
- "6379:6379"
db:
container_name: koku_db
image: postgres:10.6
environment:
- POSTGRES_DB=${DATABASE_NAME-postgres}
- POSTGRES_USER=${DATABASE_USER-postgres}
- POSTGRES_PASSWORD=${DATABASE_PASSWORD-postgres}
ports:
- "15432:5432"
volumes:
- ./pg_data:/var/lib/pgsql/data
- ./pg_init:/docker-entrypoint-initdb.d
pgadmin:
container_name: pgAdmin
image: dpage/pgadmin4
environment:
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_EMAIL-postgres}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_PASSWORD-postgres}
ports:
- "${PGADMIN_PORT-8432}:80"
volumes:
- ./pgadmin_servers.json:/pgadmin4/servers.json
koku-rabbit:
container_name: koku_rabbit
hostname: rabbit
image: rabbitmq:latest
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
ports:
- "${RABBITMQ_PORT-5674}:5672"
koku-worker:
container_name: koku_worker
hostname: koku_worker
build:
context: .
dockerfile: Dockerfile-env
working_dir: /koku/koku
entrypoint: ['celery', '-A', 'koku', 'worker', '-l', 'info', '-Q', 'celery,download,remove_expired,reporting,process,upload,customer_data_sync,delete_archived_data,query_upload']
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}
- RABBITMQ_HOST=${RABBITMQ_HOST-koku-rabbit}
- RABBITMQ_PORT=5672
- LOG_LEVEL=INFO
- DJANGO_SETTINGS_MODULE=koku.settings
- MASU_SECRET_KEY=abc
- prometheus_multiproc_dir=/tmp
- ENABLE_S3_ARCHIVING=${ENABLE_S3_ARCHIVING-True}
- S3_BUCKET_NAME=${S3_BUCKET_NAME-koku-bucket}
- S3_BUCKET_PATH=${S3_BUCKET_PATH-data_archive}
- PVC_DIR=${PVC_DIR-/testing/pvc_dir}
- GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS}
- KOKU_CELERY_ENABLE_SENTRY
- KOKU_CELERY_SENTRY_DSN
- KOKU_SENTRY_ENVIRONMENT
privileged: true
volumes:
- '.:/koku'
- './testing:/testing'
- './testing/local_providers/azure_local:/tmp/local_container'
- './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'
links:
- koku-rabbit
depends_on:
- koku-rabbit
koku-listener:
container_name: koku_listener
build:
context: .
dockerfile: Dockerfile-env
working_dir: /koku/
entrypoint: ['python', 'koku/manage.py', 'listener']
environment:
- 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
- DATABASE_USER=${DATABASE_USER-postgres}
- DATABASE_PASSWORD=${DATABASE_PASSWORD-postgres}
- MASU_SECRET_KEY=abc
- INSIGHTS_KAFKA_HOST=kafka
- INSIGHTS_KAFKA_PORT=29092
- KAFKA_CONNECT=True
- prometheus_multiproc_dir=/tmp
- MASU_DATE_OVERRIDE
- MASU_DEBUG
- LOG_LEVEL=INFO
- INITIAL_INGEST_NUM_MONTHS=1
- PYTHONPATH=/koku/koku
privileged: true
ports:
- "9988:9999"
volumes:
- '.:/koku'
links:
- db
- koku-rabbit
depends_on:
- db
- koku-rabbit
sources-client:
container_name: sources_client
build:
context: .
dockerfile: Dockerfile-env
working_dir: /koku/
entrypoint:
- /koku/run_sources.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_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_KAFKA_HOST=${SOURCES_KAFKA_HOST-kafka}
- SOURCES_KAFKA_PORT=${SOURCES_KAFKA_PORT-29092}
- prometheus_multiproc_dir=/tmp
privileged: true
ports:
- 4000:8000
volumes:
- '.:/koku'
links:
- db
- koku-server
depends_on:
- db
- koku-server
koku-beat:
container_name: koku_beat
hostname: koku_beat
build:
context: .
dockerfile: Dockerfile-env
working_dir: /koku/koku
entrypoint: ['celery', '--pidfile=/opt/celeryd.pid', '-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}
- RABBITMQ_HOST=${RABBITMQ_HOST-koku-rabbit}
- RABBITMQ_PORT=5672
- LOG_LEVEL=INFO
- DJANGO_SETTINGS_MODULE=koku.settings
- MASU_SECRET_KEY=abc
- prometheus_multiproc_dir=/tmp
- SCHEDULE_REPORT_CHECKS=True
- SCHEDULE_CHECK_INTERVAL=10000000
- UPLOAD_NORMALIZED_DATA_INTERVAL=10000000
privileged: true
volumes:
- '.:/koku'
links:
- koku-rabbit
depends_on:
- koku-rabbit