Video by freeCodeCamp.org · streamed from YouTube. All rights remain with the creator.
Lesson 1: Infrastructure as Code: Concepts and Labs with Pulumi
About this lesson
This crash course explains what infrastructure as code is and why it has become the standard way to manage cloud resources, and then puts the idea into practice through three labs. It begins with a definition of infrastructure, covering compute, security, networking, data stores and the deployment of applications. You then compare three approaches to managing infrastructure: doing everything manually, writing ad-hoc scripts, and describing the desired result as code that a tool carries out. The next part looks at three styles of writing infrastructure code: templates written in JSON, a domain-specific language designed for the purpose, and general-purpose programming languages. The labs use Pulumi with Python on AWS. In the first you set up a project, configure AWS access and provision an S3 storage bucket, then update it, turn it into a hosted website, use stack configuration, create a second stack for production and tear everything down. The second lab provisions EC2 virtual machines, first a single machine, then one in each availability zone, and finally an Application Load Balancer that spreads traffic across the fleet. The third lab deploys Docker images to Amazon ECS using Fargate, creating a cluster and a load-balanced container service running nginx, scaling it up and removing it afterwards. Basic familiarity with Python helps. Afterwards, read Chapter 1 of the course book, which works through when infrastructure code pays for itself.