Last active
April 4, 2017 07:36
-
-
Save damonsk/aa30e8b9980d100fcf78 to your computer and use it in GitHub Desktop.
docker rabbitmq clustered with haproxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -d -p 5673:5672 -p 15673:15672 -h upstream1 --name upstream1 bijukunjummen/rabbitmq-server | |
docker run -d -p 5674:5672 -p 15674:15672 -h upstream2 --name upstream2 --link upstream1:upstream2 bijukunjummen/rabbitmq-server | |
docker exec upstream2 rabbitmqctl stop_app | |
docker exec upstream2 rabbitmqctl join_cluster rabbit@upstream1 | |
docker exec upstream2 rabbitmqctl start_app | |
# See other gist for haproxy config. ssh to docker and create ~/haproxy.cfg with content of gist. | |
docker run -d -p 1936:1936 -p 15670:15670 -p 5672:5672 --name rabbit-ha -v /home/docker/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro haproxy:1.5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi !
Thx for sharing this 😃
I built a docker based project allowing to run a highly available RabbitMQ cluster with HAProxy.
You can find it there: https://github.com/ypereirareis/docker-rabbitmq-ha-cluster
It could give you more information and configuration for HAProxy.
Bye !