Skip to content
This repository has been archived by the owner on Mar 17, 2020. It is now read-only.

Added the ability for clustered types and management_agent #11

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ubuntu:trusty

MAINTAINER Fernando Mayo <[email protected]>

# Install RabbitMQ
Expand All @@ -19,5 +20,5 @@ ADD run.sh /run.sh
ADD set_rabbitmq_password.sh /set_rabbitmq_password.sh
RUN chmod 755 ./*.sh

EXPOSE 5672 15672
EXPOSE 5672 15672 4369 25672
CMD ["/run.sh"]
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,15 @@ docker run -d \
tutum/rabbitmq
```

And add `CLUSTER_WITH` for the others nodes :
And add `CLUSTER_WITH` for the others nodes and `NODE_TYPE` :

```
docker run -d \
-p 5672:5672 -p 15672:15672 -p 35197:35197 -p 4369:4369 -p 25672:25672 \
-e HOSTNAME=node2.host.io \
-e RABBITMQ_USE_LONGNAME=true \
-e CLUSTER_WITH=node1.host.io \
-e NODE_TYPE=ram \
tutum/rabbitmq
```
RabbitMQ cluster stack file with Tutum
Expand Down
10 changes: 9 additions & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,17 @@ else
/usr/sbin/rabbitmq-server &
sleep 10
rabbitmqctl stop_app
rabbitmqctl join_cluster rabbit@$CLUSTER_WITH
if [ -z "$NODE_TYPE" ] ; then
rabbitmqctl join_cluster rabbit@$CLUSTER_WITH
else
rabbitmqctl join_cluster --$NODE_TYPE rabbit@$CLUSTER_WITH
fi
rabbitmqctl start_app
fg
rabbitmq-plugins disable rabbitmq_managment
rabbitmq-plugins enable rabbitmq_management_agent
/usr/sbin/rabbitmq-server stop
fi
/usr/sbin/rabbitmq-server
fi