Skip to content

This is an example of a dynamically created Dockerized RabbitMQ cluster using Consul

License

Notifications You must be signed in to change notification settings

EtienneDufresne/rabbitmq-docker-cluster

Repository files navigation

rabbitmq-docker-cluster

This is an example of a dynamically created Dockerized RabbitMQ cluster using Consul

See these slides for more information

How to run it

Export these variables

export RABBITMQ_DEFAULT_USER=guest
export RABBITMQ_DEFAULT_PASSWORD=guest

Build the image

docker build -t rabbitmq-docker-cluster .

Run Consul, dnsmask and registrator

docker-compose up -d consul dnsmask registrator

Run the RabbitMQ services and automatically form the cluster

docker-compose up -d rabbitmq1 rabbitmq2
docker logs -f rabbitmq1
# In another shell
docker logs -f rabbitmq2

To access the Consul UI to see the registered services and health checks: http://localhost:8500/ui

To access the RabbitMQ management interface:

Clean Up

If you want to start over from scratch run the following:

docker-compose stop
docker-compose rm -f -v
docker volume rm rabbitmqdockercluster_rabbitmq_persistence1
docker volume rm rabbitmqdockercluster_rabbitmq_persistence2

About

This is an example of a dynamically created Dockerized RabbitMQ cluster using Consul

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published