Hello,<div><br></div><div>with the intention of using rabbitmqadmin to automate rabbitmq configuration</div><div>we had to improve rabbitmqadmin to be able to read configuration files.</div><div><br></div><div>Such requirement was needed for different reasons:</div>
<div>- security: it is not very nice to launch commands with passwords in the command line</div><div>- code duplication: previous point would have required to hard-code username and password</div><div> in rabbitmqadmin which is something we would like to avoid</div>
<div>- it is nice to have a single configuration file containing configuration for multiple hosts</div><div> and be able to recall that host from the command line</div><div><br></div><div>For such reasons I made some small changes to rabbitmqadmin to make it work with configuration files.</div>
<div>The script doesn't brake backward compatibility.</div><div><br></div><div>The modified script:</div><div><a href="https://github.com/mpaladin/rabbitmq-custom/blob/master/rabbitmqadmin/rabbitmqadmin" target="_blank">https://github.com/mpaladin/rabbitmq-custom/blob/master/rabbitmqadmin/rabbitmqadmin</a></div>
<div><br></div><div>An example of configuration file:</div><div><a href="https://github.com/mpaladin/rabbitmq-custom/blob/master/rabbitmqadmin/rabbitmqadmin.conf.example" target="_blank">https://github.com/mpaladin/rabbitmq-custom/blob/master/rabbitmqadmin/rabbitmqadmin.conf.example</a></div>
<div><div><br></div></div><div>To profit from the configuration file just run:</div><div># rabbitmqadmin -c rabbitmqadmin.conf.example -N host_normal ...</div><div><br></div><div>Hopefully someone will benefit from this change and it would be nice to see it in the next release.</div>
<div><br></div><div>The changes reflect this behavior:</div><div>- there are hard-coded default values (like before)</div><div>- eventual configuration file setting override the defaults</div><div>- command line override the result of the previous steps</div>
<div><br></div><div>Cheers,<br clear="all">---<br>Massimo Paladin<br><br>email: <a href="mailto:massimo.paladin@gmail.com" target="_blank">massimo.paladin@gmail.com</a><br>website: <a href="http://www.mpaladin.com/" target="_blank">http://www.mpaladin.com</a><br>
flickr's page: <a href="http://flickr.com/photos/massimop" target="_blank">http://flickr.com/photos/massimop</a><br>
</div>