Hazelcast instance automatically joins cluster with Zookeeper discovery. Created mostly for Docker, but can run outside Docker
build docker image example
mvn clean package docker:build
run with docker-compose example
docker-compose up -d
it will also run web ui for Zookeeper on port 9090
scale with docker-compose example
docker-compose scale hazelcast=2
useful Zookeeper commands
echo ruok | nc localhost 2181
echo conf | nc localhost 2181
echo cons | nc localhost 2181
echo stat | nc localhost 2181
echo dump | nc localhost 2181
will display hazelcast members
Docker start container
docker run -p 5701:5701 -e ZOOKEEPER_URL=${ZOOKEEPER_SERVER}:2181 -d agapeteo/hazelcast-zookeeper-member
all optional environment variables:
- ZOOKEEPER_URL - Zookeeper URL (default: localhost)
- ZOOKEEPER_PATH - Zookeeper config path (default: /discovery/hazelcast)
- ZOOKEEPER_GROUP - Zookeeper config group (default: defaultHazelcastGroup)