Skip to Content
Test-Driven Infrastructure with Chef, 2nd Edition
book

Test-Driven Infrastructure with Chef, 2nd Edition

by Stephen Nelson-Smith
October 2013
Intermediate to advanced content levelIntermediate to advanced
306 pages
8h 17m
English
O'Reilly Media, Inc.
Content preview from Test-Driven Infrastructure with Chef, 2nd Edition

Chapter 4. Using Chef with Tools

In the last chapter we installed Chef itself, a user, an IRC client, and Git. Now we move on to develop our infrastructure and our understanding further by installing and using Ruby, VirtualBox, and Vagrant.

Exercise 1: Ruby

Objectives

After completing this exercise, you will:

  • Understand the differences between chef-solo and a server-based Chef setup
  • Understand the node object in more detail
  • Be set up to use Opscode’s Hosted Chef service
  • Understand the authentication mechanism used by Hosted Chef
  • Have installed a modern Ruby on your system using Chef
  • Understand the roles primitive in Chef
  • Understand the idea of attribute precedence
  • Have examined the components of a Chef run

Directions

  1. Create an Opscode community login (if you don’t have one already).
  2. Download your user’s private key.
  3. Navigate to the Hosted Chef Operations Console.
  4. Create an organization, if you don’t already have one, selecting the free tier.
  5. Download your organization’s validation key.
  6. Download the knife.rb configuration file for your organization.
  7. Create a .chef directory under your chef-repo directory, and place your two keys and knife.rb inside this directory.
  8. Read the knife configure documentation, and use it to create a client.rb file and validation certificate in /etc/chef.
  9. Validate your setup by running knife client list.
  10. Look at the chef-client help page, and identify how to pass JSON to a chef-client run.
  11. Run chef-client with the dna.json file created in the ...
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

Chef: Powerful Infrastructure Automation

Chef: Powerful Infrastructure Automation

John Ewart, Matthias Marschall, Earl Waud

Publisher Resources

ISBN: 9781449372576Errata Page