Skip to content

Commit c506f2a

Browse files
authored
DBZ-9188 Use KRaft in examples (#382)
* DBZ-9188 Update tutorials to use KRaft mode * DBZ-9188 Remove zookeeper from all the examples * DBZ-9188 Update and fix problems
1 parent 92926a0 commit c506f2a

File tree

53 files changed

+854
-792
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+854
-792
lines changed

auditlog/docker-compose.yaml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1-
version: '2.1'
21
services:
3-
zookeeper:
4-
image: quay.io/debezium/zookeeper:${DEBEZIUM_VERSION}
5-
ports:
6-
- 2181:2181
7-
- 2888:2888
8-
- 3888:3888
92
kafka:
103
image: quay.io/debezium/kafka:${DEBEZIUM_VERSION}
114
ports:
12-
- 9092:9092
13-
links:
14-
- zookeeper
5+
- 9092:9092
6+
- 9093:9093
157
environment:
16-
- ZOOKEEPER_CONNECT=zookeeper:2181
17-
# For local development of auditlog-enricher
18-
# - ADVERTISED_HOST_NAME=192.168.1.6
19-
- KAFKA_GROUP_MIN_SESSION_TIMEOUT_MS=250
8+
- CLUSTER_ID=oh-sxaDRTcyAr6pFRbXyzA
9+
- NODE_ID=1
10+
- NODE_ROLE=combined
11+
- KAFKA_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
12+
- KAFKA_LISTENERS=PLAINTEXT://kafka:9092,CONTROLLER://kafka:9093
13+
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092
14+
# For local development of auditlog-enricher
15+
# - ADVERTISED_HOST_NAME=192.168.1.6
16+
- KAFKA_GROUP_MIN_SESSION_TIMEOUT_MS=250
17+
2018
vegetables-db:
2119
image: quay.io/debezium/example-postgres:${DEBEZIUM_VERSION}
2220
ports:
@@ -25,11 +23,12 @@ services:
2523
- POSTGRES_USER=postgresuser
2624
- POSTGRES_PASSWORD=postgrespw
2725
- POSTGRES_DB=vegetablesdb
26+
2827
connect:
2928
image: quay.io/debezium/connect:${DEBEZIUM_VERSION}
3029
ports:
3130
- 8083:8083
32-
links:
31+
depends_on:
3332
- kafka
3433
- vegetables-db
3534
environment:
@@ -48,7 +47,7 @@ services:
4847
dockerfile: src/main/docker/Dockerfile.jvm
4948
ports:
5049
- 8080:8080
51-
links:
50+
depends_on:
5251
- vegetables-db
5352
environment:
5453
- QUARKUS_DATASOURCE_URL=jdbc:postgresql://vegetables-db:5432/vegetablesdb?currentSchema=inventory
@@ -63,7 +62,7 @@ services:
6362
dockerfile: src/main/docker/Dockerfile.jvm
6463
ports:
6564
- 8081:8080
66-
links:
65+
depends_on:
6766
- kafka
6867
environment:
6968
- QUARKUS_KAFKA_STREAMS_BOOTSTRAP_SERVERS=kafka:9092
@@ -75,7 +74,7 @@ services:
7574
dockerfile: src/main/docker/Dockerfile.jvm
7675
ports:
7776
- 8085:8080
78-
links:
77+
depends_on:
7978
- kafka
8079
environment:
8180
- MP_MESSAGING_INCOMING_VEGETABLES_BOOTSTRAP_SERVERS=kafka:9092

camel-component/docker-compose.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
1-
version: '2.1'
21
services:
32
mailhog:
43
image: mailhog/mailhog
54
ports:
65
- 8025:8025
6+
77
qa-db:
88
image: quay.io/debezium/example-postgres:${DEBEZIUM_VERSION}
99
ports:
1010
- 5432:5432
1111
environment:
1212
- POSTGRES_USER=postgres
1313
- POSTGRES_PASSWORD=postgres
14+
1415
qa-app:
1516
image: debezium-examples/qa-app:${DEBEZIUM_VERSION}
1617
build:
1718
context: qa-app
1819
dockerfile: src/main/docker/Dockerfile.jvm
1920
ports:
2021
- 8080:8080
21-
links:
22+
depends_on:
2223
- qa-db
24+
2325
qa-camel:
2426
image: debezium-examples/qa-camel:${DEBEZIUM_VERSION}
2527
build:
2628
context: qa-camel
27-
links:
29+
depends_on:
2830
- qa-db
2931
- mailhog
3032
environment:

camel-kafka-connect/docker-compose.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
1-
version: '2'
21
services:
3-
zookeeper:
4-
image: quay.io/debezium/zookeeper:${DEBEZIUM_VERSION}
5-
ports:
6-
- 2181:2181
7-
- 2888:2888
8-
- 3888:3888
92
kafka:
103
image: quay.io/debezium/kafka:${DEBEZIUM_VERSION}
114
ports:
12-
- 9092:9092
13-
links:
14-
- zookeeper
5+
- 9092:9092
6+
- 9093:9093
157
environment:
16-
- ZOOKEEPER_CONNECT=zookeeper:2181
8+
- CLUSTER_ID=oh-sxaDRTcyAr6pFRbXyzA
9+
- NODE_ID=1
10+
- NODE_ROLE=combined
11+
- KAFKA_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
12+
- KAFKA_LISTENERS=PLAINTEXT://kafka:9092,CONTROLLER://kafka:9093
13+
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092
14+
1715
postgres:
1816
image: quay.io/debezium/example-postgres:${DEBEZIUM_VERSION}
1917
ports:
2018
- 5432:5432
2119
environment:
2220
- POSTGRES_USER=postgres
2321
- POSTGRES_PASSWORD=postgres
22+
2423
coap-server:
2524
image: debezium/example-coap
2625
build:
@@ -30,13 +29,14 @@ services:
3029
environment:
3130
- JAVA_MAIN_CLASS=io.debezium.examples.camel.coap.Runner
3231
- JAVA_OPTIONS=-Dcoap.port=5684
32+
3333
connect:
3434
image: debezium/example-camel-kafka-connector
3535
build:
3636
context: .
3737
ports:
3838
- 8083:8083
39-
links:
39+
depends_on:
4040
- kafka
4141
- postgres
4242
- coap-server

cloudevents/docker-compose.yaml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
1-
version: '2.1'
21
services:
3-
zookeeper:
4-
image: quay.io/debezium/zookeeper:${DEBEZIUM_VERSION}
5-
ports:
6-
- 2181:2181
7-
- 2888:2888
8-
- 3888:3888
9-
networks:
10-
- my-network
112
kafka:
123
image: quay.io/debezium/kafka:${DEBEZIUM_VERSION}
134
ports:
14-
- 9092:9092
15-
links:
16-
- zookeeper
5+
- 9092:9092
6+
- 9093:9093
177
environment:
18-
- ZOOKEEPER_CONNECT=zookeeper:2181
8+
- CLUSTER_ID=oh-sxaDRTcyAr6pFRbXyzA
9+
- NODE_ID=1
10+
- NODE_ROLE=combined
11+
- KAFKA_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
12+
- KAFKA_LISTENERS=PLAINTEXT://kafka:9092,CONTROLLER://kafka:9093
13+
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092
1914
networks:
2015
- my-network
16+
2117
postgres:
2218
image: quay.io/debezium/example-postgres:${DEBEZIUM_VERSION}
2319
ports:
@@ -27,12 +23,13 @@ services:
2723
- POSTGRES_PASSWORD=postgres
2824
networks:
2925
- my-network
26+
3027
connect:
3128
image: quay.io/debezium/connect:${DEBEZIUM_VERSION}
3229
ports:
3330
- 8083:8083
3431
- 5005:5005
35-
links:
32+
depends_on:
3633
- kafka
3734
- postgres
3835
- schema-registry
@@ -46,6 +43,7 @@ services:
4643
- DEBUG_SUSPEND_FLAG=n
4744
networks:
4845
- my-network
46+
4947
schema-registry:
5048
image: confluentinc/cp-schema-registry:7.0.1
5149
ports:
@@ -57,34 +55,35 @@ services:
5755
- SCHEMA_REGISTRY_LISTENERS=http://schema-registry:8081
5856
- SCHEMA_REGISTRY_ACCESS_CONTROL_ALLOW_METHODS=GET,POST,PUT,OPTIONS
5957
- SCHEMA_REGISTRY_ACCESS_CONTROL_ALLOW_ORIGIN=*
60-
links:
61-
- zookeeper
6258
networks:
6359
- my-network
60+
6461
schema-registry-ui:
6562
image: landoop/schema-registry-ui
6663
ports:
6764
- 8000:8000
6865
environment:
6966
- SCHEMAREGISTRY_URL=http://schema-registry:8081
7067
- PROXY=true
71-
links:
68+
depends_on:
7269
- schema-registry
7370
networks:
7471
- my-network
72+
7573
avro-extractor:
7674
image: debezium-examples/cloudevents-avro-extractor:${DEBEZIUM_VERSION}
7775
build:
7876
context: avro-data-extractor
7977
ports:
8078
- 8079:8079
81-
links:
79+
depends_on:
8280
- kafka
8381
environment:
8482
- PORT=8079
8583
- QUARKUS_KAFKA_STREAMS_BOOTSTRAP_SERVERS=kafka:9092
8684
networks:
8785
- my-network
86+
8887
networks:
8988
my-network:
9089
name: cloudevents-network

db-activity-monitoring/docker-compose.yml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
services:
2-
zookeeper:
3-
image: quay.io/debezium/zookeeper:${DEBEZIUM_VERSION}
4-
ports:
5-
- 2181:2181
6-
- 2888:2888
7-
- 3888:3888
82
kafka:
93
image: quay.io/debezium/kafka:${DEBEZIUM_VERSION}
104
ports:
11-
- 9092:9092
12-
links:
13-
- zookeeper
5+
- 9092:9092
6+
- 9093:9093
147
environment:
15-
- ZOOKEEPER_CONNECT=zookeeper:2181
8+
- CLUSTER_ID=oh-sxaDRTcyAr6pFRbXyzA
9+
- NODE_ID=1
10+
- NODE_ROLE=combined
11+
- KAFKA_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
12+
- KAFKA_LISTENERS=PLAINTEXT://kafka:9092,CONTROLLER://kafka:9093
13+
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092
14+
1615
postgres:
1716
container_name: postgres
1817
image: debezium/example-postgres:${DEBEZIUM_VERSION}
@@ -21,6 +20,7 @@ services:
2120
environment:
2221
- POSTGRES_USER=postgres
2322
- POSTGRES_PASSWORD=postgres
23+
2424
order-service:
2525
container_name: order-service
2626
build:
@@ -30,8 +30,9 @@ services:
3030
- 8080:8080
3131
environment:
3232
- APP_VERSION=1.0
33-
links:
33+
depends_on:
3434
- postgres
35+
3536
connect:
3637
build:
3738
context: debezium-jmx-exporter
@@ -41,7 +42,7 @@ services:
4142
ports:
4243
- 8083:8083
4344
- 1976:1976
44-
links:
45+
depends_on:
4546
- kafka
4647
- postgres
4748
environment:
@@ -53,28 +54,31 @@ services:
5354
- KAFKA_OPTS=-javaagent:/kafka/etc/jmx_prometheus_javaagent.jar=8080:/kafka/etc/config.yml
5455
- JMXHOST=localhost
5556
- JMXPORT=1976
57+
5658
prometheus:
5759
build:
5860
context: debezium-prometheus
5961
args:
6062
PROMETHEUS_VERSION: v2.43.0
6163
ports:
6264
- 9090:9090
63-
links:
65+
depends_on:
6466
- connect
6567
- order-service
68+
6669
grafana:
6770
build:
6871
context: debezium-grafana
6972
args:
7073
GRAFANA_VERSION: 9.4.7
7174
ports:
7275
- 3000:3000
73-
links:
76+
depends_on:
7477
- prometheus
7578
- smtp-service
7679
environment:
7780
- DS_PROMETHEUS=prometheus
81+
7882
smtp-service:
7983
image: gessnerfl/fake-smtp-server:2.2.1
8084
hostname: "fake-smtp-server"

debezium-server-name-mapper/docker-compose.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: '2.1'
21
services:
32
db:
43
image: quay.io/debezium/example-postgres:${DEBEZIUM_VERSION}

0 commit comments

Comments
 (0)