Skip to content

Commit c198ede

Browse files
committed
fix: resolve conflicts
1 parent 3926ed1 commit c198ede

7 files changed

+213
-91
lines changed

README.md

+49-46
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[![Actions Status](https://github.com/conduktor/kafka-stack-docker-compose/workflows/CI/badge.svg)](https://github.com/conduktor/kafka-stack-docker-compose/actions)
22

3-
# An open-source project by [![Conduktor.io](https://www.conduktor.io/uploads/conduktor.svg)](https://conduktor.io/)
3+
# An open-source project by [![Conduktor.io](https://www.conduktor.io/images/logo.svg)](https://conduktor.io/)
44

55
This project is sponsored by [Conduktor.io](https://www.conduktor.io/), a graphical desktop user interface for Apache Kafka.
66

77
Once you have started your cluster, you can use Conduktor to easily manage it.
8-
Just connect against `localhost:9092` if using Docker, or `192.168.99.100` if using Docker Toolbox
8+
Just connect against `localhost:9092`. If you are on Mac or Windows and want to connect from another container, use `host.docker.internal:29092`
99

1010
# kafka-stack-docker-compose
1111

@@ -15,38 +15,60 @@ This replicates as well as possible real deployment configurations, where you ha
1515

1616
## Stack version
1717

18-
- Zookeeper version: 3.6.3 (Confluent 7.1.1)
19-
- Kafka version: 3.1.0 (Confluent 7.1.1)
20-
- Kafka Schema Registry: Confluent 7.1.1
21-
- Kafka Rest Proxy: Confluent 7.1.1
22-
- Kafka Connect: Confluent 7.1.1
23-
- ksqlDB Server: Confluent 7.1.1
18+
- Conduktor Platform: latest
19+
- Zookeeper version: 3.6.3 (Confluent 7.3.2)
20+
- Kafka version: 3.3.0 (Confluent 7.3.2)
21+
- Kafka Schema Registry: Confluent 7.3.2
22+
- Kafka Rest Proxy: Confluent 7.3.2
23+
- Kafka Connect: Confluent 7.3.2
24+
- ksqlDB Server: Confluent 7.3.2
2425
- Zoonavigator: 1.1.1
2526

26-
For a UI tool to access your local Kafka cluster, use the free version of [Conduktor](https://www.conduktor.io/download)
27+
For a UI tool to access your local Kafka cluster, use the free version of [Conduktor](https://www.conduktor.io/get-started)
2728

2829
# Requirements
2930

30-
## Docker
31-
32-
Please export your environment before starting the stack:
33-
```
34-
export DOCKER_HOST_IP=127.0.0.1
35-
```
36-
(that's the default value and you actually don't need to do a thing)
31+
Kafka will be exposed on `127.0.0.1` or `DOCKER_HOST_IP` if set in the environment.
32+
(You probably don't need to set it if you're not using Docker-Toolbox)
3733

3834
## Docker-Toolbox
39-
If you are using Docker for Mac <= 1.11, or Docker Toolbox for Windows
40-
(your docker machine IP is usually `192.168.99.100`)
41-
42-
Please export your environment before starting the stack:
35+
Docker toolbox is [deprecated](https://github.com/docker-archive/toolbox) and not maintained anymore for several years.
36+
We can't guarantee this stack will work with Docker Toolbox, but if you want to try anyway, please export your environment before starting the stack:
4337
```
4438
export DOCKER_HOST_IP=192.168.99.100
4539
```
40+
(your docker machine IP is usually `192.168.99.100`)
41+
42+
## Apple M1 support
43+
Confluent platform supports Apple M1 (ARM64) since version `7.2.0`! Basically, this stack will work out of the box.
44+
45+
If you want to downgrade confluent platform version, there are two ways:
46+
47+
1. Add `platform: linux/amd64`. It will work as docker is able to emulate AMD64 instructions.
48+
2. Previous versions have been [built](https://github.com/arm64-compat/confluent-platform) for ARM64 by the community. If you want to use it, just change the image in the corresponding yml. Since it is a not an official image, use it at your own risks.
49+
50+
## Full stack
4651

47-
## Mac M1 issues
52+
To ease you journey with kafka just connect to [localhost:8080](http://localhost:8080/)
4853

49-
Currently, the Docker Images are not working with M1 Mac. This is because they haven't been built by Confluent for that platform. See [confluentinc/common-docker/#117](https://github.com/confluentinc/common-docker/issues/117) for more details
54+
55+
password: `admin`
56+
57+
- Conduktor-platform: `$DOCKER_HOST_IP:8080`
58+
- Single Zookeeper: `$DOCKER_HOST_IP:2181`
59+
- Single Kafka: `$DOCKER_HOST_IP:9092`
60+
- Kafka Schema Registry: `$DOCKER_HOST_IP:8081`
61+
- Kafka Rest Proxy: `$DOCKER_HOST_IP:8082`
62+
- Kafka Connect: `$DOCKER_HOST_IP:8083`
63+
- KSQL Server: `$DOCKER_HOST_IP:8088`
64+
- (experimental) JMX port at `$DOCKER_HOST_IP:9001`
65+
66+
Run with:
67+
```
68+
docker-compose -f full-stack.yml up
69+
docker-compose -f full-stack.yml down
70+
```
71+
** Note: if you find that you can not connect to [localhost:8080](http://localhost:8080/) please run `docker-compose -f full-stack.yml build` to rebuild the port mappings.
5072

5173
## Single Zookeeper / Single Kafka
5274

@@ -106,25 +128,6 @@ docker-compose -f zk-multiple-kafka-multiple.yml up
106128
docker-compose -f zk-multiple-kafka-multiple.yml down
107129
```
108130

109-
## Full stack
110-
111-
Need a UI? We recommend using [Conduktor](https://conduktor.io) as your tool to bring a unified UI to all these components
112-
113-
- Single Zookeeper: `$DOCKER_HOST_IP:2181`
114-
- Single Kafka: `$DOCKER_HOST_IP:9092`
115-
- Kafka Schema Registry: `$DOCKER_HOST_IP:8081`
116-
- Kafka Rest Proxy: `$DOCKER_HOST_IP:8082`
117-
- Kafka Connect: `$DOCKER_HOST_IP:8083`
118-
- KSQL Server: `$DOCKER_HOST_IP:8088`
119-
- Zoonavigator Web: `$DOCKER_HOST_IP:8004`
120-
- (experimental) JMX port at `$DOCKER_HOST_IP:9999`
121-
122-
Run with:
123-
```
124-
docker-compose -f full-stack.yml up
125-
docker-compose -f full-stack.yml down
126-
```
127-
128131
# FAQ
129132

130133
## Kafka
@@ -157,12 +160,12 @@ A: yes. Say you want to change `zoo1` port to `12181` (only relevant lines are s
157160
A: yes. Say you want to change `kafka1` port to `12345` (only relevant lines are shown). Note only `LISTENER_DOCKER_EXTERNAL` changes:
158161
```
159162
kafka1:
160-
image: confluentinc/cp-kafka:7.1.1
163+
image: confluentinc/cp-kafka:7.2.1
161164
hostname: kafka1
162165
ports:
163166
- "12345:12345"
164167
environment:
165-
KAFKA_ADVERTISED_LISTENERS: LISTENER_DOCKER_INTERNAL://kafka1:19092,LISTENER_DOCKER_EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:12345
168+
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka1:19092,EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:12345,DOCKER://host.docker.internal:29092
166169
```
167170

168171
**Q: Kafka is using a lot of disk space for testing. Can I reduce it?**
@@ -171,7 +174,7 @@ A: yes. This is for testing only!!! Reduce the KAFKA_LOG_SEGMENT_BYTES to 16MB a
171174

172175
```
173176
kafka1:
174-
image: confluentinc/cp-kafka:7.1.1
177+
image: confluentinc/cp-kafka:7.2.1
175178
...
176179
environment:
177180
...
@@ -187,11 +190,11 @@ For example, if the IP of your machine is `50.10.2.3`, follow the sample mapping
187190

188191
```
189192
kafka1:
190-
image: confluentinc/cp-kafka:7.1.1
193+
image: confluentinc/cp-kafka:7.2.1
191194
...
192195
environment:
193196
...
194-
KAFKA_ADVERTISED_LISTENERS: LISTENER_DOCKER_INTERNAL://kafka2:19093,LISTENER_DOCKER_EXTERNAL://50.10.2.3:9093
197+
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka2:19093,EXTERNAL://50.10.2.3:9093,DOCKER://host.docker.internal:29093
195198
```
196199

197200
**Q: How do I add connectors to kafka connect?**

full-stack.yml

+35-16
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '2.1'
22

33
services:
44
zoo1:
5-
image: confluentinc/cp-zookeeper:7.1.1
5+
image: confluentinc/cp-zookeeper:7.3.2
66
hostname: zoo1
77
container_name: zoo1
88
ports:
@@ -13,31 +13,32 @@ services:
1313
ZOOKEEPER_SERVERS: zoo1:2888:3888
1414

1515
kafka1:
16-
image: confluentinc/cp-kafka:7.1.1
16+
image: confluentinc/cp-kafka:7.3.2
1717
hostname: kafka1
1818
container_name: kafka1
1919
ports:
2020
- "9092:9092"
21+
- "29092:29092"
2122
- "9999:9999"
2223
environment:
23-
KAFKA_ADVERTISED_LISTENERS: LISTENER_DOCKER_INTERNAL://kafka1:19092,LISTENER_DOCKER_EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9092
24-
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LISTENER_DOCKER_INTERNAL:PLAINTEXT,LISTENER_DOCKER_EXTERNAL:PLAINTEXT
25-
KAFKA_INTER_BROKER_LISTENER_NAME: LISTENER_DOCKER_INTERNAL
24+
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka1:19092,EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9092,DOCKER://host.docker.internal:29092
25+
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,DOCKER:PLAINTEXT
26+
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
2627
KAFKA_ZOOKEEPER_CONNECT: "zoo1:2181"
2728
KAFKA_BROKER_ID: 1
2829
KAFKA_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO"
2930
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
3031
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
3132
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
32-
KAFKA_JMX_PORT: 9999
33+
KAFKA_JMX_PORT: 9001
3334
KAFKA_JMX_HOSTNAME: ${DOCKER_HOST_IP:-127.0.0.1}
3435
KAFKA_AUTHORIZER_CLASS_NAME: kafka.security.authorizer.AclAuthorizer
3536
KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: "true"
3637
depends_on:
3738
- zoo1
3839

3940
kafka-schema-registry:
40-
image: confluentinc/cp-schema-registry:7.1.1
41+
image: confluentinc/cp-schema-registry:7.3.2
4142
hostname: kafka-schema-registry
4243
container_name: kafka-schema-registry
4344
ports:
@@ -52,7 +53,7 @@ services:
5253

5354

5455
kafka-rest-proxy:
55-
image: confluentinc/cp-kafka-rest:7.1.1
56+
image: confluentinc/cp-kafka-rest:7.3.2
5657
hostname: kafka-rest-proxy
5758
container_name: kafka-rest-proxy
5859
ports:
@@ -70,7 +71,7 @@ services:
7071

7172

7273
kafka-connect:
73-
image: confluentinc/cp-kafka-connect:7.1.1
74+
image: confluentinc/cp-kafka-connect:7.3.2
7475
hostname: kafka-connect
7576
container_name: kafka-connect
7677
ports:
@@ -112,7 +113,7 @@ services:
112113
113114
114115
ksqldb-server:
115-
image: confluentinc/cp-ksqldb-server:7.1.1
116+
image: confluentinc/cp-ksqldb-server:7.3.2
116117
hostname: ksqldb-server
117118
container_name: ksqldb-server
118119
ports:
@@ -125,11 +126,29 @@ services:
125126
- zoo1
126127
- kafka1
127128

128-
zoonavigator:
129-
image: elkozmon/zoonavigator:1.1.1
130-
container_name: zoonavigator
129+
conduktor-platform:
130+
image: conduktor/conduktor-platform:latest
131131
ports:
132-
- "8004:8000"
132+
- 8080:8080
133+
volumes:
134+
- conduktor_data:/var/conduktor
135+
- type: bind
136+
source: "./platform-config.yaml"
137+
target: /opt/conduktor/platform-config.yaml
138+
read_only: true
139+
depends_on:
140+
- kafka1
141+
- kafka-schema-registry
142+
- kafka-connect
133143
environment:
134-
HTTP_PORT: 8000
135-
AUTO_CONNECT_CONNECTION_STRING: zoo1:2181
144+
CDK_IN_CONF_FILE: /opt/conduktor/platform-config.yaml
145+
KAFKA_BOOTSTRAP_SERVER: PLAINTEXT://kafka1:19092
146+
SR_SERVER: "http://kafka-schema-registry:8081"
147+
ORGANISATION_NAME: "default"
148+
ADMIN_EMAIL: "[email protected]"
149+
ADMIN_PSW: "admin"
150+
151+
152+
volumes:
153+
conduktor_data: {}
154+

jmx-exporter.yml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
lowercaseOutputName: true
2+
lowercaseOutputLabelNames: true
3+
rules:
4+
# Special cases and very specific rules
5+
- pattern : kafka.server<type=(.+), name=(.+), clientId=(.+), topic=(.+), partition=(.*)><>Value
6+
name: kafka_server_$1_$2
7+
type: GAUGE
8+
labels:
9+
clientId: "$3"
10+
topic: "$4"
11+
partition: "$5"
12+
- pattern : kafka.server<type=(.+), name=(.+), clientId=(.+), brokerHost=(.+), brokerPort=(.+)><>Value
13+
name: kafka_server_$1_$2
14+
type: GAUGE
15+
labels:
16+
clientId: "$3"
17+
broker: "$4:$5"
18+
19+
- pattern : kafka.server<type=KafkaRequestHandlerPool, name=RequestHandlerAvgIdlePercent><>OneMinuteRate
20+
name: kafka_server_kafkarequesthandlerpool_requesthandleravgidlepercent_total
21+
type: GAUGE
22+
23+
- pattern : kafka.server<type=socket-server-metrics, clientSoftwareName=(.+), clientSoftwareVersion=(.+), listener=(.+), networkProcessor=(.+)><>connections
24+
name: kafka_server_socketservermetrics_connections
25+
type: GAUGE
26+
labels:
27+
client_software_name: "$1"
28+
client_software_version: "$2"
29+
listener: "$3"
30+
network_processor: "$4"
31+
32+
- pattern : 'kafka.server<type=socket-server-metrics, listener=(.+), networkProcessor=(.+)><>(.+):'
33+
name: kafka_server_socketservermetrics_$3
34+
type: GAUGE
35+
labels:
36+
listener: "$1"
37+
network_processor: "$2"
38+
39+
# Count and Value
40+
- pattern: kafka.(.+)<type=(.+), name=(.+), (.+)=(.+), (.+)=(.+)><>(Count|Value)
41+
name: kafka_$1_$2_$3
42+
labels:
43+
"$4": "$5"
44+
"$6": "$7"
45+
- pattern: kafka.(.+)<type=(.+), name=(.+), (.+)=(.+)><>(Count|Value)
46+
name: kafka_$1_$2_$3
47+
labels:
48+
"$4": "$5"
49+
- pattern: kafka.(.+)<type=(.+), name=(.+)><>(Count|Value)
50+
name: kafka_$1_$2_$3
51+
52+
# Percentile
53+
- pattern: kafka.(.+)<type=(.+), name=(.+), (.+)=(.*), (.+)=(.+)><>(\d+)thPercentile
54+
name: kafka_$1_$2_$3
55+
type: GAUGE
56+
labels:
57+
"$4": "$5"
58+
"$6": "$7"
59+
quantile: "0.$8"
60+
- pattern: kafka.(.+)<type=(.+), name=(.+), (.+)=(.*)><>(\d+)thPercentile
61+
name: kafka_$1_$2_$3
62+
type: GAUGE
63+
labels:
64+
"$4": "$5"
65+
quantile: "0.$6"
66+
- pattern: kafka.(.+)<type=(.+), name=(.+)><>(\d+)thPercentile
67+
name: kafka_$1_$2_$3
68+
type: GAUGE
69+
labels:
70+
quantile: "0.$4"

platform-config.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
organization:
2+
name: "${ORGANISATION_NAME}"
3+
4+
clusters:
5+
- id: default
6+
name: My Local Kafka Cluster
7+
color: "#0013E7"
8+
ignoreUntrustedCertificate: false
9+
bootstrapServers: "$KAFKA_BOOTSTRAP_SERVER"
10+
properties:
11+
schemaRegistry:
12+
url: "$SR_SERVER"
13+
ignoreUntrustedCertificate: false
14+
properties:
15+
labels: {}
16+
kafkaConnects:
17+
- url: http://kafka-connect:8083
18+
name: full stack kafka connect
19+
20+
auth:
21+
demo-users:
22+
- email: "${ADMIN_EMAIL}"
23+
password: "${ADMIN_PSW}"
24+
groups:
25+
- ADMIN

0 commit comments

Comments
 (0)