Skip to content

Instantly share code, notes, and snippets.

@gtmtech
Last active December 10, 2015 13:49
Show Gist options
  • Save gtmtech/4443561 to your computer and use it in GitHub Desktop.
Save gtmtech/4443561 to your computer and use it in GitHub Desktop.
HOWTO: Installing mcollective on Mac OSX
I had trouble fathoming out how to get mcollective client working on OSX, because there's no official support for it.
Here is what I did.
* Install XCode
* Install Auxilliary Tools for XCode from https://developer.apple.com/downloads/ - required
* Move the PackageMaker.app to /Applications
* sudo ln -s /Applications/Xcode.app/Contents/Developer /Developer
* cd /Developer/usr/bin
* sudo ln -s /Applications/PackageMaker.app/Contents/MacOS/PackageMaker packagemaker
* cd ${HOME} # - or somewhere you can work
* git clone git://github.com/glarizza/luggage.git
* sudo ln -s /usr/local/share/luggage $(/bin/pwd)/luggage
* cd luggage/examples/mcollective
* make pkg
* open .
* Double click on the MCollective Installer pkg.
* If you're running rvm like me, then this installer will install the mcollective libs in the WRONG place. The lib location is set in the Makefile, but for me it was easier to copy the dir across directly:
* cd /usr/lib/ruby/site_ruby/1.8
* tar -czf /tmp/mcollective.tgz mcollective*
* cd ~/.rvm/rubies/<whichever ruby version>/lib/ruby/site_ruby/<whichever ruby version>/
* tar -xzf /tmp/mcollective.tgz
* sudo touch /etc/mcollective/client.cfg # if it doesnt exist, create one - youll need to edit it.
* sudo chmod 644 /etc/mcollective/client.cfg # important to avoid errors about missing commands
Now you should be able to run mc-ping, mco etc.
@glarizza
Copy link

glarizza commented Jan 3, 2013

Are you ultimately wanting to build a PACKAGE to install in RVM, or simply get it working? If you're using rvm, you might be better off just using gem to install the client ('mcollective-client') at the version you want:

gem install mcollective-client

RVM really throws a wrench just due to its whole environment. The packages I create with Luggage are only designed to handle system ruby - anything other than system ruby should really be handled as a special development case

@gtmtech
Copy link
Author

gtmtech commented Jan 28, 2013

Thanks.

Although gem install mcollective-client doesnt work in and of itself (same as linux), I found that if you:

gem install mcollective-client
wget the TGZ file of the matching mcollective version from : http://downloads.puppetlabs.com/mcollective/ and unpack it
add the plugins subdir of this to the "libdir" declaration in /etc/mcollective/client.cfg

Then it works, and solve those horrible missing yaml_facts.rb errors that you get otherwise. Although this isn't a "build" version, but a "source" version of code, right now I need it working, I'll look at doing a homebrew formula for this in a bit..

@sammcj
Copy link

sammcj commented May 4, 2014

@gtmtech did you ever get round to making a homebrew formula for this?

@mcandre
Copy link

mcandre commented Apr 29, 2015

@gtmtech Could you please publish a Homebrew / brew cask formula for mcollective?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment