From 7d55efc8872220dc0b4250cecb010601198791f7 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Wed, 11 Oct 2023 18:20:07 +0200 Subject: [PATCH] =?utf8?q?4.=20Broker=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- docker/docker-compose.yml | 30 ++++++++++++++++++++++++++++++ docker/reasignment.json | 28 ++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 docker/reasignment.json diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 38094bd..51858a2 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -102,6 +102,35 @@ services: depends_on: - zookeeper + kafka-4: + image: confluentinc/cp-kafka:7.5.1 + environment: + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_LISTENERS: BROKER://:9092, LOCALHOST://:9084 + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: BROKER:PLAINTEXT, LOCALHOST:PLAINTEXT + KAFKA_ADVERTISED_LISTENERS: BROKER://kafka-4:9092, LOCALHOST://localhost:9084 + KAFKA_BROKER_ID: 4 + KAFKA_INTER_BROKER_LISTENER_NAME: BROKER + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3 + KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false" + KAFKA_AUTHORIZER_CLASS_NAME: kafka.security.authorizer.AclAuthorizer + KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: "true" + KAFKA_OPTS: + -javaagent:/usr/share/java/cp-base-new/jmx_prometheus_javaagent-0.18.0.jar=0.0.0.0:80:/etc/jmx-exporter.yml + -Dcom.sun.management.jmxremote=true + -Dcom.sun.management.jmxremote.port=9101 + -Dcom.sun.management.jmxremote.authenticate=false + KAFKA_METRIC_REPORTERS: com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter + volumes: + - ./jmx-exporter.yml:/etc/jmx-exporter.yml:ro + - ./cruise-control-metrics-reporter.jar:/usr/share/java/kafka/cruise-control-metrics-reporter.jar:ro + - kafka-4-data:/var/lib/kafka/data + ports: + - 9084:9084 + stop_grace_period: 120s + depends_on: + - zookeeper + cruise-control: image: juplo/cruise-control environment: @@ -244,3 +273,4 @@ volumes: kafka-1-data: kafka-2-data: kafka-3-data: + kafka-4-data: diff --git a/docker/reasignment.json b/docker/reasignment.json new file mode 100644 index 0000000..f4c5926 --- /dev/null +++ b/docker/reasignment.json @@ -0,0 +1,28 @@ +{ + "version": 1, + "partitions": [ + { + "topic": "test", + "partition": 0, + "replicas": [ + 2, + 1, + 3 + ], + "log_dirs": [ + "any", + "any", + "any" + ] + }, + { + "topic": "test", + "partition": 1, + "replicas": [ + 2, + 1, + 3 + ] + } + ] +} -- 2.20.1