forked from confluentinc/training-administration-src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
312 lines (302 loc) · 12.9 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
---
version: "3.8"
services:
controller-1:
image: confluentinc/cp-server:7.5.2
hostname: controller-1
container_name: controller-1
volumes:
- data-controller-1:/var/lib/kafka/data
environment:
KAFKA_NODE_ID: 9991
CLUSTER_ID: Nk018hRAQFytWskYqtQduw
KAFKA_PROCESS_ROLES: controller
KAFKA_LISTENERS: CONTROLLER://controller-1:19093
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: CONTROLLER
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_CONTROLLER_QUORUM_VOTERS: 9991@controller-1:19093,9992@controller-2:29093,9993@controller-3:39093
KAFKA_JMX_PORT: 9999
KAFKA_JMX_HOSTNAME: controller-1
KAFKA_BROKER_RACK: rack-0
KAFKA_DEFAULT_REPLICATION_FACTOR: 3
KAFKA_OFFSET_REPLICATION_FACTOR: 3
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 3
KAFKA_CONFLUENT_LICENSE_TOPIC_REPLICATION_FACTOR: 3
KAFKA_CONFLUENT_METADATA_TOPIC_REPLICATION_FACTOR: 3
KAFKA_CONFLUENT_BALANCER_TOPIC_REPLICATION_FACTOR: 3
KAFKA_METRIC_REPORTERS: io.confluent.metrics.reporter.ConfluentMetricsReporter
KAFKA_CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS: kafka-1:9092,kafka-2:9092,kafka-3:9092
cap_add:
- NET_ADMIN
ports:
- 19093:19093
controller-2:
image: confluentinc/cp-server:7.5.2
hostname: controller-2
container_name: controller-2
volumes:
- data-controller-2:/var/lib/kafka/data
environment:
KAFKA_NODE_ID: 9992
CLUSTER_ID: Nk018hRAQFytWskYqtQduw
KAFKA_PROCESS_ROLES: controller
KAFKA_LISTENERS: CONTROLLER://controller-2:29093
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: CONTROLLER
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_CONTROLLER_QUORUM_VOTERS: 9991@controller-1:19093,9992@controller-2:29093,9993@controller-3:39093
KAFKA_JMX_PORT: 9999
KAFKA_JMX_HOSTNAME: controller-2
KAFKA_BROKER_RACK: rack-0
KAFKA_DEFAULT_REPLICATION_FACTOR: 3
KAFKA_OFFSET_REPLICATION_FACTOR: 3
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 3
KAFKA_CONFLUENT_LICENSE_TOPIC_REPLICATION_FACTOR: 3
KAFKA_CONFLUENT_METADATA_TOPIC_REPLICATION_FACTOR: 3
KAFKA_CONFLUENT_BALANCER_TOPIC_REPLICATION_FACTOR: 3
KAFKA_METRIC_REPORTERS: io.confluent.metrics.reporter.ConfluentMetricsReporter
KAFKA_CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS: kafka-1:9092,kafka-2:9092,kafka-3:9092
cap_add:
- NET_ADMIN
ports:
- 29093:29093
controller-3:
image: confluentinc/cp-server:7.5.2
hostname: controller-3
container_name: controller-3
volumes:
- data-controller-3:/var/lib/kafka/data
environment:
KAFKA_NODE_ID: 9993
CLUSTER_ID: Nk018hRAQFytWskYqtQduw
KAFKA_PROCESS_ROLES: controller
KAFKA_LISTENERS: CONTROLLER://controller-3:39093
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: CONTROLLER
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_CONTROLLER_QUORUM_VOTERS: 9991@controller-1:19093,9992@controller-2:29093,9993@controller-3:39093
KAFKA_JMX_PORT: 9999
KAFKA_JMX_HOSTNAME: controller-3
KAFKA_BROKER_RACK: rack-0
KAFKA_DEFAULT_REPLICATION_FACTOR: 3
KAFKA_OFFSET_REPLICATION_FACTOR: 3
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 3
KAFKA_CONFLUENT_LICENSE_TOPIC_REPLICATION_FACTOR: 3
KAFKA_CONFLUENT_METADATA_TOPIC_REPLICATION_FACTOR: 3
KAFKA_CONFLUENT_BALANCER_TOPIC_REPLICATION_FACTOR: 3
KAFKA_METRIC_REPORTERS: io.confluent.metrics.reporter.ConfluentMetricsReporter
KAFKA_CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS: kafka-1:9092,kafka-2:9092,kafka-3:9092
cap_add:
- NET_ADMIN
ports:
- 39093:39093
kafka-1:
image: confluentinc/cp-server:7.5.2
hostname: kafka-1
container_name: kafka-1
volumes:
- data-kafka-1:/var/lib/kafka/data
healthcheck:
test: curl -fail --silent http://kafka-1:8090/kafka/v3/clusters/ --output /dev/null || exit 1
interval: 10s
retries: 10
start_period: 20s
depends_on:
- controller-1
- controller-2
- controller-3
environment:
KAFKA_LISTENERS: DOCKER://kafka-1:9092, EXTERNAL://kafka-1:19092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,DOCKER:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: DOCKER://kafka-1:9092, EXTERNAL://kafka-1:19092
KAFKA_INTER_BROKER_LISTENER_NAME: DOCKER
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_JMX_PORT: 10001
KAFKA_JMX_HOSTNAME: localhost
KAFKA_BROKER_RACK: rack-0
# KAFKA_MIN_INSYNC_REPLICAS: 2
KAFKA_METRIC_REPORTERS: io.confluent.metrics.reporter.ConfluentMetricsReporter
KAFKA_NODE_ID: 1
CLUSTER_ID: Nk018hRAQFytWskYqtQduw
KAFKA_CONTROLLER_QUORUM_VOTERS: 9991@controller-1:19093,9992@controller-2:29093,9993@controller-3:39093
KAFKA_PROCESS_ROLES: broker
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS: kafka-1:9092,kafka-2:9092,kafka-3:9092
cap_add:
- NET_ADMIN
ports:
- 19092:19092
- 10001:10001
kafka-2:
image: confluentinc/cp-server:7.5.2
hostname: kafka-2
container_name: kafka-2
volumes:
- data-kafka-2:/var/lib/kafka/data
healthcheck:
test: curl -fail --silent http://kafka-2:8090/kafka/v3/clusters/ --output /dev/null || exit 1
interval: 10s
retries: 10
start_period: 20s
depends_on:
- controller-1
- controller-2
- controller-3
environment:
KAFKA_LISTENERS: DOCKER://kafka-2:9092, EXTERNAL://kafka-2:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,DOCKER:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: DOCKER://kafka-2:9092, EXTERNAL://kafka-2:29092
KAFKA_INTER_BROKER_LISTENER_NAME: DOCKER
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_JMX_PORT: 10002
KAFKA_JMX_HOSTNAME: localhost
KAFKA_BROKER_RACK: rack-0
# KAFKA_MIN_INSYNC_REPLICAS: 2
KAFKA_METRIC_REPORTERS: io.confluent.metrics.reporter.ConfluentMetricsReporter
KAFKA_NODE_ID: 2
CLUSTER_ID: Nk018hRAQFytWskYqtQduw
KAFKA_CONTROLLER_QUORUM_VOTERS: 9991@controller-1:19093,9992@controller-2:29093,9993@controller-3:39093
KAFKA_PROCESS_ROLES: broker
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS: kafka-1:9092,kafka-2:9092,kafka-3:9092
cap_add:
- NET_ADMIN
ports:
- 29092:29092
- 10002:10002
kafka-3:
image: confluentinc/cp-server:7.5.2
hostname: kafka-3
container_name: kafka-3
volumes:
- data-kafka-3:/var/lib/kafka/data
healthcheck:
test: curl -fail --silent http://kafka-3:8090/kafka/v3/clusters/ --output /dev/null || exit 1
interval: 10s
retries: 10
start_period: 20s
depends_on:
- controller-1
- controller-2
- controller-3
environment:
KAFKA_LISTENERS: DOCKER://kafka-3:9092, EXTERNAL://kafka-3:39092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,DOCKER:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: DOCKER://kafka-3:9092, EXTERNAL://kafka-3:39092
KAFKA_INTER_BROKER_LISTENER_NAME: DOCKER
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_JMX_PORT: 10003
KAFKA_JMX_HOSTNAME: localhost
KAFKA_BROKER_RACK: rack-0
# KAFKA_MIN_INSYNC_REPLICAS: 2
KAFKA_METRIC_REPORTERS: io.confluent.metrics.reporter.ConfluentMetricsReporter
KAFKA_NODE_ID: 3
CLUSTER_ID: Nk018hRAQFytWskYqtQduw
KAFKA_CONTROLLER_QUORUM_VOTERS: 9991@controller-1:19093,9992@controller-2:29093,9993@controller-3:39093
KAFKA_PROCESS_ROLES: broker
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS: kafka-1:9092,kafka-2:9092,kafka-3:9092
cap_add:
- NET_ADMIN
ports:
- 39092:39092
- 10003:10003
schema-registry:
image: confluentinc/cp-schema-registry:7.5.2
hostname: schema-registry
container_name: schema-registry
healthcheck:
test: curl -fail --silent http://schema-registry:8081/subjects --output /dev/null || exit 1
interval: 10s
retries: 20
start_period: 20s
depends_on:
kafka-1:
condition: service_healthy
kafka-2:
condition: service_healthy
kafka-3:
condition: service_healthy
environment:
SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: kafka-1:9092,kafka-2:9092,kafka-3:9092
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081
ports:
- 8081:8081
kafka-connect:
image: confluentinc/cp-server-connect:7.5.2
hostname: kafka-connect
container_name: kafka-connect
healthcheck:
test: curl -fail --silent http://kafka-connect:8083/connectors --output /dev/null || exit 1
interval: 10s
retries: 20
start_period: 20s
depends_on:
kafka-1:
condition: service_healthy
kafka-2:
condition: service_healthy
kafka-3:
condition: service_healthy
environment:
CONNECT_REST_ADVERTISED_PORT: 8083
CONNECT_REST_PORT: 8083
CONNECT_LISTENERS: http://0.0.0.0:8083
CONNECT_BOOTSTRAP_SERVERS: kafka-1:9092,kafka-2:9092,kafka-3:9092
CONNECT_REST_ADVERTISED_HOST_NAME: kafka-connect
CONNECT_GROUP_ID: kafka-connect
CONNECT_CONFIG_STORAGE_TOPIC: _connect-configs
CONNECT_OFFSET_STORAGE_TOPIC: _connect-offsets
CONNECT_STATUS_STORAGE_TOPIC: _connect-status
CONNECT_KEY_CONVERTER: org.apache.kafka.connect.storage.StringConverter
CONNECT_VALUE_CONVERTER: io.confluent.connect.avro.AvroConverter
CONNECT_EXACTLY_ONCE_SOURCE_SUPPORT: enabled
CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL: http://schema-registry:8081
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: 3
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: 3
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: 3
CONNECT_PLUGIN_PATH: /usr/share/java,/usr/share/confluent-hub-components,/data/connect-plugin-jars,/usr/share/filestream-connectors
ports:
- 8083:8083
volumes:
- $PWD/volumes/connect-plugin-jars:/data/connect-plugin-jars
- ./data:/data
control-center:
image: confluentinc/cp-enterprise-control-center:7.5.2
hostname: control-center
container_name: control-center
depends_on:
kafka-1:
condition: service_healthy
kafka-2:
condition: service_healthy
kafka-3:
condition: service_healthy
environment:
CONTROL_CENTER_BOOTSTRAP_SERVERS: kafka-1:9092,kafka-2:9092,kafka-3:9092
CONTROL_CENTER_SCHEMA_REGISTRY_URL: http://schema-registry:8081
CONTROL_CENTER_REPLICATION_FACTOR: 3
CONTROL_CENTER_CONNECT_CONNECT_CLUSTER: http://kafka-connect:8083
ports:
- 9021:9021
# tools:
# image: cnfltraining/training-tools:7.5
# restart: always
# hostname: tools
# container_name: tools
# volumes:
# - ${PWD}:/apps
# environment:
# CLASSPATH: "/usr/share/java/monitoring-interceptors/monitoring-interceptors-7.5.3.jar"
# working_dir: /apps
# command: /bin/bash
# tty: true
volumes:
data-controller-1:
data-controller-2:
data-controller-3:
data-kafka-1:
data-kafka-2:
data-kafka-3: