Die 3 Zookeeper arbeiten in einem Ensemble
authorKai Moritz <kai@juplo.de>
Thu, 13 Jun 2024 12:01:29 +0000 (14:01 +0200)
committerKai Moritz <kai@juplo.de>
Wed, 25 Sep 2024 10:20:59 +0000 (12:20 +0200)
* 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

docker/docker-compose.yml

index a4dcaad..3ffea3e 100644 (file)
@@ -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: