Banner

Chef Essentials Workshop – Official Chef Training

Live Classroom
Duration: 3 days
Live Virtual Classroom
Duration: 3 days
Pattern figure

Overview

This two-day instructor-led course covers all the basic concepts of Chef. The course covers how to turn infrastructure into code for automating the configuration, deployment and management of the servers. It also discusses the Chef architecture and the different tools that form a part of the Chef Development Kit (ChefDK). The course demonstrates how to test infrastructure code enabling participants to deploy the code confidently. The hands-on exercises included in the course help participants gain a thorough understanding of the concepts discussed during the course.

Note: The course utilizes official courseware and lab environments directly from Chef

What You'll Learn

  • Use Chef resources to define the state of the system
  • Write and use Chef recipes and cookbooks
  • Automated testing of cookbooks
  • Manage multiple nodes with Chef Server
  • Create organizations
  • Bootstrap nodes
  • Assign roles to nodes
  • Deploy nodes to environments
  • Enable Chef’s search features with automation
  • Create acceptance and production environments

Curriculum

  • Overview and expectations for the class
  • The Chef lab system architecture
  • Lab: Pre-built workstation

  • Using Chef to install packages on virtual workstations
  • Using Chef-client command
  • Creating a basic Chef recipe file
  • Defining Chef resources
  • Test and repair
  • Lab: The ‘file’ resource

  • Modify a recipe
  • Collaboration and version control
  • Generating a Chef cookbook
  • Defining a Chef recipe that sets up a web server
  • Exercise: Version control
  • Lab: Set up Git
  • Lab: Setting up web servers

  • Locally applying multiple cookbooks’ recipes with Chef-client
  • Applying a run list
  • Including a recipe from within another recipe
  • Lab: Update the Apache Cookbook

  • Using Test kitchen to verify the recipes converging on a virtual instance
  • Reading the ServerSpec documentation
  • Writing and executing tests
  • Where do tests live?
  • Exercise: Test configuration
  • Lab: Converge the kitchen
  • Lab: Commit your work
  • Lab: Testing Apache

  • Managing a large number of servers
  • Capturing details about a system
  • Using the node object within a recipe
  • Using Ruby’s string interpolation
  • Updating the version of a cookbook
  • Lab: Update the cookbook version
  • Node details in the Webserver
  • Lab: Commit your work

  • Cleaner recipes
  • When to use a template resource
  • Creating a template file
  • Using ERB tags to display node data in a template
  • Defining a template resource
  • Using kitchen test on the ‘Apache’ cookbook
  • Using Chef-client to apply the ‘Apache’ cookbook’s ‘default’ recipe
  • Updating the ‘Apache’ cookbook’s version for the patch
  • Committing the changes
  • Lab: Update the version

  • Installing ChefDK on the laptop
  • Executing commands to ensure everything is installed
  • Installing a local editor like Atom
  • Lab: Running the following commands and reporting their versions –
    • $chef
    • $chef-client
    • $knife
    • $ohai
    • $berks
    • $kitchen
    • $foodcritic
    • $rubocop

  • Connecting to a Chef server
  • Managing additional systems
  • Managing user traffic
  • Uploading cookbooks to a Chef server
  • Bootstrapping a node
  • Managing a node via a Chef server
  • Hosted Chef
  • Lab: Uploading cookbooks and managing cookbook dependencies

  • Find cookbooks on the Chef supermarket
  • Create a wrapper cookbook
  • Example: Load balancer
  • Amazon EC2 instances
  • Replace the existing default values
  • Upload a cookbook to Chef server
  • Bootstrap a new node that runs the cookbook
  • Discussion: Can teams benefit from the supermarket?

  • Managing user traffic
  • Bootstrapping and updating the run_list
  • Running chef-client on a node
  • Appending values to an attribute within a recipe
  • Versioning cookbooks and uploading to Chef server
  • Lab: Another new node
  • Lab: Test and update the load balancer
  • Lab: Run $berks install
  • Lab: Converging the cookbook

  • Assigning, defining and configuring
  • The ‘knife’ role
  • Verifying roles
  • Roles for everyone
  • Lab: Define a web role

  • Update a cookbook to dynamically use nodes with the web role
  • Describe the query syntax used in search
  • Build a search into the recipe code
  • Create a Ruby array and Ruby Hash
  • Update the myhaproxy wrapper cookbook
  • Lab: Updating, load balancing, uploading and running the new search-capable cookbook

  • Keeping your infrastructure current
  • Creating a production environment
  • Creating an acceptance environment
  • Deploying a node to an environment
  • Updating a search query to be more exact
  • Lab: Set new nodes to production
  • Lab: Acceptance environment
  • Lab: Create a new environment file

  • Beyond essentials
  • Valuable reading
  • Events and online resources
  • Customizing Chef
waves
Ripple wave

Who should attend

The course is highly recommended for –

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

Prerequisites

Participants need to be familiar with writing code (of just about any flavor) in a text editor and working on the command line. They also need to know basic system administration – installing packages, configuring the packages and starting services.

The participants need to have a wifi-enabled laptop for the course. The suitable workstation systems are Ubuntu 10.04 and 12.04, Mac OS X 10.7.3+ and Windows 7. Other platforms and platform versions might work without modification, however, it may not be possible to troubleshoot the issues with unlisted platforms.

Participants need to install the following non-Chef required software beforehand on their systems –

  • SSH/SCP (OpenSSH, puTTY/WinSCP or equivalent)
  • Programer’s text editor (Vi/Vim, Emacs, Sublime Text 2 or equivalent)
  • Additionally, all attendees should install ChefDK

Interested in this Course?

    Ready to recode your DNA for GenAI?
    Discover how Cognixia can help.

    Get in Touch
    Pattern figure
    Ripple wave