Skip to content

Commit dce98a0

Browse files
authored
Fix cluster-only docker config (#99)
* Fix cluster-only docker config * CI test * CI test * CI test * Add replica back
1 parent 57a3e69 commit dce98a0

File tree

2 files changed

+39
-11
lines changed

2 files changed

+39
-11
lines changed

docker/kafka-clusters-only.yaml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ services:
77
environment:
88
ZOOKEEPER_CLIENT_PORT: 2181
99
ZOOKEEPER_TICK_TIME: 2000
10+
ports:
11+
- 2181:2181
1012

1113
kafka0:
1214
image: confluentinc/cp-kafka:5.1.0
@@ -18,15 +20,37 @@ services:
1820
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka0:29092,PLAINTEXT_HOST://localhost:9092
1921
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
2022
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
21-
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
23+
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 2
2224
JMX_PORT: 9997
23-
KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka0 -Dcom.sun.management.jmxremote.rmi.port=9997
25+
KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.rmi.port=9997
26+
ports:
27+
- 9092:9092
28+
- 9997:9997
29+
30+
kafka01:
31+
image: confluentinc/cp-kafka:5.1.0
32+
depends_on:
33+
- zookeeper0
34+
environment:
35+
KAFKA_BROKER_ID: 2
36+
KAFKA_ZOOKEEPER_CONNECT: zookeeper0:2181
37+
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka01:29092,PLAINTEXT_HOST://localhost:9094
38+
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT,PLAIN:PLAINTEXT
39+
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
40+
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 2
41+
JMX_PORT: 9999
42+
KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.rmi.port=9999
43+
ports:
44+
- 9094:9094
45+
- 9999:9999
2446

2547
zookeeper1:
2648
image: confluentinc/cp-zookeeper:5.1.0
2749
environment:
2850
ZOOKEEPER_CLIENT_PORT: 2181
2951
ZOOKEEPER_TICK_TIME: 2000
52+
ports:
53+
- 2182:2181
3054

3155
kafka1:
3256
image: confluentinc/cp-kafka:5.1.0
@@ -39,16 +63,20 @@ services:
3963
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
4064
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
4165
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
42-
JMX_PORT: 9997
43-
KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka1 -Dcom.sun.management.jmxremote.rmi.port=9997
66+
JMX_PORT: 9998
67+
KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.rmi.port=9998
68+
ports:
69+
- 9093:9093
70+
- 9998:9998
4471

4572
schemaregistry0:
4673
image: confluentinc/cp-schema-registry:5.1.0
4774
depends_on:
4875
- zookeeper0
4976
- kafka0
77+
- kafka01
5078
environment:
51-
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka0:29092
79+
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka0:29092,PLAINTEXT://kafka01:29092
5280
SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: zookeeper0:2181
5381
SCHEMA_REGISTRY_KAFKASTORE_SECURITY_PROTOCOL: PLAINTEXT
5482
SCHEMA_REGISTRY_HOST_NAME: schemaregistry0

kafka-ui-api/src/main/resources/application-local.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ kafka:
22
clusters:
33
-
44
name: local
5-
bootstrapServers: localhost:29091
6-
zookeeper: localhost:2183
5+
bootstrapServers: localhost:9092
6+
zookeeper: localhost:2181
77
schemaRegistry: http://localhost:8085
88
# schemaNameTemplate: "%s-value"
99
jmxPort: 9997
1010
-
1111
name: secondLocal
12-
bootstrapServers: localhost:29092
12+
bootstrapServers: localhost:9093
1313
zookeeper: localhost:2182
1414
jmxPort: 9998
1515
-
1616
name: localReplica
17-
bootstrapServers: localhost:29093
18-
zookeeper: localhost:2183
19-
jmxPort: 9997
17+
bootstrapServers: localhost:9094
18+
zookeeper: localhost:2181
19+
jmxPort: 9999
2020
admin-client-timeout: 5000
2121
zookeeper:
2222
connection-timeout: 1000

0 commit comments

Comments
 (0)