Skip to content

Commit fd03945

Browse files
authored
chore: remove jib it's not needed anymore, remove zookeeper ref (#1652)
* remove jib it's not needed anymore, remove zookeeper ref * Updates for adjusting to no ZK * Switch to localhost and see if this still works * Revert to return docker hostname in external * Docker hostname experiment * revert network experiment * Update docker compose to use controller and 2 brokers
1 parent 93b05ef commit fd03945

File tree

47 files changed

+79
-101
lines changed

Some content is hidden

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

47 files changed

+79
-101
lines changed

_includes/tutorials/aggregating-average/kstreams/code/build.gradle

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ buildscript {
99

1010
plugins {
1111
id "java"
12-
id "application"
13-
id "com.google.cloud.tools.jib" version "3.3.1"
12+
id "application"
1413
id "idea"
1514
id "eclipse"
1615
id "com.github.davidmc24.gradle.plugin.avro" version "1.7.0"
@@ -69,11 +68,3 @@ shadowJar {
6968
archiveBaseName = "aggregating-average-standalone"
7069
archiveClassifier = ''
7170
}
72-
73-
jib {
74-
container {
75-
mainClass = mainClassName
76-
jvmFlags = ["-Dconfig.file=/prod.properties"]
77-
}
78-
extraDirectories.paths = file("${rootDir.getPath()}/configuration")
79-
}

_includes/tutorials/aggregating-count/kstreams/code/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ buildscript {
1010
plugins {
1111
id "idea"
1212
id "java"
13-
id "com.google.cloud.tools.jib" version "3.3.1"
1413
id "com.github.davidmc24.gradle.plugin.avro" version "1.7.0"
1514
}
1615

_includes/tutorials/aggregating-minmax/kstreams/code/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ buildscript {
99

1010
plugins {
1111
id "java"
12-
id "com.google.cloud.tools.jib" version "3.3.1"
1312
id "com.github.davidmc24.gradle.plugin.avro" version "1.7.0"
1413
}
1514

_includes/tutorials/aggregating-sum/kstreams/code/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ buildscript {
99

1010
plugins {
1111
id "java"
12-
id "com.google.cloud.tools.jib" version "3.3.1"
1312
id "com.github.davidmc24.gradle.plugin.avro" version "1.7.0"
1413
}
1514

_includes/tutorials/change-topic-partitions-replicas/ksql/code/docker-compose.yml

Lines changed: 54 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,89 @@
1-
version: '2'
1+
version: '3'
22
services:
3+
controller:
4+
image: confluentinc/cp-kafka:7.5.1
5+
container_name: controller
6+
hostname: controller
7+
ports:
8+
- "9091:9091"
9+
environment:
10+
KAFKA_NODE_ID: 1
11+
KAFKA_PROCESS_ROLES: 'controller'
12+
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@controller:9091'
13+
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
14+
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
15+
KAFKA_LISTENERS: 'CONTROLLER://controller:9091'
16+
CLUSTER_ID: '4L6g3nShT-eMCtK--X86sw'
317
broker:
4-
image: confluentinc/cp-kafka:7.4.1
5-
hostname: broker
18+
image: confluentinc/cp-kafka:7.5.1
619
container_name: broker
20+
hostname: broker
721
ports:
8-
- 29092:29092
22+
- "9092:9092"
923
environment:
10-
KAFKA_BROKER_ID: 1
11-
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT,CONTROLLER:PLAINTEXT
12-
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:9092,PLAINTEXT_HOST://localhost:29092
13-
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
24+
KAFKA_NODE_ID: 2
25+
KAFKA_PROCESS_ROLES: 'broker'
26+
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@controller:9091'
27+
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT,CONTROLLER:PLAINTEXT'
28+
KAFKA_LISTENERS: 'PLAINTEXT://broker:29092,PLAINTEXT_HOST://0.0.0.0:9092'
29+
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092'
30+
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
31+
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
32+
CLUSTER_ID: '4L6g3nShT-eMCtK--X86sw'
1433
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
15-
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
16-
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
17-
KAFKA_PROCESS_ROLES: broker,controller
18-
KAFKA_NODE_ID: 1
19-
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@broker:29093
20-
KAFKA_LISTENERS: PLAINTEXT://broker:9092,CONTROLLER://broker:29093,PLAINTEXT_HOST://0.0.0.0:29092
21-
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
22-
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
23-
KAFKA_LOG_DIRS: /tmp/kraft-combined-logs
24-
CLUSTER_ID: MkU3OEVBNTcwNTJENDM2Qk
34+
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 2
35+
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 2
36+
depends_on:
37+
- controller
38+
2539
broker2:
26-
image: confluentinc/cp-kafka:7.3.0
27-
hostname: broker2
40+
image: confluentinc/cp-kafka:7.5.1
2841
container_name: broker2
29-
depends_on:
30-
- zookeeper
42+
hostname: broker2
3143
ports:
32-
- 29093:29093
44+
- "9093:9093"
3345
environment:
34-
KAFKA_BROKER_ID: 102
35-
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
36-
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
37-
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker2:9093,PLAINTEXT_HOST://localhost:29093
46+
KAFKA_NODE_ID: 3
47+
KAFKA_PROCESS_ROLES: 'broker'
48+
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@controller:9091'
49+
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT,CONTROLLER:PLAINTEXT'
50+
KAFKA_LISTENERS: 'PLAINTEXT://broker2:29093,PLAINTEXT_HOST://0.0.0.0:9093'
51+
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://broker2:29093,PLAINTEXT_HOST://localhost:9093'
52+
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
53+
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
54+
CLUSTER_ID: '4L6g3nShT-eMCtK--X86sw'
55+
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
3856
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 2
39-
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 2
4057
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 2
41-
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
58+
depends_on:
59+
- controller
60+
4261
schema-registry:
43-
image: confluentinc/cp-schema-registry:7.3.0
62+
image: confluentinc/cp-schema-registry:7.5.1
4463
hostname: schema-registry
4564
container_name: schema-registry
4665
depends_on:
4766
- broker
67+
- broker2
4868
ports:
4969
- 8081:8081
5070
environment:
5171
SCHEMA_REGISTRY_HOST_NAME: schema-registry
52-
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: broker:9092
72+
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: broker:29092
5373
ksqldb-server:
5474
image: confluentinc/ksqldb-server:0.28.2
5575
hostname: ksqldb-server
5676
container_name: ksqldb-server
5777
depends_on:
5878
- broker
79+
- broker2
5980
- schema-registry
6081
ports:
6182
- 8088:8088
6283
environment:
6384
KSQL_CONFIG_DIR: /etc/ksqldb
6485
KSQL_LOG4J_OPTS: -Dlog4j.configuration=file:/etc/ksqldb/log4j.properties
65-
KSQL_BOOTSTRAP_SERVERS: broker:9092
86+
KSQL_BOOTSTRAP_SERVERS: broker:29092
6687
KSQL_HOST_NAME: ksqldb-server
6788
KSQL_LISTENERS: http://0.0.0.0:8088
6889
KSQL_CACHE_MAX_BYTES_BUFFERING: 0
@@ -72,6 +93,7 @@ services:
7293
container_name: ksqldb-cli
7394
depends_on:
7495
- broker
96+
- broker2
7597
- ksqldb-server
7698
entrypoint: /bin/sh
7799
environment:

_includes/tutorials/change-topic-partitions-replicas/ksql/code/test/consume-data-input.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
docker exec -t broker kafka-console-consumer \
2-
--bootstrap-server localhost:9092 \
2+
--bootstrap-server broker:29092 \
33
--topic topic1 \
44
--property print.key=true \
55
--property key.separator=, \

_includes/tutorials/change-topic-partitions-replicas/ksql/code/test/consume-data-output-partition-0.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
docker exec -t broker kafka-console-consumer \
2-
--bootstrap-server localhost:9092 \
2+
--bootstrap-server broker:29092 \
33
--topic topic2 \
44
--property print.key=true \
55
--property key.separator=, \

_includes/tutorials/change-topic-partitions-replicas/ksql/code/test/consume-data-output-partition-1.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
docker exec -t broker kafka-console-consumer \
2-
--bootstrap-server localhost:9092 \
2+
--bootstrap-server broker:29092 \
33
--topic topic2 \
44
--property print.key=true \
55
--property key.separator=, \
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
docker exec -i broker kafka-console-producer \
2-
--bootstrap-server localhost:9092 \
2+
--bootstrap-server broker:29092 \
33
--topic topic1 \
44
--property parse.key=true \
55
--property key.separator=,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
docker exec -it broker kafka-topics --bootstrap-server broker:9092 --topic topic1 --create --replication-factor 1 --partitions 1
1+
docker exec -it broker kafka-topics --bootstrap-server broker:29092 --topic topic1 --create --replication-factor 1 --partitions 1

0 commit comments

Comments
 (0)