Skip to content

vselcuk/zookeeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository contains a sample usage of ZooKeeper Dynamic Reconfiguration.

How to run it

Build the zookeeper image

docker-compose build

Run the first zookeeper container

docker-compose up zk_main

Run the second zookeeper container

docker-compose up --scale zk_follower=1

Run the third zookeeper container

docker-compose up --scale zk_follower=2

Run the fourth zookeeper container

docker-compose up --scale zk_follower=3

and so on...

Validate the Zookeeper configuration

Get any of the follower zookeeper's ip

ZK_FOLLOWER_IP=`docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <CONTAINER ID>`

Compare the server configuration from the first zookeeper and the follower

docker exec zk_main zkCli.sh -server localhost get /zookeeper/config | grep ^server
docker exec zk_main zkCli.sh -server ${ZK_FOLLOWER_IP} get /zookeeper/config | grep ^server

About

Zookeeper docker sample

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages