Sign inSign up

pviotti/zookeeper

By pviotti

•Updated over 8 years ago

Docker image to set up a ZooKeeper cluster.

Image
0

1.4K

pviotti/zookeeper repository overview

⁠docker-zookeeper

This project contains the files to set up a ZooKeeper⁠ cluster with Docker⁠.

Image on Docker Hub: https://hub.docker.com/r/pviotti/zookeeper/⁠

⁠Running

⁠Build Docker image
$ git clone https://github.com/pviotti/docker-zookeeper.git
$ cd docker-zookeeper
$ make build
⁠Launch cluster

Environmental variables:

  • ZK_CLUSTER_SIZE – The number of nodes in your ZooKeeper cluster (default: 3)
$ make start
./start-cluster.sh

Bringing up cluster nodes:

Started zookeeper1 (172.18.0.2)
Started zookeeper2 (172.18.0.3)
Started zookeeper3 (172.18.0.4)
⁠Test
$ make test
./test-cluster.sh
172.18.0.2:2181 Mode: follower
172.18.0.3:2181 Mode: leader
172.18.0.4:2181 Mode: follower
⁠Stop and destroy
$ make stop
./stop-cluster.sh
Stopped the cluster and cleared all of the running containers.

⁠Credits and license

License: Apache 2.0.

For this project I took some pieces of scripts and settings from

Tag summary

Content type

Image

Digest

Size

76.6 MB

Last updated

over 8 years ago

docker pull pviotti/zookeeper