This is a hands-on tutorial that will cover the basics that everyone needs to know about how to test your automation code. We’ll start off with a quick introduction to Chef and work our way through writing a fully-tested cookbook or two using linting, unit testing, integration testing, and cross-platform testing.
Hands-on exercises throughout the tutorial will reinforce the material discussed.
Anyone responsible for managing infrastructure especially those who are interested in automating the provisioning and management of said infrastructure using state-of-the-art tools and practices.
A working code base that includes samples for building out testable infrastructure components.
Topics include:
- Introduction to Chef
- Test-driven Development (TDD)
- syntax check - knife cookbook test
- linting - foodcritic
- unit testing - ChefSpec
- integration testing - ServerSpec
A number of repositories will be used throughout this class. You can follow progress here:
- chef-repo - The main repository for Chef code
- hello_world - The repository for our hello world cookbook.
- apache - The repository for our apache cookbook
IP Addresses for each student can be found in this gist.
This repository will include the slides for the class in both PowerPoint and PDF.
Have questions along the way? Submit pull requests to the QUESTiONS.md file in this repository.