Gain a basic understanding of Infrastructure as Code (IaC) and how it can enable you to scale, version, and audit infrastructure resources.
In this lesson, content is presented in a player that you can hover over to utilize the following options.
1. Table of Contents: Click to display or hide the table of contents on the right hand of the screen.
2. Player Settings: Click to select desired playback speed.
3. Fullscreen: Click to toggle to a fullscreen view.
DevOps adoption usually includes an evolution of processes and tool chains that enable these teams to function optimally. Modern day computing and infrastructure management is definitely shifting away from “ClickOps” management and adopting the Infrastructure as Code (IaC) way of doing business. IaC enables teams to easily define, deploy and maintain compute infrastructures in the form of code. It also provides the ability to effortlessly scale, version and audit infrastructure resources.
In this session, you'll be introduced to the core principles of IaC and have the opportunity to reinforce what you've learned featuring industry known tools such as Terraform and Pulumi. CircleCI Developer Advocate Angel Rivera leads this course. He will demonstrate along the way how to specify, deploy and destroy a Kubernetes cluster via code.
Infrastructure as Code – Prerequisites
In this section, we feature a series of eight lessons covering Infrastructure as Code (IaC). IaC enables organizations to create, manage, and destroy compute resources using modern DevOps tools by statically defining and declaring these resources in code. We review IaC from a high level, then get into specifics on how to use HashiCorp’s Terraform to provision, deploy, and destroy infrastructure resources. This training was developed in conjunction with a CircleCI blog post tutorial series that you might find useful as a preview.
For the first lesson, we cover the installation of tools and cloud services necessary to follow this training, namely:
Terraform CLI
Terraform Cloud Account
Google Cloud SDK CLI
Google Cloud Platform
Docker
Docker Hub Account
CircleCI Account
GitHub Account
Learn laC Code Repo
Infrastructure as Code – Concepts
In this second lesson, we'll step back and cover at a high level what Infrastructure as Code (IaC) is, IaC purpose, and underlying concepts.
IAC – Terraform
In this lesson, we start building a Google Kubernetes Engine (GKE) cluster using Terraform, following the steps below:
Clone repo.
Review terraform variables file
Review Providers file
Review main.tf file
Initialize code
Validate code
Terraform plan
IAC - Build Docker Image
In this IaC lesson, we will:
Review Docker ignore file
Review Dockerfile
Build a Docker image
Push image to Docker Hub
IAC - Terraform Deploy
In this lesson, we will:
Review Terraform files
Deploy Terraform
Diagnose an error
Review Kubernetes cluster
Edit deployments
Review the running app
Destroy infrastructure
IAC - Automate Integration Part 1
In this lesson, we will cover:
Log in to CircleCI
Setup environment variables
CircleCI configuration
Build Docker image
Create and deploy a GKE cluster
Destroy a GKE cluster
Workflows
Requires statements
Approval type
Demonstration
IAC - Automate Integration Part 2
We continue the tutorial with the steps below.
Build Docker image
Create and deploy a GKE cluster
Destroy a GKE cluster
IAC - Automate Integration Part 3
In the lesson wrap up, we cover:
Workflows
Requires statements
Approval type
Demonstration
General Resources: