diff --git a/examples/create-kafka-commands.sh b/examples/create-kafka-commands.sh index f11be364..fe699338 100644 --- a/examples/create-kafka-commands.sh +++ b/examples/create-kafka-commands.sh @@ -9,7 +9,7 @@ TARGET=$1 mkdir -p $TARGET # create Kafka scripts -SCRIPTS=$(docker run --rm -it --entrypoint /bin/bash confluentinc/cp-kafka:5.4.0 -c "compgen -c | grep -E '(zook*|kafka*)'") +SCRIPTS=$(docker run --rm -it --entrypoint /bin/bash confluentinc/cp-kafka:7.6.0 -c "compgen -c | grep -E '(zook*|kafka*)'") for SCRIPT in $SCRIPTS; do SCRIPT=$(echo $SCRIPT | tr -d '\r') FN=$TARGET/$(basename $SCRIPT) @@ -17,7 +17,7 @@ for SCRIPT in $SCRIPTS; do cat <<-EOF > $FN #!/bin/bash CMD="$SCRIPT \$@" - docker run --net=host --rm -it --entrypoint /bin/bash confluentinc/cp-kafka:5.4.0 -c "\$CMD" + docker run --net=host --rm -it --entrypoint /bin/bash confluentinc/cp-kafka:7.6.0 -c "\$CMD" EOF chmod +x $FN done @@ -27,6 +27,6 @@ echo creating $TARGET/zkCli.sh cat <<-EOF > $TARGET/zkCli.sh #!/bin/bash CMD="bin/zkCli.sh \$@" - docker run --net=host --rm -it zookeeper:3.4.9 bash -c "\$CMD" + docker run --net=host --rm -it confluentinc/cp-zookeeper:7.6.0 bash -c "\$CMD" EOF chmod +x $TARGET/zkCli.sh diff --git a/examples/docker-compose.yml b/examples/docker-compose.yml index 3a19f462..819e0fad 100644 --- a/examples/docker-compose.yml +++ b/examples/docker-compose.yml @@ -1,21 +1,20 @@ version: '3' services: zoo1: - image: zookeeper:3.4.9 + image: confluentinc/cp-zookeeper:7.6.0 hostname: zoo1 container_name: zoo1 ports: - "2181:2181" environment: - ZOO_MY_ID: 1 - ZOO_PORT: 2181 - ZOO_SERVERS: server.1=zoo1:2888:3888 + ZOOKEEPER_CLIENT_PORT: 2181 + ZOOKEEPER_TICK_TIME: 2000 ulimits: nofile: soft: 65536 hard: 65536 kafka1: - image: confluentinc/cp-kafka:5.4.0 + image: confluentinc/cp-kafka:7.6.0 hostname: kafka1 container_name: kafka1 ulimits: @@ -25,10 +24,11 @@ services: ports: - "9092:9092" environment: - KAFKA_ADVERTISED_LISTENERS: LISTENER_DOCKER_INTERNAL://kafka1:19092,LISTENER_DOCKER_EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9092 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LISTENER_DOCKER_INTERNAL:PLAINTEXT,LISTENER_DOCKER_EXTERNAL:PLAINTEXT - KAFKA_INTER_BROKER_LISTENER_NAME: LISTENER_DOCKER_INTERNAL - KAFKA_ZOOKEEPER_CONNECT: "zoo1:2181" + KAFKA_ZOOKEEPER_CONNECT: zoo1:2181 + KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka1:19092,PLAINTEXT_HOST://localhost:29092,EXTERNAL_SAME_HOST://${DOCKER_HOST_IP:-127.0.0.1}:9092 + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT,EXTERNAL_SAME_HOST:PLAINTEXT + KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false" KAFKA_OFFSETS_COMMIT_TIMEOUT_MS: "10000" KAFKA_BROKER_ID: 1 @@ -38,7 +38,7 @@ services: depends_on: - zoo1 kafka2: - image: confluentinc/cp-kafka:5.4.0 + image: confluentinc/cp-kafka:7.6.0 hostname: kafka2 container_name: kafka2 ulimits: @@ -48,10 +48,11 @@ services: ports: - "9093:9093" environment: - KAFKA_ADVERTISED_LISTENERS: LISTENER_DOCKER_INTERNAL://kafka2:19093,LISTENER_DOCKER_EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9093 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LISTENER_DOCKER_INTERNAL:PLAINTEXT,LISTENER_DOCKER_EXTERNAL:PLAINTEXT - KAFKA_INTER_BROKER_LISTENER_NAME: LISTENER_DOCKER_INTERNAL - KAFKA_ZOOKEEPER_CONNECT: "zoo1:2181" + KAFKA_ZOOKEEPER_CONNECT: zoo1:2181 + KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka2:19093,PLAINTEXT_HOST://localhost:29093,EXTERNAL_SAME_HOST://${DOCKER_HOST_IP:-127.0.0.1}:9093 + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT,EXTERNAL_SAME_HOST:PLAINTEXT + KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false" KAFKA_OFFSETS_COMMIT_TIMEOUT_MS: "10000" KAFKA_BROKER_ID: 2 @@ -61,7 +62,7 @@ services: depends_on: - zoo1 kafka3: - image: confluentinc/cp-kafka:5.4.0 + image: confluentinc/cp-kafka:7.6.0 hostname: kafka3 container_name: kafka3 ulimits: @@ -71,10 +72,11 @@ services: ports: - "9094:9094" environment: - KAFKA_ADVERTISED_LISTENERS: LISTENER_DOCKER_INTERNAL://kafka3:19094,LISTENER_DOCKER_EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9094 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LISTENER_DOCKER_INTERNAL:PLAINTEXT,LISTENER_DOCKER_EXTERNAL:PLAINTEXT - KAFKA_INTER_BROKER_LISTENER_NAME: LISTENER_DOCKER_INTERNAL - KAFKA_ZOOKEEPER_CONNECT: "zoo1:2181" + KAFKA_ZOOKEEPER_CONNECT: zoo1:2181 + KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka3:19094,PLAINTEXT_HOST://localhost:29094,EXTERNAL_SAME_HOST://${DOCKER_HOST_IP:-127.0.0.1}:9094 + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT,EXTERNAL_SAME_HOST:PLAINTEXT + KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false" KAFKA_OFFSETS_COMMIT_TIMEOUT_MS: "10000" KAFKA_BROKER_ID: 3