Skip to content

Commit c6f0633

Browse files
committed
Merge branch 'master' of github.com:simplesteph/kafka-stack-docker-compose
2 parents 6a23b5a + bd6d3a8 commit c6f0633

8 files changed

+45
-38
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ script:
2525
- ./test.sh zk-multiple-kafka-single.yml 4
2626
- ./test.sh zk-single-kafka-multiple.yml 4
2727
- ./test.sh zk-multiple-kafka-multiple.yml 6
28-
- ./test.sh full-stack.yml 10
28+
- ./test.sh full-stack.yml 10

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [yyyy] [name of copyright owner]
189+
Copyright 2019 Stephane Maarek
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@
44

55
This replicates as well as possible real deployment configurations, where you have your zookeeper servers and kafka servers actually all distinct from each other. This solves all the networking hurdles that comes with Docker and docker-compose, and is compatible cross platform.
66

7-
[UPDATE]: No /etc/hosts file changes are necessary anymore. Explanations at: https://rmoff.net/2018/08/02/kafka-listeners-explained/
7+
**UPDATE**: No /etc/hosts file changes are necessary anymore. Explanations at: https://rmoff.net/2018/08/02/kafka-listeners-explained/
88

99
## Stack version
1010

1111
- Zookeeper version: 3.4.9
12-
- Kafka version: 2.1.0 (Confluent 5.1.0)
13-
- Kafka Schema Registry: Confluent 5.1.0
12+
- Kafka version: 2.4.0 (Confluent 5.4.1)
13+
- Kafka Schema Registry: Confluent 5.4.1
1414
- Kafka Schema Registry UI: 0.9.4
15-
- Kafka Rest Proxy: Confluent 5.1.0
15+
- Kafka Rest Proxy: Confluent 5.4.1
1616
- Kafka Topics UI: 0.9.4
17-
- Kafka Connect: Confluent 5.1.0
17+
- Kafka Connect: Confluent 5.4.1
1818
- Kafka Connect UI: 0.9.4
19-
- Zoonavigator: 0.5.1
19+
- KSQL Server: Confluent 5.4.1
20+
- Zoonavigator: 0.8.0
2021

2122

2223
## Optional: Kafka Desktop Application
@@ -59,7 +60,7 @@ docker-compose -f zk-single-kafka-single.yml down
5960

6061
## Single Zookeeper / Multiple Kafka
6162

62-
If you want to have two brokers and experiment with replication / fault-tolerance.
63+
If you want to have three brokers and experiment with kafka replication / fault-tolerance.
6364

6465
- Zookeeper will be available at `$DOCKER_HOST_IP:2181`
6566
- Kafka will be available at `$DOCKER_HOST_IP:9092,$DOCKER_HOST_IP:9093,$DOCKER_HOST_IP:9094`
@@ -73,7 +74,7 @@ docker-compose -f zk-single-kafka-multiple.yml down
7374

7475
## Multiple Zookeeper / Single Kafka
7576

76-
If you want to have three zookeeper and experiment with zookeeper fault-tolerance.
77+
If you want to have three zookeeper nodes and experiment with zookeeper fault-tolerance.
7778

7879
- Zookeeper will be available at `$DOCKER_HOST_IP:2181,$DOCKER_HOST_IP:2182,$DOCKER_HOST_IP:2183`
7980
- Kafka will be available at `$DOCKER_HOST_IP:9092`
@@ -87,7 +88,7 @@ docker-compose -f zk-multiple-kafka-single.yml down
8788

8889
## Multiple Zookeeper / Multiple Kafka
8990

90-
If you want to have three zookeeper and two kafka brokers to experiment with production setup.
91+
If you want to have three zookeeper nodes and three kafka brokers to experiment with production setup.
9192

9293
- Zookeeper will be available at `$DOCKER_HOST_IP:2181,$DOCKER_HOST_IP:2182,$DOCKER_HOST_IP:2183`
9394
- Kafka will be available at `$DOCKER_HOST_IP:9092,$DOCKER_HOST_IP:9093,$DOCKER_HOST_IP:9094`
@@ -109,6 +110,7 @@ docker-compose -f zk-multiple-kafka-multiple.yml down
109110
- Kafka Topics UI: `$DOCKER_HOST_IP:8000`
110111
- Kafka Connect: `$DOCKER_HOST_IP:8083`
111112
- Kafka Connect UI: `$DOCKER_HOST_IP:8003`
113+
- KSQL Server: `$DOCKER_HOST_IP:8088`
112114
- Zoonavigator Web: `$DOCKER_HOST_IP:8004`
113115

114116

