This is an example of a dynamically created Dockerized RabbitMQ cluster using Consul
See these slides for more information
export RABBITMQ_DEFAULT_USER=guest
export RABBITMQ_DEFAULT_PASSWORD=guest
docker build -t rabbitmq-docker-cluster .
docker-compose up -d consul dnsmask registrator
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:
- rabbitmq1: http://localhost:15672/#/
- rabbitmq2: http://localhost:15673/#/
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