From: Kai Moritz Date: Thu, 13 Jun 2024 12:01:29 +0000 (+0200) Subject: Die 3 Zookeeper arbeiten in einem Ensemble X-Git-Tag: config/flawed-setup--zookeeper--BRANCH-ENDE~3 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=17a88792ae63706d11d5781d74c24058e182c227;p=demos%2Fkafka%2Ftraining Die 3 Zookeeper arbeiten in einem Ensemble * Siehe: https://github.com/confluentinc/examples/blob/1f835b09cc482cbab2856367b24d905a34da08ab/multiregion/docker-compose.yml[Beispiel-Setup mit 3 Zookeeper-Nodes] * Das Setup stammt aus dem https://docs.confluent.io/platform/current/multi-dc-deployments/multiregion.html[Multi-Region Bespiel] von Confluent --- diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index a4dcaad..3ffea3e 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -3,7 +3,9 @@ services: zookeeper-1: image: confluentinc/cp-zookeeper:7.5.1 environment: + ZOOKEEPER_SERVER_ID: 1 ZOOKEEPER_CLIENT_PORT: 2181 + ZOOKEEPER_SERVERS: zookeeper-1:2888:3888;zookeeper-2:2888:3888;zookeeper-3:2888:3888 ports: - 2181:2181 volumes: @@ -13,7 +15,9 @@ services: zookeeper-2: image: confluentinc/cp-zookeeper:7.5.1 environment: + ZOOKEEPER_SERVER_ID: 2 ZOOKEEPER_CLIENT_PORT: 2181 + ZOOKEEPER_SERVERS: zookeeper-1:2888:3888;zookeeper-2:2888:3888;zookeeper-3:2888:3888 ports: - 2182:2181 volumes: @@ -23,7 +27,9 @@ services: zookeeper-3: image: confluentinc/cp-zookeeper:7.5.1 environment: + ZOOKEEPER_SERVER_ID: 3 ZOOKEEPER_CLIENT_PORT: 2181 + ZOOKEEPER_SERVERS: zookeeper-1:2888:3888;zookeeper-2:2888:3888;zookeeper-3:2888:3888 ports: - 2183:2181 volumes: