-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-local-native-run.yaml
375 lines (337 loc) · 13.4 KB
/
docker-compose-local-native-run.yaml
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
version: '3'
services:
zookeeper:
image: damdamdeo/debezium-zookeeper-prometheus-exporter:1.4.1.Final
ports:
- 2181:2181
- 2888:2888
- 3888:3888
- 7074:8081
environment:
- LOG_LEVEL=WARN
- SERVER_JVMFLAGS=-javaagent:/jmx_prometheus_javaagent.jar=8081:/config.yml
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.2
ports:
- 9200:9200
- 9300:9300
environment:
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
elasticsearch-exporter:
image: justwatch/elasticsearch_exporter:1.1.0
ports:
- 9114:9114
command:
- '--es.uri=http://elasticsearch:9200'
logstash:
image: damdamdeo/logstash-oss-prometheus-exporter:6.8.2
volumes:
- $HOME/pipelines:/usr/share/logstash/pipeline:z
ports:
- 12201:12201/udp
- 5000:5000
- 9600:9600
- 7075:8080
environment:
- LS_JAVA_OPTS=-javaagent:/jmx_prometheus_javaagent.jar=8080:/config.yml
kibana:
image: docker.elastic.co/kibana/kibana-oss:6.8.2
ports:
- 5601:5601
# use cadvisor to expose mailhog container metrics. In a k8s env not needed as pod are already monitored
# TODO exporter kibana
kafka:
image: debezium/kafka:1.4.1.Final
ports:
- 9092:9092
environment:
- ZOOKEEPER_CONNECT=zookeeper:2181
- CREATE_TOPICS=event:3:1:compact # 3 partitions 1 replica
- KAFKA_LOG_RETENTION_MS=5000
- KAFKA_LOG_RETENTION_CHECK_INTERVAL_MS=5000
- LOG_LEVEL=WARN
- KAFKA_OPTS=
kafka-exporter:
image: danielqsj/kafka-exporter:v1.2.0
ports:
- 9308:9308
environment:
- kafka.server=kafka:9092
connect:
image: damdamdeo/debezium-connect-prometheus-exporter:1.4.1.Final
ports:
- 8083:8083
- 7073:8080
environment:
- BOOTSTRAP_SERVERS=kafka:9092
- GROUP_ID=1
- CONFIG_STORAGE_TOPIC=my_connect_configs
- OFFSET_STORAGE_TOPIC=my_connect_offsets
- STATUS_STORAGE_TOPIC=my_connect_statuses
- LOG_LEVEL=WARN
- EXTRA_ARGS=-javaagent:/jmx_prometheus_javaagent.jar=8080:/config.yml
# https://debezium.io/documentation/reference/connectors/postgresql.html#postgresql-monitoring
mutable:
image: dcdh1983/postgresql-10-debezium-centos7:latest
ports:
- 5432:5432
environment:
- POSTGRESQL_USER=postgresuser
- POSTGRESQL_PASSWORD=postgrespassword
- POSTGRESQL_DATABASE=mutable
mutable-exporter:
image: wrouesnel/postgres_exporter:v0.8.0
ports:
- 9187:9187
environment:
- DATA_SOURCE_NAME=postgresql://postgresuser:postgrespassword@mutable:5432/mutable?sslmode=disable
todo-query:
image: postgres:11-alpine
ports:
- 5433:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=todo-query
todo-query-exporter:
image: wrouesnel/postgres_exporter:v0.8.0
ports:
- 9188:9187
environment:
- DATA_SOURCE_NAME=postgresql://postgres:postgres@todo-query:5432/todo-query?sslmode=disable
todo-email-notifier:
image: postgres:11-alpine
ports:
- 5434:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=todo-email-notifier
todo-email-notifier-exporter:
image: wrouesnel/postgres_exporter:v0.8.0
ports:
- 9189:9187
environment:
- DATA_SOURCE_NAME=postgresql://postgres:postgres@todo-email-notifier:5432/todo-email-notifier?sslmode=disable
secret-store:
image: debezium/postgres:11-alpine
ports:
- 5435:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=secret-store
secret-store-exporter:
image: wrouesnel/postgres_exporter:v0.8.0
ports:
- 9190:9187
environment:
- DATA_SOURCE_NAME=postgresql://postgres:postgres@secret-store:5432/secret-store?sslmode=disable
mailhog:
image: mailhog/mailhog:v1.0.0
ports:
- 1025:1025
- 8025:8025
# use cadvisor to expose mailhog container metrics. In a k8s env not needed as pod are already monitored
# TODO exporter mailhog
hazelcast:
image: hazelcast/hazelcast:4.0.3
ports:
- 5701:5701
- 8088:8080
environment:
- PROMETHEUS_PORT=8080
# TODO conf exporter
todo-write-app:
image: damdamdeo/todo-write-native-app:latest
ports:
- 8084:8080
environment:
- quarkus.http.host=0.0.0.0
- mp.messaging.incoming.event-in.bootstrap.servers=kafka:9092
- quarkus.datasource.jdbc.url=jdbc:postgresql://mutable:5432/mutable
- quarkus.datasource.username=postgresuser
- quarkus.datasource.password=postgrespassword
- quarkus.datasource.secret-store.jdbc.url=jdbc:postgresql://secret-store:5432/secret-store
- quarkus.datasource.secret-store.username=postgres
- quarkus.datasource.secret-store.password=postgres
- quarkus.datasource.mutable.jdbc.url=jdbc:postgresql://mutable:5432/mutable
- quarkus.datasource.mutable.username=postgresuser
- quarkus.datasource.mutable.password=postgrespassword
- quarkus.datasource.consumed-events.jdbc.url=jdbc:postgresql://mutable:5432/mutable
- quarkus.datasource.consumed-events.username=postgresuser
- quarkus.datasource.consumed-events.password=postgrespassword
- kafka-connector-api/mp-rest/url=http://connect:8083
- connector.mutable.database.hostname=mutable
- connector.mutable.database.username=postgresuser
- connector.mutable.database.password=postgrespassword
- connector.mutable.database.port=5432
- connector.mutable.database.dbname=mutable
- connector.mutable.nbOfPartitionsInEventTopic=3
- quarkus.oidc.auth-server-url=http://keycloak:8080/auth/realms/todos
- quarkus.jaeger.endpoint=http://jaeger:14268/api/traces
- quarkus.jaeger.tags=env=local
- quarkus.log.handler.gelf.enabled=true
- quarkus.log.handler.gelf.host=logstash
- quarkus.log.handler.gelf.port=12201
- quarkus.log.handler.gelf.include-full-mdc=true
- quarkus.log.handler.gelf.additional-field.env.value=local
- quarkus.log.handler.gelf.additional-field.env.type=String
- quarkus.log.handler.gelf.additional-field.serviceName.value=todo-write-app
- quarkus.log.handler.gelf.additional-field.serviceName.type=String
- quarkus.hazelcast-client.cluster-name=dev
- quarkus.hazelcast-client.cluster-members=hazelcast:5701
todo-query-app:
image: damdamdeo/todo-query-native-app:latest
ports:
- 8085:8080
environment:
- quarkus.http.host=0.0.0.0
- mp.messaging.incoming.event-in.bootstrap.servers=kafka:9092
- quarkus.datasource.jdbc.url=jdbc:postgresql://todo-query:5432/todo-query
- quarkus.datasource.username=postgres
- quarkus.datasource.password=postgres
- quarkus.datasource.secret-store.jdbc.url=jdbc:postgresql://secret-store:5432/secret-store
- quarkus.datasource.secret-store.username=postgres
- quarkus.datasource.secret-store.password=postgres
- quarkus.datasource.consumed-events.jdbc.url=jdbc:postgresql://todo-query:5432/todo-query
- quarkus.datasource.consumed-events.username=postgres
- quarkus.datasource.consumed-events.password=postgres
- quarkus.oidc.auth-server-url=http://keycloak:8080/auth/realms/todos
- quarkus.jaeger.endpoint=http://jaeger:14268/api/traces
- quarkus.jaeger.tags=env=local
- quarkus.log.handler.gelf.enabled=true
- quarkus.log.handler.gelf.host=logstash
- quarkus.log.handler.gelf.port=12201
- quarkus.log.handler.gelf.include-full-mdc=true
- quarkus.log.handler.gelf.additional-field.env.value=local
- quarkus.log.handler.gelf.additional-field.env.type=String
- quarkus.log.handler.gelf.additional-field.serviceName.value=todo-query-app
- quarkus.log.handler.gelf.additional-field.serviceName.type=String
todo-email-notifier-app-1:
image: damdamdeo/todo-email-notifier-native-app:latest
environment:
- mp.messaging.incoming.event-in.bootstrap.servers=kafka:9092
- quarkus.datasource.secret-store.jdbc.url=jdbc:postgresql://secret-store:5432/secret-store
- quarkus.datasource.secret-store.username=postgres
- quarkus.datasource.secret-store.password=postgres
- quarkus.datasource.consumed-events.jdbc.url=jdbc:postgresql://todo-email-notifier:5432/todo-email-notifier
- quarkus.datasource.consumed-events.username=postgres
- quarkus.datasource.consumed-events.password=postgres
- quarkus.mailer.host=mailhog
- quarkus.mailer.username=
- quarkus.mailer.password=
- quarkus.log.handler.gelf.enabled=true
- quarkus.log.handler.gelf.host=logstash
- quarkus.log.handler.gelf.port=12201
- quarkus.log.handler.gelf.include-full-mdc=true
- quarkus.log.handler.gelf.additional-field.env.value=local
- quarkus.log.handler.gelf.additional-field.env.type=String
- quarkus.log.handler.gelf.additional-field.serviceName.value=todo-email-notifier-app
- quarkus.log.handler.gelf.additional-field.serviceName.type=String
todo-email-notifier-app-2:
image: damdamdeo/todo-email-notifier-native-app:latest
environment:
- mp.messaging.incoming.event-in.bootstrap.servers=kafka:9092
- quarkus.datasource.secret-store.jdbc.url=jdbc:postgresql://secret-store:5432/secret-store
- quarkus.datasource.secret-store.username=postgres
- quarkus.datasource.secret-store.password=postgres
- quarkus.datasource.consumed-events.jdbc.url=jdbc:postgresql://todo-email-notifier:5432/todo-email-notifier
- quarkus.datasource.consumed-events.username=postgres
- quarkus.datasource.consumed-events.password=postgres
- quarkus.mailer.host=mailhog
- quarkus.mailer.username=
- quarkus.mailer.password=
- quarkus.log.handler.gelf.enabled=true
- quarkus.log.handler.gelf.host=logstash
- quarkus.log.handler.gelf.port=12201
- quarkus.log.handler.gelf.include-full-mdc=true
- quarkus.log.handler.gelf.additional-field.env.value=local
- quarkus.log.handler.gelf.additional-field.env.type=String
- quarkus.log.handler.gelf.additional-field.serviceName.value=todo-email-notifier-app
- quarkus.log.handler.gelf.additional-field.serviceName.type=String
todo-public-frontend-app:
image: damdamdeo/todo-public-frontend-native-app:latest
ports:
- 8086:8080
environment:
- todo-write-api/mp-rest/url=http://todo-write-app:8080
- todo-query-api/mp-rest/url=http://todo-query-app:8080
- quarkus.oidc.auth-server-url=http://keycloak:8080/auth/realms/todos
- keycloak-api/mp-rest/url=http://keycloak:8080/auth/realms/todos
- keycloak.admin.clientId=admin-cli
- keycloak.admin.username=keycloak
- keycloak.admin.password=keycloak
- quarkus.http.cors=true
- quarkus.http.cors.origins=http://localhost:8086,http://127.0.0.1:8086,http://localhost:4200,http://127.0.0.1:4200
- quarkus.jaeger.endpoint=http://jaeger:14268/api/traces
- quarkus.jaeger.tags=env=local
- quarkus.log.handler.gelf.enabled=true
- quarkus.log.handler.gelf.host=logstash
- quarkus.log.handler.gelf.port=12201
- quarkus.log.handler.gelf.include-full-mdc=true
- quarkus.log.handler.gelf.additional-field.env.value=local
- quarkus.log.handler.gelf.additional-field.env.type=String
- quarkus.log.handler.gelf.additional-field.serviceName.value=todo-public-frontend-app
- quarkus.log.handler.gelf.additional-field.serviceName.type=String
keycloak-db:
image: debezium/postgres:11-alpine
ports:
- 5436:5432
environment:
- POSTGRES_USER=keycloak
- POSTGRES_PASSWORD=keycloak
- POSTGRES_DB=keycloak
keycloak-db-exporter:
image: wrouesnel/postgres_exporter:v0.8.0
ports:
- 9191:9187
environment:
- DATA_SOURCE_NAME=postgresql://keycloak:keycloak@keycloak-db:5432/keycloak?sslmode=disable
# metrics are exported following https://github.com/aerogear/keycloak-metrics-spi
# Warnings: manual setup have to be performed regarding master realm
keycloak:
image: damdamdeo/todo-keycloak:latest
ports:
- 8087:8080
environment:
- KEYCLOAK_USER=keycloak
- KEYCLOAK_PASSWORD=keycloak
- DB_VENDOR=postgres
- DB_ADDR=keycloak-db:5432
- DB_DATABASE=keycloak
- DB_USER=keycloak
- DB_PASSWORD=keycloak
# flûte je devrais utiliser zipkin (car un exporter existe au lieu de jaeger ...)
jaeger:
image: jaegertracing/all-in-one:latest
ports:
- 5775:5775/udp
- 6831:6831/udp
- 6832:6832/udp
- 5778:5778
- 16686:16686
- 14268:14268
# TODO change jaeger to zipkin and export zipkin
# https://prometheus:io/docs/instrumenting/exporters/:
prometheus:
image: prom/prometheus:v2.21.0
ports:
- 9090:9090
volumes:
- $HOME/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.retention.time=365d'
# TODO exporter prometheus
grafana:
image: grafana/grafana:7.2.1
ports:
- 3000:3000
environment:
# metrics are exported by default. See https://grafana.com/docs/grafana/latest/administration/metrics/
- GF_PATHS_CONFIG=/etc/grafana/grafana.ini
volumes:
- $HOME/grafana/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
- $HOME/grafana/dashboards.yml:/etc/grafana/provisioning/dashboards/dashboards.yml