Last active
August 29, 2015 14:02
-
-
Save initcron/e6d900eb0da04a98d226 to your computer and use it in GitHub Desktop.
mcollective tutorial
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Open Git Bash | |
| cd ~/learn | |
| mkdir mcollective | |
| wget -c https://github.com/ripienaar/mcollective-vagrant/archive/master.zip | |
| #Alternately download the above repo as a zip file directly from https://github.com/ripienaar/mcollective-vagrant and unzip inside mcollective dir. | |
| cd mcollective-vagrant-master | |
| #Edit Vagrantfile, set instances to 2 | |
| vagrant up | |
| vagrant ssh middleware | |
| mco ping -W roles::middleware | |
| mco ping -W roles::node | |
| mco ping -W "roles::middleware /redis/" | |
| # List facts for all nodes in the cluster | |
| mco facts cluster | |
| #Ping nodes which blong to alfa cluster | |
| mco ping -W "roles::node cluster=alfa" | |
| # More complexity | |
| mco ping -S "(roles::node or roles::middleware) and cluster=alfa" | |
| # Getting info about the node | |
| mco inventory middleware.example.net | |
| # Restarting nrpe service on all | |
| mco service restart nrpe | |
| mco service status nrpe | |
| # Managing packages | |
| mco package status mcollective | |
| # Running Monitoring Checks | |
| mco nrpe check_load | |
| # Launch Puppet Run on all | |
| mco puppet runonce | |
| mco puppet status | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment