Hi Richard,<div><div><br>If you are familiar with Procfiles/foreman/.env then you can see how I&#39;ve setup a 2 node test rig here:�<a href="https://github.com/brendanhay/myxi/tree/master/test/nodes" target="_blank">https://github.com/brendanhay/myxi/tree/master/test/nodes</a></div>

<div><br></div><div>The vars were pilfered from here:�<a href="http://www.rabbitmq.com/configure.html#define-environment-variables" target="_blank">http://www.rabbitmq.com/configure.html#define-environment-variables</a></div>
<div>and here:�<a href="http://www.rabbitmq.com/relocate.html" target="_blank">http://www.rabbitmq.com/relocate.html</a></div>
</div><div><br></div><div>You can use the RABBITMQ prefixed env variables to change the respective node&#39;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).</div>

<div><br></div><div>I use a standard runit service setup (via the standard chef runit cookbook + &#39;runit_service&#39; definition) with the /etc/service/rabbitmq/run script rendered somewhat as follows:</div><div><br></div>
<div><br></div><div>
<div>#!/bin/sh</div><div>exec 2&gt;&amp;1</div><div><br></div><div># ulimit and other shenanigans here ..</div><div>ulimit -n 102400</div><div><br></div><div># Export all the RABBITMQ prefixed variables here ..</div><div>
export RABBITMQ_*�</div>
<div><br></div><div># Export the chptst -u user&#39;s HOME</div><div>export HOME=/var/lib/rabbitmq</div><div>cd $HOME</div><div><br></div><div># Boom!</div><div>exec chpst -u rabbitmq /usr/local/sbin/rabbitmq-server</div>
<div><br></div><div><br></div><div>Hope that helps,</div><div>Brendan</div>
<div><br></div><div><br></div><div class="gmail_quote">On Tue, Jun 26, 2012 at 5:51 PM, Richard Jones <span dir="ltr">&lt;<a href="mailto:rj@metabrew.com" target="_blank">rj@metabrew.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi,<br>
I&#39;m trying to hack a chef cookbook for rabbit so it can start multiple<br>
rabbitmq instances on the same machine, managed by runit<br>
(<a href="http://smarden.org/runit/" target="_blank">http://smarden.org/runit/</a>)<br>
<br>
Rabbit startup fairly involved compared to most services - does anyone<br>
have an example of starting rabbit under runit, or managing multiple<br>
rabbit instances on one machine, or any other simplified way to start<br>
and manage rabbit?<br>
<br>
Thanks,<br>
RJ<br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
</blockquote></div><br></div>