Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for kafka 3 with zookeeper support (adding images for 3.0.1, 3.1.1 and 3.2.0) #709

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ac64f78
Jack12816 initial 3.0 approach
frank-vissing-se May 11, 2022
07b56eb
Merge remote-tracking branch 'origin/master' into going_to_3
frank-vissing-se May 11, 2022
a576cbf
make test independent on how sort works
frank-vissing-se May 12, 2022
f267754
add support for kafka 3.1.0
frank-vissing-se May 12, 2022
5d7a593
add newer and better versions
frank-vissing-se May 18, 2022
8be81b0
make sure user removes obsolete config
frank-vissing-se May 18, 2022
ecef794
support 3.x in compose
frank-vissing-se May 18, 2022
c527cb5
fix typo
frank-vissing-se May 18, 2022
289836a
fix missing $ (typo)
frank-vissing-se May 18, 2022
426638f
re add BROKER_LIST, propper default KAFKA_VERSION
frank-vissing-se May 19, 2022
823e024
make shell test happy
frank-vissing-se May 19, 2022
c3c455f
propper default
frank-vissing-se May 19, 2022
57af850
do not require BROKER_LIST
frank-vissing-se May 19, 2022
750ebb1
refactor removed arguments for kafka
frank-vissing-se May 19, 2022
01fa192
start kafka with propper options
frank-vissing-se May 20, 2022
fe19311
supply entire list of bootstrap servers
frank-vissing-se May 20, 2022
8a8daf4
various test cleanup to support removal of KAFKA_ADVERTISED_HOST_NAME…
frank-vissing-se May 20, 2022
8914a83
fix shell check
frank-vissing-se May 20, 2022
724866b
make MAJOR_VERSION accessible for test scripts
frank-vissing-se May 20, 2022
a97e332
propper naming of versions.sh
frank-vissing-se May 20, 2022
8d80440
fix selection of kafka args
frank-vissing-se May 20, 2022
13933fd
revievers comment about wrong hostname, changing to propper name kafka
frank-vissing-se May 20, 2022
14f089d
reviewers comment about not needing seperate test setup for previous …
frank-vissing-se May 23, 2022
b3e54b0
trigger build
frank-vissing-se May 23, 2022
704e9ab
no need to specify compose file
frank-vissing-se May 23, 2022
0698081
totally revert this file
frank-vissing-se May 23, 2022
58dfb8f
trigger build
frank-vissing-se Jun 8, 2022
8922faa
typo in readme, we are in the test folder when executing this, this i…
frank-vissing-se Jun 30, 2022
2abb7db
examine KAFKA_LISTNERS to determine the port we are runing on, also r…
frank-vissing-se Jun 30, 2022
001df7d
Double quote to prevent globbing
frank-vissing-se Jun 30, 2022
722fc5c
make create topics work both for KAFKA_LISTNERS and BROKER_LIST
frank-vissing-se Jun 30, 2022
19d8c52
changed image
sharninder Apr 17, 2023
3b705db
Merge pull request #3 from sharninder/upgrade-image
lunarfs Apr 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion test/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ To execute

```
cd test
docker-compose up -d zookeeper kafka_1 kafka_2
# if kafka veresion < 3
docker-compose -f docker-compose.yml -f docker-compose-kafka.yml up -d zookeeper kafka_1 kafka_2
# if kafka veresion >= 3
docker-compose -f docker-compose.yml -f docker-compose-kafka3.yml up -d zookeeper kafka_1 kafka_2
./runAllTests.sh
```

Expand Down
2 changes: 0 additions & 2 deletions test/docker-compose-kafka3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ services:
kafka_1:
environment:
<<: *kafka-environment-defaults
KAFKA_BROKER_ID: 1
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka_1:9092

kafka_2:
environment:
<<: *kafka-environment-defaults
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka_2:9092
KAFKA_BROKER_ID: 2

kafkatest:
environment:
Expand Down
1 change: 0 additions & 1 deletion test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ services:
kafkatest:
image: wurstmeister/kafka
environment:
KAFKA_PORT: 9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes:
- .:/tests
Expand Down
11 changes: 11 additions & 0 deletions test/scenarios/jmx/docker-compose-kafka.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '2'
services:
kafka:
environment:
KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_ADVERTISED_PORT: 9092
KAFKA_PORT: 9092

test:
environment:
KAFKA_PORT: 9092
6 changes: 6 additions & 0 deletions test/scenarios/jmx/docker-compose-kafka3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: '2'
services:
kafka:
environment:
KAFKA_LISTENERS: PLAINTEXT://:9092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka_1:9092
4 changes: 0 additions & 4 deletions test/scenarios/jmx/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ services:
- "9092"
- "1099"
environment:
KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_ADVERTISED_PORT: 9092
KAFKA_PORT: 9092
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_JMX_OPTS: "-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka -Dcom.sun.management.jmxremote.rmi.port=1099"
Expand All @@ -31,7 +28,6 @@ services:
test:
image: wurstmeister/kafka
environment:
KAFKA_PORT: 9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes:
- .:/scenario
Expand Down
10 changes: 9 additions & 1 deletion test/scenarios/runJmxScenario.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
set -e -o pipefail

pushd jmx
docker-compose up -d zookeeper kafka jmxexporter
# shellcheck disable=SC1091
source "/usr/bin/versions.sh"
# since 3.0.0 a few options has been disabled, start kafka with the propper options
if [[ "$MAJOR_VERSION" -ge "3" ]]; then
docker-compose -f docker-compose.yml -f docker-compose-kafka3.yml up -d zookeeper kafka jmxexporter
else
docker-compose -f docker-compose.yml -f docker-compose-kafka.yml up -d zookeeper kafka jmxexporter
fi

docker-compose run --rm test
docker-compose stop
popd