-
Notifications
You must be signed in to change notification settings - Fork 0
/
kafka-docker-compose-integration-test.yml
171 lines (158 loc) · 4.86 KB
/
kafka-docker-compose-integration-test.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
services:
zookeeper:
image: confluentinc/cp-zookeeper:latest
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
networks:
net_docker:
ipv4_address: 10.5.0.5
kafka:
image: confluentinc/cp-kafka:latest
depends_on:
- zookeeper
ports:
- 9092:9092
- 29092:29092
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://${SERVER_IP:-localhost}:9092,PLAINTEXT_INTERNAL://10.5.0.6:29092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
networks:
net_docker:
ipv4_address: 10.5.0.6
tmp_kafka:
image: confluentinc/cp-kafka:latest
depends_on:
- kafka
entrypoint: [ '/bin/sh', '-c' ]
command: |
"
# Blocks until Kafka is reachable
kafka-topics --bootstrap-server 10.5.0.6:29092 --list
kafka-topics --bootstrap-server 10.5.0.6:29092 --create --if-not-exists --topic requests-input --replication-factor 1 --partitions 1
kafka-topics --bootstrap-server 10.5.0.6:29092 --create --if-not-exists --topic requests-output --replication-factor 1 --partitions 1
"
networks:
net_docker:
ipv4_address: 10.5.0.7
connector:
image: ldap:latest
entrypoint: [ '/root/bin/app' ]
depends_on:
- kafka
command: ["kafka", "10.5.0.6", "29092", "10.5.0.12", "8080", "Administrator", "5ecr3t"]
networks:
net_docker:
ipv4_address: 10.5.0.8
integration-tester:
image: ldap:latest
entrypoint: [ '/root/bin/app' ]
depends_on:
- kafka
command: ["integration-test", "10.5.0.6", "29092", "10.5.0.12", "8080", "Administrator", "5ecr3t"]
networks:
net_docker:
ipv4_address: 10.5.0.14
postgresql-midpoint:
image: postgres:13-alpine
container_name: book-postgresql-midpoint-chapter-2
environment:
- POSTGRES_PASSWORD_FILE=/run/secrets/mp_database_password.txt
- POSTGRES_USER=midpoint
- POSTGRES_INITDB_ARGS=--lc-collate=en_US.utf8 --lc-ctype=en_US.utf8
ports:
- 5432:5432
networks:
net_docker:
ipv4_address: 10.5.0.9
secrets:
- mp_database_password.txt
volumes:
- pg-midpoint_data:/var/lib/postgresql/data
postgresql-crm:
image: postgres:13-alpine
container_name: book-postgresql-crm-chapter-2
environment:
- POSTGRES_PASSWORD=qwe123
- POSTGRES_USER=crm
- POSTGRES_INITDB_ARGS=--lc-collate=en_US.utf8 --lc-ctype=en_US.utf8
ports:
- 15432:5432
networks:
net_docker:
ipv4_address: 10.5.0.10
volumes:
- pg-crm_data:/var/lib/postgresql/data
- ./container-book-postgres-crm_files:/docker-entrypoint-initdb.d/:ro
ldap:
image: vk496/openldap
container_name: book-ldap-chapter-2
entrypoint: [ "/container/tool/run", "--copy-service" ]
ports:
- "10389:389"
environment:
- LDAP_DOMAIN=example.com
- LDAP_ADMIN_PASSWORD=secret
- LDAP_TLS=false
networks:
net_docker:
ipv4_address: 10.5.0.11
volumes:
- ldap_conf:/etc/ldap/slapd.d
- ldap_data:/var/lib/ldap
- ./container-book-ldap_files:/container/service/slapd/assets/config/bootstrap/ldif/custom/:ro
midpoint:
image: evolveum/midpoint:${MP_VERSION:-4.4}-alpine
# image: sakazuki/midpoint:arm64
container_name: book-midpoint-chapter-2
ports:
- "8080:8080"
environment:
- MP_ENTRY_POINT=/opt/midpoint-dirs-docker-entrypoint
- REPO_DATABASE_TYPE=postgresql
- REPO_HOST=book-postgresql-midpoint-chapter-2
- REPO_DATABASE=midpoint
- REPO_USER=midpoint
- REPO_PASSWORD_FILE=/run/secrets/mp_database_password.txt
- MP_KEYSTORE_PASSWORD_FILE=/run/secrets/mp_keystore_password.txt
networks:
net_docker:
ipv4_address: 10.5.0.12
secrets:
- mp_database_password.txt
- mp_keystore_password.txt
volumes:
- midpoint_home:/opt/midpoint/var
- ./container-book-midpoint_files:/opt/midpoint-dirs-docker-entrypoint/:ro
depends_on:
- ldap
- postgresql-crm
- postgresql-midpoint
networks:
net_docker:
driver: bridge
ipam:
config:
- subnet: 10.5.0.0/16
gateway: 10.5.0.1
secrets:
mp_database_password.txt:
file: ./configs-and-secrets/database_password.txt
mp_keystore_password.txt:
file: ./configs-and-secrets/keystore_password.txt
volumes:
midpoint_home:
name: book-midpoint_home-chapter-2
ldap_conf:
name: book-ldap_conf-chapter-2
ldap_data:
name: book-ldap_data-chapter-2
pg-midpoint_data:
name: book-postgresql-midpoint_data-chapter-2
pg-crm_data:
name: book-postgresql-crm_data-chapter-2