Skip to content

Commit

Permalink
Fixtures for kafka versions, KAFKA_IMAGE_TAG
Browse files Browse the repository at this point in the history
  • Loading branch information
ssingudasu committed Nov 28, 2023
1 parent 46bf022 commit 1460c00
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 21 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ jobs:
KAFKA_CFG_BROKER_RACK: zone1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
ALLOW_PLAINTEXT_LISTENER: yes
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka1:9092
KAFKA_CFG_ADVERTISED_HOST_NAME: kafka1
KAFKA_CFG_ADVERTISED_PORT: 9092

kafka2:
image: bitnami/kafka:0.10.2.1
Expand All @@ -77,8 +77,8 @@ jobs:
KAFKA_CFG_BROKER_RACK: zone1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
ALLOW_PLAINTEXT_LISTENER: yes
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka2:9092
KAFKA_CFG_ADVERTISED_HOST_NAME: kafka2
KAFKA_CFG_ADVERTISED_PORT: 9092

kafka3:
image: bitnami/kafka:0.10.2.1
Expand All @@ -89,8 +89,8 @@ jobs:
KAFKA_CFG_BROKER_RACK: zone2
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
ALLOW_PLAINTEXT_LISTENER: yes
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka3:9092
KAFKA_CFG_ADVERTISED_HOST_NAME: kafka3
KAFKA_CFG_ADVERTISED_PORT: 9092

kafka4:
image: bitnami/kafka:0.10.2.1
Expand All @@ -101,8 +101,8 @@ jobs:
KAFKA_CFG_BROKER_RACK: zone2
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
ALLOW_PLAINTEXT_LISTENER: yes
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka4:9092
KAFKA_CFG_ADVERTISED_HOST_NAME: kafka4
KAFKA_CFG_ADVERTISED_PORT: 9092

kafka5:
image: bitnami/kafka:0.10.2.1
Expand All @@ -113,8 +113,8 @@ jobs:
KAFKA_CFG_BROKER_RACK: zone3
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
ALLOW_PLAINTEXT_LISTENER: yes
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka5:9092
KAFKA_CFG_ADVERTISED_HOST_NAME: kafka5
KAFKA_CFG_ADVERTISED_PORT: 9092

kafka6:
image: bitnami/kafka:0.10.2.1
Expand All @@ -125,8 +125,8 @@ jobs:
KAFKA_CFG_BROKER_RACK: zone3
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
ALLOW_PLAINTEXT_LISTENER: yes
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka6:9092
KAFKA_CFG_ADVERTISED_HOST_NAME: kafka6
KAFKA_CFG_ADVERTISED_PORT: 9092


test270:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,8 @@ Then, run:
make test
```

You can change the Kafka version in docker-compose.yml and docker-compose-auth.yml files before running `docker-compose up -d`. See the
You can change the Kafka version of the local cluster by setting the
`KAFKA_IMAGE_TAG` environment variable when running `docker-compose up -d`. See the
[`bitnami/kafka` dockerhub page](https://hub.docker.com/r/bitnami/kafka/tags) for more
details on the available versions.

Expand Down
7 changes: 6 additions & 1 deletion docker-compose-auth.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# By default, this docker-compose setup uses Kafka 2.7.0. This version can
# be overwritten by setting the KAFKA_IMAGE_TAG environment variable.
#
# See https://hub.docker.com/r/bitnami/kafka/tags for the complete list.
#
# This config sets up a simple, single-node cluster that's equipped to use SSL/TLS and/or SASL.
# It exposes access on four separate ports:
#
Expand All @@ -22,7 +27,7 @@ services:
kafka:
container_name: kafka
hostname: kafka
image: bitnami/kafka:2.7.0
image: bitnami/kafka:${KAFKA_IMAGE_TAG:-2.7.0}
depends_on:
- zookeeper
restart: on-failure:3
Expand Down
15 changes: 8 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# By default, this docker-compose setup uses Kafka 2.7.0
# By default, this docker-compose setup uses Kafka 2.7.0. This version can
# be overwritten by setting the KAFKA_IMAGE_TAG environment variable.
#
# See https://hub.docker.com/r/bitnami/kafka/tags for the complete list.
version: '3'
Expand All @@ -16,7 +17,7 @@ services:
kafka1:
container_name: kafka1
hostname: 169.254.123.123
image: bitnami/kafka:2.7.0
image: bitnami/kafka:${KAFKA_IMAGE_TAG:-2.7.0}
ports:
- "9092:9092"
environment:
Expand All @@ -34,7 +35,7 @@ services:
kafka2:
container_name: kafka2
hostname: 169.254.123.123
image: bitnami/kafka:2.7.0
image: bitnami/kafka:${KAFKA_IMAGE_TAG:-2.7.0}
ports:
- "9093:9092"
environment:
Expand All @@ -53,7 +54,7 @@ services:
kafka3:
container_name: kafka3
hostname: 169.254.123.123
image: bitnami/kafka:2.7.0
image: bitnami/kafka:${KAFKA_IMAGE_TAG:-2.7.0}
ports:
- "9094:9092"
environment:
Expand All @@ -71,7 +72,7 @@ services:
kafka4:
container_name: kafka4
hostname: 169.254.123.123
image: bitnami/kafka:2.7.0
image: bitnami/kafka:${KAFKA_IMAGE_TAG:-2.7.0}
ports:
- "9095:9092"
environment:
Expand All @@ -90,7 +91,7 @@ services:
kafka5:
container_name: kafka5
hostname: 169.254.123.123
image: bitnami/kafka:2.7.0
image: bitnami/kafka:${KAFKA_IMAGE_TAG:-2.7.0}
ports:
- "9096:9092"
environment:
Expand All @@ -108,7 +109,7 @@ services:
kafka6:
container_name: kafka6
hostname: 169.254.123.123
image: bitnami/kafka:2.7.0
image: bitnami/kafka:${KAFKA_IMAGE_TAG:-2.7.0}
ports:
- "9097:9092"
environment:
Expand Down

0 comments on commit 1460c00

Please sign in to comment.