Using Chef Solo on Linux for AWS


64 students completed the lab in ~54m

Total available time: 1h:30m

15 students rated this lab!

Lab Overview

The popular configuration management tool Chef is typically used in a client-server architecture where clients check a centralized server for configuration updates. Chef Solo brings most of the benefits of Chef to a single server. All of the concepts of Chef apply to Chef Solo: cookbooks, recipes, attributes, templates, roles, etc. In this Lab, you will gain experience with each of those concepts as you configure a Linux virtual machine in AWS using Chef Solo.

Lab Objectives

Upon completion of this lab you will be able to:

  • Configure a Chef node in AWS using Chef Solo
  • Write Chef cookbooks and recipes
  • Use Chef attributes and templates to generalize your cookbooks
  • Create Chef roles to define Chef node functions 

Lab Prerequisites

You should be familiar with the following:

  • Chef concepts
  • Working on the command line in Linux
  • Ruby programming basics are beneficial, but not required

Lab Environment

Before completing the lab instructions the environment will look as follows:

After completing the lab instructions the environment should look similar to:

Follow these steps to learn by building helpful cloud resources

Logging in to the Amazon Web Services Console

Your first step to start the Lab experience

Connecting to the Virtual Machine using SSH

Create a secure connection to a remote machine

Setting Up Chef Solo on Linux

Setting up Chef Solo on a VM running the CentOS 7 distribution of Linux

Running Your First Recipes with Chef Solo

Create a cookbook and run a few simple recipes 

Staying Organized with Cookbook Files

Use the cookbook files and the cookbook directory structure to your advantage

Notifying Chef Resources of Changes

Trigger actions in other Chef resources using notifies

Using Attributes and Templates in Your Cookbooks

Use attributes and templates to make your cookbooks dynamic

Defining Chef Node Functions with Roles

Create roles to specify different functions your Chef node performs