[rabbitmq-discuss] Multiple nodes on single box
Steve Powell
steve at rabbitmq.com
Wed Mar 28 12:12:37 BST 2012
Timya,
> You might be able to get away with just setting $RABBITMQ_BASE.
Since you're on Ubuntu RABBITMQ_BASE is not relevant; the link to
relocate.html gives the full details.
The following settings are necessary to separate the node runtimes
completely, while allowing them to share the installed code base.
--------------------------var ----------------------default
RABBITMQ_CONFIG_FILE /etc/rabbitmq/rabbitmq
RABBITMQ_MNESIA_BASE /var/lib/rabbitmq/mnesia
RABBITMQ_LOG_BASE /var/log/rabbitmq
RABBITMQ_ENABLED_PLUGINS_FILE /etc/rabbitmq/enabled_plugins
other file locations will, by default, be based on these.
If you set these in the shell environment then all the rabbitmq scripts
will pick them up (e.g. rabbitmqctl and so on). If you try to set them
in rabbitmq-env.conf, you can only have this file in one place per
rabbitmq installation, so you are limited to one node's settings.
So one way to work this is to have a wrapper script for each
node -- which sets the vars accordingly before calling the
rabbitmq{-server,ctl,-plugins} script. e.g.
node1:
-----------------------
#!/bin/sh
RABBITMQ_CONFIG_FILE=/node1/rabbitmq-node1
RABBITMQ_MNESIA_BASE=/node1/mnesia
RABBITMQ_LOG_BASE=/node1/log
RABBITMQ_ENABLED_PLUGINS_FILE=/node1/enabled_plugins
. $*
-----------------------
invoked as `node1 rabbitmqctl status`, or whatever. There are many many
ways to improve this (and you should!).
Ensure you do not share system resources (like tcp listeners)
accidentally by referring to common resources in the
${RABBITMQ_CONFIG_FILE}.config files.
Let us know how you get on.
Steve Powell (a little bunny)
----------some more definitions from the SPD----------
chinchilla (n.) Cooling device for the lower jaw.
socialcast (n.) Someone to whom everyone is speaking but nobody likes.
literacy (n.) A textually transmitted disease usually contracted in childhood.
On 27 Mar 2012, at 11:12, Simon MacMullen wrote:
> On 27/03/12 11:09, Timya Tortus wrote:
>> Having Ubuntu 10.04, wanted to get two rabbitmq nodes up on one machine.
>> There is documentation available for single-machine cluster on
>> /http://www.rabbitmq.com/clustering.html#single-machine/.
>> But I need to create two rabbitmq nodes (viz. rabbit1 and hare1) which
>> should reffer their respective rabbitmq.config file for setting up
>> shovel and listners for tcp/web-access/management. Is there any document
>> available to setup multiple rabbitmq nodes on one machine or any other
>> way to accomplish the same.
>
> Basically the same concept, just don't cluster them.
>
> You should probably read:
>
> http://www.rabbitmq.com/relocate.html
>
>
> Cheers, Simon
>
> --
> Simon MacMullen
> RabbitMQ, VMware
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
More information about the rabbitmq-discuss
mailing list