Using Chef Solo on Linux for Azure

Beginner

24 students completed the lab in ~54m

Total available time: 1h:30m

Be the first to rate 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 Azure using Chef Solo.

Lab Objectives

Upon completion of this lab you will be able to:

  • Configure a Chef node in Azure 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 into the Microsoft Azure portal

Begin the Lab by logging into the Microsoft Azure portal

Connecting to the Lab Provisioned Virtual Machine

Use an SSH client to connect to the virtual machine created for you

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