OK, so I might have been a bit hasty to dismiss Centos in my last post – a couple of people have contacted me and told me about additional repos that I can use for rubygems etc – so as a brief interlude, here’s the instructions for getting MCollective and ActiveMQ up and running on Centos 5:

Enable EPEL:

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm

Enable ELFF:

rpm -Uvh http://download.elff.bravenet.com/5/i386/elff-release-5-3.noarch.rpm

Install ruby and dependencies:

yum install rubygems rubygem-stomp jpackage java-1.6.0-openjdk

Install ActiveMQ:

for a in tanukiwrapper-3.2.3-1jpp.i386.rpm activemq-5.4.0-2.el5.noarch.rpm activemq-info-provider-5.4.0-2.el5.noarch.rpm;do rpm -Uvh http://puppetlabs.com/downloads/mcollective/$a;done

Configure ActiveMQ:
Edit /etc/activemq/activemq-wrapper.conf around line 85 to show:

wrapper.app.parameter.3-xbean:mcollective.xml

Create /etc/activemq/mcollective.xml as follows:

<beans
xmlns=”http://www.springframework.org/schema/beans&#8221;
xmlns:amq=”http://activemq.apache.org/schema/core&#8221;
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221;
xsi:schemaLocation=”http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd”&gt;

<broker xmlns=”http://activemq.apache.org/schema/core&#8221; brokerName=”localhost” useJmx=”true”>
<transportConnectors>
<transportConnector name=”openwire” uri=”tcp://0.0.0.0:6166″/>
<transportConnector name=”stomp”   uri=”stomp://0.0.0.0:6163″/>
</transportConnectors>

<plugins>
<simpleAuthenticationPlugin>
<users>
<authenticationUser username=”mcollective” password=”marionette” groups=”systemusers,everyone”/>
</users>
</simpleAuthenticationPlugin>

<authorizationPlugin>
<map>
<authorizationMap>
<authorizationEntries>
<authorizationEntry topic=”mcollective.>” write=”systemusers” read=”systemusers” admin=”systemusers” />
<authorizationEntry topic=”ActiveMQ.Advisory.>” read=”everyone,all” write=”everyone,all” admin=”everyone,all”/>
</authorizationEntries>
</authorizationMap>
</map>
</authorizationPlugin>
</plugins>
</broker>
</beans>

And finally, install Mcollective from the RPMS on the website:

Make sure you update /etc/mcollective/server.cfg and /etc/mcollective/client.cfg to point to the correct IP Address/Server and use the right credentials.  If you want to make any of the changes suggested on the MCollective Wiki for ActiveMQ security, then simply update the mcollective.xml file in /etc/activemq/ and restart the service.

The joy of using Active MQ for middleware is that you can install MCollective Client on an Ubuntu Laptop and use it to query Centos Servers!