diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ccd4149..7458a22d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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: diff --git a/README.md b/README.md index d681f26d..bccbcbd6 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/docker-compose-auth.yml b/docker-compose-auth.yml index cbb1bd65..553e9a0e 100644 --- a/docker-compose-auth.yml +++ b/docker-compose-auth.yml @@ -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: # @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 13bc7508..d142a765 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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' @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: