O'Reilly logo
live online training icon Live Online training

Implementing Infrastructure as Code

Applying Agile engineering practices to automate cloud-based infrastructure

Kief Morris

Code-driven automation tools are essential for managing dynamic infrastructure such as an IaaS cloud. Join infrastructure expert Kief Morris to explore patterns for using these tools to implement infrastructure that can be changed rapidly and reliably in complex environments. You’ll learn how to develop test-driven infrastructure code (TDD), set up continuous delivery (CD) pipelines for your infrastructure, and split infrastructure into loosely coupled components, giving you the ability to evolve and scale complex infrastructure across multiple teams.

What you'll learn-and how you can apply it

By the end of this live, online course, you’ll understand:

  • How to write and run tests as part of the infrastructure development process
  • Strategies for ensuring that infrastructure is maintained and up to date, that all parts of the infrastructure can be destroyed and rebuilt, and that data and configuration is persisted even while infrastructure is being routinely destroyed and rebuilt

And you’ll be able to:

  • Create continuous integration jobs to test infrastructure changes
  • Design and implement continuous delivery pipelines to validate and deliver infrastructure changes to multiple environments
  • Organize infrastructure code into libraries and modules for efficient delivery
  • Design infrastructure and environments to enable multiple teams to work on more complex systems
  • Build and update custom server images (AMIs)

This training course is for you because...

  • You’re a developer or software architect who is building applications in the cloud, and you need to implement the infrastructure to test and run them.
  • You’re a system administrator or infrastructure engineer who is designing, building, or operating infrastructure, and you need to provide more flexible and responsive services.
  • You’re a technical or enterprise architect who wants to understand how to design systems for the cloud.

Prerequisites

  • A working knowledge of Linux (using the command line, basic shell scripting, installing and configuring packages, etc.)
  • Familiarity with AWS services (EC2 instances, EBS volumes, VPCs, security groups, subnets, etc.)
  • Basic experience using automation tools such as Chef, Puppet, Ansible, or SaltStack and infrastructure provisioning tools such as Terraform or CloudFormation (preferred)
  • A general understanding of writing RSpec tests in Ruby

Recommended preparation:

Infrastructure as Code (book)

Introduction to AWS (video)

Introduction to Terraform (book)

Ruby and Rspec (book)

About your instructor

  • Kief Morris has been scripting infrastructure for over 20 years, and now leads the Cloud Technology Practice at ThoughtWorks UK, where he helps organizations large and small transform their infrastructure and technical operations, taking advantage of cloud and automation technologies. He wrote the O'Reilly book "Infrastructure as Code". Originally from Tennessee, Kief moved to London in the dot-com days and has been there ever since.

Schedule

The timeframes are only estimates and may vary according to how the class is progressing

Common challenges with infrastructure management (30 minutes) - Lecture and discussion: Typical problems and their causes; typical approaches and problems with those approaches; concepts from Infrastructure as Code and how they relate to these problems

Course setup (20 minutes)

  • Lecture: Basic tools and processes used during the course
  • Hands-on exercise: Explore a provided infrastructure project and use it to ensure your local development environment is configured correctly
  • Q&A

Break (10 minutes)

Creating a server (30 minutes)

  • Lecture: Introduction to core practices for provisioning infrastructure (TDD, use of source control, local development cycle, etc.)
  • Hands-on exercise: Modify the provided project to provision a server and install a web server
  • Q&A

Continuous integration (CI) (30 minutes)

  • Lecture: The problems that CI addresses; how to implement CI for infrastructure; core CI practices for teams; pitfalls and specific issues with CI for infrastructure
  • Hands-on exercise: Configure a CI job to run and test the server provisioning process
  • Q&A

Break (10 minutes)

Multiple environments (30 minutes)

  • Lecture: Two common approaches to managing multiple environments—all in one project and one project per environment; pitfalls of common approaches
  • Hands-on exercise: Use three Terraform projects to manage three environments (development, QA, and production)
  • Q&A

Parameterized environments (30 minutes)

  • Lecture: How to use parameters so that a single environment definition can be used to create multiple environments; the advantages of parameterization; techniques and tools for implementation
  • Hands-on exercise: Convert the previous environments into a single project, add parameters, and create and tear down multiple instances of the environment
  • Q&A

Break (10 minutes)

Continuous delivery (CD) pipelines (30 minutes)

  • Lecture: How to implement a simple CD pipeline for infrastructure; the problems that a CD pipeline addresses; key aspects of designing and implementing a pipeline for infrastructure code
  • Hands-on exercise: Configure a CD pipeline for the environment template created in previous exercises

Wrap-up and Q&A (10 minutes)