[rabbitmq-discuss] Runit running Rabbit
Brendan Hay
brendan at soundcloud.com
Tue Jun 26 17:04:47 BST 2012
Hi Richard,
If you are familiar with Procfiles/foreman/.env then you can see how I've
setup a 2 node test rig here:
https://github.com/brendanhay/myxi/tree/master/test/nodes
The vars were pilfered from here:
http://www.rabbitmq.com/configure.html#define-environment-variables
and here: http://www.rabbitmq.com/relocate.html
You can use the RABBITMQ prefixed env variables to change the respective
node's mnesia dirs and so on by re-exporting them in your runit scripts (or
using the rabbitmq-env.config, which you would also need to export from the
run script).
I use a standard runit service setup (via the standard chef runit cookbook
+ 'runit_service' definition) with the /etc/service/rabbitmq/run script
rendered somewhat as follows:
#!/bin/sh
exec 2>&1
# ulimit and other shenanigans here ..
ulimit -n 102400
# Export all the RABBITMQ prefixed variables here ..
export RABBITMQ_*
# Export the chptst -u user's HOME
export HOME=/var/lib/rabbitmq
cd $HOME
# Boom!
exec chpst -u rabbitmq /usr/local/sbin/rabbitmq-server
Hope that helps,
Brendan
On Tue, Jun 26, 2012 at 5:51 PM, Richard Jones <rj at metabrew.com> wrote:
> Hi,
> I'm trying to hack a chef cookbook for rabbit so it can start multiple
> rabbitmq instances on the same machine, managed by runit
> (http://smarden.org/runit/)
>
> Rabbit startup fairly involved compared to most services - does anyone
> have an example of starting rabbit under runit, or managing multiple
> rabbit instances on one machine, or any other simplified way to start
> and manage rabbit?
>
> Thanks,
> RJ
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120626/8a1883c4/attachment.htm>
More information about the rabbitmq-discuss
mailing list