-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
323 lines (303 loc) · 10.3 KB
/
docker-compose.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
# SPDX-License-Identifier: AGPL-3.0-only
# SPDX-FileCopyrightText: 2024 Univention GmbH
services:
events-and-consumer-api:
image: gitregistry.knut.univention.de/univention/customers/dataport/upx/provisioning/provisioning-events-and-consumer-api:${IMAGE_TAG:-latest}
build:
context: .
dockerfile: docker/events-and-consumer-api/Dockerfile
# args:
# - UCS_BASE_IMAGE_TAG=latest
container_name: "events-and-consumer-api-dev"
restart: "on-failure"
environment:
LOG_LEVEL: "DEBUG"
NATS_HOST: "nats2"
NATS_PORT: "4222"
NATS_USER: "api"
NATS_PASSWORD: "apipass"
ADMIN_NATS_USER: "admin"
ADMIN_NATS_PASSWORD: "nimda"
UDM_HOST: "udm-rest-api"
UDM_PORT: 9979
ADMIN_USERNAME: "admin"
ADMIN_PASSWORD: "provisioning"
PREFILL_USERNAME: "prefill"
PREFILL_PASSWORD: "prefillpass"
MAX_PREFILL_ATTEMPTS: 5
EVENTS_USERNAME_UDM: "udm"
EVENTS_PASSWORD_UDM: "udmpass"
DEBUG: "false"
ROOT_PATH: "/"
CORS_ALL: "false"
depends_on:
- "nats2"
ports:
- "7777:7777"
nats1:
image: "nats:latest"
container_name: nats1
environment:
jetstream: "enabled"
ports:
- "4222:4222"
- "8222:8222" # HTTP monitoring port
volumes:
- ./nats.dev.conf:/etc/nats-config/nats.conf
- type: tmpfs
target: /var/run
command: --name nats1 --cluster_name JetStreamCluster --jetstream -m 8222 -p 4222 -config /etc/nats-config/nats.conf --cluster nats://0.0.0.0:4245 --routes nats://nats1:4245,nats://nats2:4245,nats://nats3:4245
nats2:
image: nats:latest
container_name: nats2
command: --name nats2 --cluster_name JetStreamCluster --jetstream -m 8222 -p 4222 -config /etc/nats-config/nats.conf --cluster nats://0.0.0.0:4245 --routes nats://nats1:4245,nats://nats2:4245,nats://nats3:4245
volumes:
- ./nats.dev.conf:/etc/nats-config/nats.conf
- type: tmpfs
target: /var/run
nats3:
image: nats:latest
container_name: nats3
command: --name nats3 --cluster_name JetStreamCluster --jetstream -m 8222 -p 4222 -config /etc/nats-config/nats.conf --cluster nats://0.0.0.0:4245 --routes nats://nats1:4245,nats://nats2:4245,nats://nats3:4245
volumes:
- ./nats.dev.conf:/etc/nats-config/nats.conf
- type: tmpfs
target: /var/run
dispatcher:
image: gitregistry.knut.univention.de/univention/customers/dataport/upx/provisioning/provisioning-dispatcher:${IMAGE_TAG:-latest}
build:
context: .
dockerfile: docker/dispatcher/Dockerfile
# args:
# - UCS_BASE_IMAGE_TAG=latest
container_name: "provisioning-dispatcher"
restart: "on-failure"
environment:
LOG_LEVEL: "DEBUG"
NATS_HOST: "nats3"
NATS_PORT: "4222"
NATS_USER: "dispatcher"
NATS_PASSWORD: "dispatcherpass"
NATS_MAX_RECONNECT_ATTEMPTS: 2
PROVISIONING_API_HOST: "events-and-consumer-api"
PROVISIONING_API_PORT: 7777
depends_on:
- "nats3"
- "events-and-consumer-api"
udm-transformer:
image: "gitregistry.knut.univention.de/univention/customers/dataport/upx/provisioning/provisioning-udm-transformer:${IMAGE_TAG:-latest}"
build:
context: .
dockerfile: docker/udm-transformer/Dockerfile
# args:
# - UCS_BASE_IMAGE_TAG=latest
container_name: "provisioning-udm-transformer"
restart: "on-failure"
environment:
LOG_LEVEL: "DEBUG"
NATS_HOST: "nats1"
NATS_PORT: "4222"
NATS_USER: "udm-transformer"
NATS_PASSWORD: "udm-transformerpass"
# LDAP_PUBLISHER_NAME: "ldif-producer"
LDAP_PUBLISHER_NAME: "udm-listener"
PROVISIONING_API_HOST: "events-and-consumer-api"
PROVISIONING_API_PORT: 7777
EVENTS_USERNAME_UDM: "udm"
EVENTS_PASSWORD_UDM: "udmpass"
LDAP_HOST: "ldap-server"
LDAP_PORT: 389
LDAP_TLS_MODE: "off"
LDAP_BASE_DN: "dc=univention-organization,dc=intranet"
LDAP_BIND_DN: "cn=admin,dc=univention-organization,dc=intranet"
LDAP_BIND_PW: "univention"
depends_on:
- "nats1"
- "events-and-consumer-api"
prefill:
image: "gitregistry.knut.univention.de/univention/customers/dataport/upx/provisioning/provisioning-prefill:${IMAGE_TAG:-latest}"
build:
context: .
dockerfile: docker/prefill/Dockerfile
# args:
# - UCS_BASE_IMAGE_TAG=latest
container_name: "provisioning-prefill"
restart: "on-failure"
environment:
LOG_LEVEL: "DEBUG"
NATS_HOST: "nats2"
NATS_PORT: "4222"
PROVISIONING_API_HOST: "events-and-consumer-api"
PROVISIONING_API_PORT: 7777
NATS_USER: "prefill"
NATS_PASSWORD: "prefillpass"
NATS_MAX_RECONNECT_ATTEMPTS: 2
UDM_HOST: "udm-rest-api"
UDM_PORT: 9979
UDM_USERNAME: "cn=admin"
UDM_PASSWORD: "univention"
PREFILL_USERNAME: "prefill"
PREFILL_PASSWORD: "prefillpass"
MAX_PREFILL_ATTEMPTS: 5
depends_on:
- "nats2"
- "events-and-consumer-api"
ldif-producer:
platform: linux/amd64
container_name: "ldif-producer"
image: "gitregistry.knut.univention.de/univention/customers/dataport/upx/container-ldap/ldif-producer:latest"
# Can be uncommented to simplify local development.
# build:
# dockerfile: ../container-ldap/docker/ldif-producer/Dockerfile
# context: ../container-ldap/
environment:
SOCKET_FILE_LOCATION: "/var/lib/univention-ldap/slapd-sock/sock"
NATS_USER: ldif-producer
NATS_PASSWORD: ldifpass
NATS_HOST: "nats3"
NATS_PORT: "4222"
NATS_MAX_RECONNECT_ATTEMPTS: 2
MAX_IN_FLIGHT_LDAP_MESSAGES: 10
BACKPRESSURE_WAIT_TIMEOUT: 10
LDAP_THREADS: 5
LDAP_BASE_DN: "dc=univention-organization,dc=intranet"
IGNORE_TEMPORARY_OBJECTS: "true"
volumes:
- ./tests/base-defaults.conf:/etc/univention/base-defaults.conf:ro
- ldap-socket:/var/lib/univention-ldap/slapd-sock/:rw
udm-listener:
image: "gitregistry.knut.univention.de/univention/customers/dataport/upx/provisioning/provisioning-udm-listener:0.28.3"
build:
context: .
dockerfile: docker/udm-listener/Dockerfile
# args:
# - LISTENER_BASE_IMAGE_TAG=latest
# - UCS_BASE_IMAGE_TAG=latest
container_name: "udm-listener"
environment:
NATS_HOST: "nats1"
NATS_PORT: "4222"
NATS_USER: ldif-producer
NATS_PASSWORD: ldifpass
NATS_MAX_RECONNECT_ATTEMPTS: 2
LDAP_HOST: "ldap-server"
LDAP_BASE_DN: "dc=univention-organization,dc=intranet"
LDAP_HOST_DN: "cn=admin,dc=univention-organization,dc=intranet"
NOTIFIER_SERVER: "ldap-notifier"
DEBUG_LEVEL: "3"
TLS_MODE: "off"
LDAP_PASSWORD: "univention"
LDAP_PASSWORD_FILE: "/var/secrets/ldap_secret"
LDAP_PORT: 389
depends_on:
- "nats1"
- "ldap-server"
- "ldap-notifier"
ldap-notifier:
platform: linux/amd64
image: artifacts.software-univention.de/nubus-dev/images/ldap-notifier:0.16.1-pre-jlohmer-bump-to-508
container_name: "ldap-notifier"
depends_on:
ldap-server:
condition: service_started
ports:
- 6669:6669
volumes:
- ldap-shared-data:/var/lib/univention-ldap/:rw
- ldap-shared-run:/var/run/slapd/:ro
ldap-server:
platform: linux/amd64
image: gitregistry.knut.univention.de/univention/customers/dataport/upx/container-ldap/ldap-server:latest
container_name: "ldap-server"
environment:
LDAP_CN_ADMIN_PW: univention
ports:
- 389:389
- 636:636
volumes:
- ldap-shared-data:/var/lib/univention-ldap/:rw
- ldap-shared-run:/var/run/slapd/:rw
- ${LDAP_SOCKET_LOCATION:-ldap-socket}:/var/lib/univention-ldap/slapd-sock/:rw
- ./tests/base-defaults.conf:/etc/univention/base-defaults.conf:ro
ldap-admin:
image: osixia/phpldapadmin:0.9.0
environment:
PHPLDAPADMIN_LDAP_HOSTS: "#PYTHON2BASH:[{'ldap-server':{'login':{'bind_id':'cn=admin,dc=univention-organization,dc=intranet'}}}]"
PHPLDAPADMIN_HTTPS: "false"
links:
- ldap-server
ports:
- 8001:80
udm-rest-api:
image: gitregistry.knut.univention.de/univention/customers/dataport/upx/container-udm-rest/udm-rest-api:latest
container_name: "udm-rest-api"
platform: "linux/amd64"
ports:
- 9979:9979
volumes:
- ./tests/base.conf:/etc/univention/base.conf:ro
environment:
DOMAINNAME: univention-organization.intranet
HOSTNAME: localhost:9979
LDAP_HOST: ldap-server
LDAP_PORT: 389
LDAP_BASE_DN: dc=univention-organization,dc=intranet
LDAP_HOST_DN: cn=admin,dc=univention-organization,dc=intranet
TLS_MODE: "off"
MACHINE_SECRET: univention
LDAP_CN_ADMIN_PW: univention
example-client:
image: "gitregistry.knut.univention.de/univention/customers/dataport/upx/provisioning/provisioning-example-client:${IMAGE_TAG:-latest}"
build:
context: .
dockerfile: docker/example-client/Dockerfile
# args:
# - UCS_BASE_IMAGE_TAG=latest
container_name: example-client
environment:
PROVISIONING_API_USERNAME: "example-client"
PROVISIONING_API_PASSWORD: "password"
PROVISIONING_API_BASE_URL: "http://events-and-consumer-api:7777"
LOG_LEVEL: "DEBUG"
MAX_ACKNOWLEDGEMENT_RETRIES: 3
restart: "on-failure"
test:
image: "gitregistry.knut.univention.de/univention/customers/dataport/upx/provisioning/test:${IMAGE_TAG:-latest}"
build:
context: .
dockerfile: docker/test/Dockerfile
working_dir: /app
profiles:
- test
platform: "linux/amd64"
volumes:
- "./tests:/app/tests"
- "./src:/app/src"
- "./pyproject.toml:/app/pyproject.toml"
# Environment of the pre-commit linter.
pre-commit:
profiles:
- test
image: gitregistry.knut.univention.de/univention/customers/dataport/upx/container-pre-commit/upx-pre-commit:latest
volumes:
- type: bind
source: .
target: /code
- type: volume
# pre-commit installs dependencies, having them cached speeds things up
# a lot.
source: pre-commit-cache
target: /cache
# Environment to build the documentation
docs:
image: docker-registry.knut.univention.de/sphinx:latest
working_dir: /src/docs
volumes:
- ".:/src"
profiles:
- docs
volumes:
ldap-shared-data:
ldap-shared-run:
pre-commit-cache:
ldap-socket: