Chef Configuration Management Boot Camp



A solution for both small and large scale systems, Chef is used to streamline and automate configuration and maintenance tasks. Chef is a thin DSL built on top of Ruby, which supports both Linux and Windows. Chef provides enough abstraction to make reasoning about your infrastructure easy.

In this course, you will build a fully functional infrastructure using Chef. This course demonstrates the complete Chef configuration management system and how it can be used for your own environments.

Note: A PC or Mac is required for this course in order to access remote labs.


  • IT managers and leaders
  • Developers and application teams
  • System administrators
  • IT operations staff
  • Release engineers
  • Configuration managers
  • Anyone involved with IT infrastructure
  • Scrum Masters
  • Software managers and team leads

Learning Objectives

How to integrate Chef into your own operations workflow.

1. Chef Automation Overview

  • The importance of automation
  • Existing automation tools and comparison with Chef
  • Why Chef is a preferred tool
  • Different Components of Chef's Anatomy
  • Hosted Chef and private Chef

2. Setting up Your Development Environment

  • The Chef development kit
  • Using git to manage your workflow
  • Using Virtualbox for Vagrant
  • Using Vagrant to simulate your environment
  • Using an IDE to help you manage your Chef projects

3. Ruby Crash Course

  • Overview of Ruby
  • Ruby syntax
  • Comments
  • Variables
  • Strings
  • True and False
  • Arrays
  • Hashes
  • Mathematical Operations
  • Regular Expressions
  • Conditionals and Flow
  • Methods, Classes, and Modules

4. A Basic Cookbook

  • Metadata
  • Recipes
  • Attributes
  • Templates
  • Files
  • Resources

5. Different Types of Cookbooks

  • Application cookbooks
  • Library cookbooks
  • Wrapper cookbooks
  • LWRP Lightweight Resources and Providers

6. Nodes

  • Bootstrapping a node
  • Editing a node
  • Deleting a node
  • Searching nodes
  • Overriding attributes
  • Ohai

7. Roles

  • Creating a role
  • Editing a role
  • Applying a role to a node
  • Overriding attributes in a role

8. Data Bags

  • Creating a data bag
  • Inserting and updating information in a data bag
  • Encrypting data bags for sensitive information

9. Environments

  • Creating an environment
  • Versioning cookbooks
  • Assigning a node to an environment

10. Handlers

  • Types of handlers
  • Installation and configuration of a handler
  • Manual installation
  • Using chef_handler
  • Writing a simple handler
  • Open source handler

11. Testing

  • The importance of testing
  • Introducing test kitchen
  • Test Automation with Serverspec
  • Test Automation with Foodcritic
  • Test Automation with ChefSpec
  • Generate a Coverage Report
  • Share Test Code with spec_helper.rb

12. Managing Cloud Computing with Chef

  • Installing the knife-ec2 plugin
  • Configuring the AWS settings and the knife.rb file
  • Bootstrapping the EC2 instance
  • Running the Chef-client on the new cloud instance
  • Verification of the complete installation

13. Putting it All Together

  • Gather our infrastructure requirements
  • Import required community cookbooks
  • Define our environments
  • Define our roles
  • Create custom cookbooks
  • Create required data bags
  • Define our nodes
  • Test our infrastructure from beginning to end