Uncategorized

Setting Up MCollective with ActiveMQ in Ubuntu 12.04

Setting up MCollective with activemq is very easy. The following steps worked perfectly in Ubuntu 12.04. The only dependency is either openjdk or sun java must be installed.

ActiveMQ

Download the latest activemq tar file from ActiveMQ website, I’ve used activemq 5.6 from the below link.

http://apache.techartifact.com/mirror/activemq/apache-activemq/5.6.0/apache-activemq-5.6.0-bin.tar.gz

Untar the file to any folder say inside /opt and rename it to “activemq“.

Now create a symlink of the “activemq” binary inside “/etc/init.d

ln -s /opt/activemq/bin/activemq /etc/init.d/activemq

MCollective requires activemq with “STOMP” support. Edit the activemq.xml inside the activemq directory and add the stomp option in it. You can get the sample from the puppet labs website.

http://docs.puppetlabs.com/mcollective/reference/basic/gettingstarted.html

Copy the contents and paste it into activemq.xml present inside the activemq directory. In my case /opt/activemq/config/activemq.xml

Now start the activemq service using the init script (symlink we created) inside the init.d.

MCollective Server

For MCollective server we need to install two packages, mcollective-common and mcollective. Dowlnoad the latest packages from “http://downloads.puppetlabs.com/mcollective/” and install the packages.

The config file will be present in “/etc/mcollective/server.cfg”. Edit the file, stomp host should be the the machine where we have installed the activemq. Stomp port will be “6163” (can be changed by modifying activemq.xml file)

Also change modify the stomp user and password to the following,

plugin.stomp.user = mcollective

plugin.stomp.password = marionette

The above password can changed by modifying the activemq.xml file

And restart the mcollective service.

MCollective Client

For Mcollective client, download and install mcollective-common mcollective-client packages, and edit the the client.cfg file present inside the /etc/mcollective folder.

Now we can use the “mco” command to check the connectivity. we can use mco find to find the mcollective servers.

Advertisements
Standard

3 thoughts on “Setting Up MCollective with ActiveMQ in Ubuntu 12.04

  1. Pingback: Using Mongo Discovery Method in MCollective « beingasysadmin

  2. Thanks for your great manual!

    There is a small typo: “For MCollective server we need to install two packages, mcollective-common and mcollecitve.”: mcollecitve should be mcollective.

    You should also have the package libstomp-ruby installed as the installation of mcollective will abort with “/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require’: no such file to load — stomp (LoadError)” without it. I think this is because the mcollective package misses its libstomp-ruby dependancy.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s