Skip to Content
Learning MCollective
book

Learning MCollective

by Jo Rhett
August 2014
Intermediate to advanced
284 pages
5h 24m
English
O'Reilly Media, Inc.
Content preview from Learning MCollective

Chapter 9. Waking the Chef

In Chapter 7, we showed how to use Chef to install and configure MCollective. In this chapter, we’re going to show how MCollective can:

  • Use the Chef recipes and roles applied to the node in filters

  • Use Ohai data as facts for MCollective filters

  • Query, start, stop, and restart the Chef client

  • Wake the Chef client to evaluate the node immediately

To control the Chef daemon, you’ll need to upload the chef-client cookbook and its dependencies. I did it like this:

~$ cd chef_repo/cookbooks
cookbooks$ knife cookbook site download chef-client
Downloading chef-client from the cookbooks site at version 3.6.0
  to /home/jorhett/chef-repo/cookbooks/chef-client-3.6.0.tar.gz
Cookbook saved: /home/jorhett/chef-repo/cookbooks/chef-client-3.6.0.tar.gz
cookbooks$ knife cookbook site download cron
Downloading cron from the cookbooks site at version 1.4.0
  to /home/jorhett/chef-repo/cookbooks/cron-1.4.0.tar.gz
Cookbook saved: /home/jorhett/chef-repo/cookbooks/cron-1.4.0.tar.gz
cookbooks$ knife cookbook site download logrotate
Downloading logrotate from the cookbooks site at version 1.6.0
  to /home/jorhett/chef-repo/cookbooks/logrotate-1.6.0.tar.gz
Cookbook saved: /home/jorhett/chef-repo/cookbooks/logrotate-1.6.0.tar.gz
cookbooks$ tar xzf chef-client-3.6.0.tar.gz
cookbooks$ tar xzf cron-1.4.0.tar.gz
cookbooks$ tar xzf logrotate-1.6.0.tar.gz
cookbooks$ knife cookbook upload chef-client cron logrotate Uploading chef-client [3.6.0] Uploading cron [1.4.0] Uploading logrotate ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Russell Rules

Russell Rules

Bill Russell
What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz
How to Become a Game-Changing Leader

How to Become a Game-Changing Leader

Douglas A. Ready, Alan Mulally
How You Play the Game

How You Play the Game

Jerry Colangelo, Len Sherman

Publisher Resources

ISBN: 9781491945681Errata