@@ -150,7 +152,7 @@ A: yes. Say you want to change `zoo1` port to `12181` (only relevant lines are s
150152
A: yes. Say you want to change `kafka1` port to `12345` (only relevant lines are shown). Note only `LISTENER_DOCKER_EXTERNAL` changes:
151153
```
152154
kafka1:
153-
image: confluentinc/cp-kafka:5.1.0
155+
image: confluentinc/cp-kafka:5.4.1
154156
hostname: kafka1
155157
ports:
156158
- "12345:12345"

full-stack.yml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ services:
1717

1818

1919
kafka1:
20-
image: confluentinc/cp-kafka:5.1.0
20+
image: confluentinc/cp-kafka:5.4.1
2121
hostname: kafka1
2222
ports:
2323
- "9092:9092"
@@ -35,7 +35,7 @@ services:
3535
- zoo1
3636

3737
kafka-schema-registry:
38-
image: confluentinc/cp-schema-registry:5.1.0
38+
image: confluentinc/cp-schema-registry:5.4.1
3939
hostname: kafka-schema-registry
4040
ports:
4141
- "8081:8081"
@@ -59,7 +59,7 @@ services:
5959
- kafka-schema-registry
6060

6161
kafka-rest-proxy:
62-
image: confluentinc/cp-kafka-rest:5.1.0
62+
image: confluentinc/cp-kafka-rest:5.4.1
6363
hostname: kafka-rest-proxy
6464
ports:
6565
- "8082:8082"
@@ -89,7 +89,7 @@ services:
8989
- kafka-rest-proxy
9090

9191
kafka-connect:
92-
image: confluentinc/cp-kafka-connect:5.1.0
92+
image: confluentinc/cp-kafka-connect:5.4.1
9393
hostname: kafka-connect
9494
ports:
9595
- "8083:8083"
@@ -112,6 +112,9 @@ services:
112112
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: "1"
113113
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: "1"
114114
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: "1"
115+
CONNECT_PLUGIN_PATH: '/usr/share/java,/etc/kafka-connect/jars'
116+
volumes:
117+
- ./connectors:/etc/kafka-connect/jars/
115118
depends_on:
116119
- zoo1
117120
- kafka1
@@ -129,21 +132,23 @@ services:
129132
depends_on:
130133
- kafka-connect
131134

132-
zoonavigator-web:
133-
image: elkozmon/zoonavigator-web:0.5.1
135+
ksql-server:
136+
image: confluentinc/cp-ksql-server:5.4.1
137+
hostname: ksql-server
134138
ports:
135-
- "8004:8000"
139+
- "8088:8088"
136140
environment:
137-
API_HOST: "zoonavigator-api"
138-
API_PORT: 9000
139-
links:
140-
- zoonavigator-api
141+
KSQL_BOOTSTRAP_SERVERS: PLAINTEXT://kafka1:19092
142+
KSQL_LISTENERS: http://0.0.0.0:8088/
143+
KSQL_KSQL_SERVICE_ID: ksql-server_
141144
depends_on:
142-
- zoonavigator-api
145+
- zoo1
146+
- kafka1
143147

144-
zoonavigator-api:
145-
image: elkozmon/zoonavigator-api:0.5.1
148+
zoonavigator:
149+
image: elkozmon/zoonavigator:0.8.0
150+
ports:
151+
- "8004:8000"
146152
environment:
147-
SERVER_HTTP_PORT: 9000
148-
depends_on:
149-
- zoo1
153+
HTTP_PORT: 8000
154+
AUTO_CONNECT_CONNECTION_STRING: zoo1:2181

zk-multiple-kafka-multiple.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ services:
4242

4343

4444
kafka1:
45-
image: confluentinc/cp-kafka:5.1.0
45+
image: confluentinc/cp-kafka:5.4.1
4646
hostname: kafka1
4747
ports:
4848
- "9092:9092"
@@ -61,7 +61,7 @@ services:
6161
- zoo3
6262

6363
kafka2:
64-
image: confluentinc/cp-kafka:5.1.0
64+
image: confluentinc/cp-kafka:5.4.1
6565
hostname: kafka2
6666
ports:
6767
- "9093:9093"
@@ -80,7 +80,7 @@ services:
8080
- zoo3
8181

8282
kafka3:
83-
image: confluentinc/cp-kafka:5.1.0
83+
image: confluentinc/cp-kafka:5.4.1
8484
hostname: kafka3
8585
ports:
8686
- "9094:9094"

zk-multiple-kafka-single.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ services:
4242

4343

4444
kafka1:
45-
image: confluentinc/cp-kafka:5.1.0
45+
image: confluentinc/cp-kafka:5.4.1
4646
hostname: kafka1
4747
ports:
4848
- "9092:9092"
4949
environment:
5050
KAFKA_ADVERTISED_LISTENERS: LISTENER_DOCKER_INTERNAL://kafka1:19092,LISTENER_DOCKER_EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9092
5151
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LISTENER_DOCKER_INTERNAL:PLAINTEXT,LISTENER_DOCKER_EXTERNAL:PLAINTEXT
5252
KAFKA_INTER_BROKER_LISTENER_NAME: LISTENER_DOCKER_INTERNAL
53-
KAFKA_ZOOKEEPER_CONNECT: "zoo1:2181"
53+
KAFKA_ZOOKEEPER_CONNECT: "zoo1:2181,zoo2:2182,zoo3:2183"
5454
KAFKA_BROKER_ID: 1
5555
KAFKA_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO"
5656
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1

zk-single-kafka-multiple.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ services:
1515
- ./zk-single-kafka-multiple/zoo1/datalog:/datalog
1616

1717
kafka1:
18-
image: confluentinc/cp-kafka:5.1.0
18+
image: confluentinc/cp-kafka:5.4.1
1919
hostname: kafka1
2020
ports:
2121
- "9092:9092"
@@ -32,7 +32,7 @@ services:
3232
- zoo1
3333

3434
kafka2:
35-
image: confluentinc/cp-kafka:5.1.0
35+
image: confluentinc/cp-kafka:5.4.1
3636
hostname: kafka2
3737
ports:
3838
- "9093:9093"
@@ -50,7 +50,7 @@ services:
5050

5151

5252
kafka3:
53-
image: confluentinc/cp-kafka:5.1.0
53+
image: confluentinc/cp-kafka:5.4.1
5454
hostname: kafka3
5555
ports:
5656
- "9094:9094"

zk-single-kafka-single.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ services:
1515
- ./zk-single-kafka-single/zoo1/datalog:/datalog
1616

1717
kafka1:
18-
image: confluentinc/cp-kafka:5.1.0
18+
image: confluentinc/cp-kafka:5.4.1
1919
hostname: kafka1
2020
ports:
2121
- "9092:9092"

0 commit comments

Comments
 (0)