
Master DevOps deployment by integrating Terraform, Docker, Packer, and GitHub to automatically deploy a real-world e-commerce note application on AWS, with infrastructure as code and versioned pipelines.
Define DevOps as a set of processes to automate software delivery, continuously integrate and deploy code, and manage infrastructure as code to accelerate releases and prevent configuration drift.
Explore how TerraForm uses configuration files to define and deploy resources—servers, databases, load balancers, and networks—across AWS, Azure, Google Cloud, and Digital Ocean via API calls.
Learn how Terraform enables cloud-agnostic infrastructure deployment across AWS and other providers, and set up secure access with users, access keys, and policies for safe automation.
Install Terraform on Windows, Mac, or Linux by following the official installation page, using manual binary, Homebrew on Mac, or Chocolaty on Windows, then verify with terraform -help.
Configure terraform settings by declaring a terraform block with required providers (AWS, Google Cloud), their sources, and a required version, then initialize to download plugins.
Deploy a single server to AWS by configuring the provider and region, then define an EC2 instance with Terraform's resource syntax, including ami, instance type, attributes, and provider docs.
Configure AWS credentials for Terraform using environment variables, initialize Terraform, plan and apply to deploy an EC2 instance in us-east-2, and name the instance using tags.
Create a simple web server on an EC2 instance by using user data to run a hello world script with busybox, and configure security groups for web traffic.
Configure a security group to open TCP port 80 from 0.0.0.0/0, attach it to the EC2, and apply Terraform to serve a Hello World page.
Learn to use Terraform variables to avoid hardcoding values, set defaults and types, and reference them in resources and outputs (including public IP) for a configurable web server.
Deploy a web server cluster using application load balancer and auto scaling group to ensure redundancy and adapt to traffic; it covers listeners, listener pools, target groups, and health checks.
Create a launch configuration to define each EC2 instance in an auto scaling group, then use Terraform to build the ASG with image ID, security groups, and boot script.
Create a fully redundant service cluster by launching instances in an ASG across different subnets in the default VPC using a Terraform data source to retrieve subnet details.
Implement an application load balancer in front of the auto scaling group to provide an access point across subnets in the default VPC, with Terraform configuring listener and target group.
Configure an application load balancer in Terraform using aws_lb and aws_lb_listener, set port 80 http with a fixed 404 response, and open security groups for traffic.
Create and attach a security group to load balancer, opening inbound http (port 80, tcp) from any IP, and then create the target group before the listener on port 80.
Configure a Terraform load balancer by creating a target group, integrating it with an auto scaling group, and setting http health checks and VPC settings.
Deploy a cluster by running terraform plan to preview changes, fix issues, then terraform apply with AWS credentials to launch two ec2 instances, a load balancer, and an autoscaling group.
Learn how Terraform state tracks deployed resources with a JSON state file, performs diffs between code and the cloud, and why you should not edit or read the state file.
Understand why a remote backend is essential for Terraform in production, enabling shared state, environment isolation, and locking with DynamoDB and encryption.
Create a DynamoDB locks table to secure Terraform remote state in S3, preventing concurrent deployments during apply and locking deployments with a dedicated hash key.
Configure a remote backend for Terraform state using an S3 bucket and DynamoDB table, then run Terraform init to copy the local state to the remote backend.
Explore how to structure Terraform configurations for multi-environment deployments by organizing folders for staging and prod, isolating modules, and configuring remote state with an S3 backend.
Explore Terraform modules, like functions, for reusable resource deployment with parameters across stage and production environments.
Call a reusable Terraform module from stage and production to deploy environment-specific resources with the same config, and make inputs configurable to avoid hardcoded names.
Learn to make Terraform modules configurable by adding input parameters, replacing hardcoded names with a cluster name variable, and passing environment-specific values (stage and prod) when calling the module.
Configure Terraform modules for different environments by adding instance type, min size, and max size variables, and apply them to launch configurations and auto scaling groups.
Configure local variables in a Terraform module to replace hardcoded ports, IPs, and protocols with a locals block, enabling consistent references and preparing module outputs.
Expose the dns name of the application load balancer by defining and consuming output variables in a Terraform module and its web server cluster.
Reuse a Terraform module to deploy production alongside stage, configure a prod backend and key, adjust the cluster and instance counts, and validate separate DNS and load balancer setups.
Install Docker on your platform using the platform-specific instructions; the Docker client communicates with the Docker daemon to create, manage, and run containers via the command line.
Clone the DevOps Masterclass API repo locally, then build a Docker image for the Node backend and set up the Tucker configuration to run the API as a container.
Create a dockerfile to containerize a node.js api, using node 16 alpine as the base, copy project files, run npm install, and configure the start command for local use.
Learn to build a Docker image from a Dockerfile, tag it for easy reference, run a container with port mapping, and push the image to Docker Hub for reuse.
Push your built docker image to your Docker Hub account by logging in in the terminal and using docker push; verify the latest image and pull it with docker pull.
Learn how Packer automates building identical virtual machine images, creating golden images, patching, and immutable infrastructure in CI/CD, by using templates, provisions, and AWS AMI workflows.
Install packer across platforms using Homebrew on macOS, Chocolatey on Windows, or Linux instructions; ensure eight seal item and the SC Ally tool are installed before building images with PECO.
Create a packer template in hcl, organize files in a project folder, and define variables for region and docker credentials to configure image building using a source block.
Create the Packer source block using the amazon ami base and latest ubuntu in us east with a t2 micro, then apply ubuntu login, owner id, and image location filters.
Connect the build block in packer to a base image, use shell provisioning to install docker, log in to docker hub with env vars, and run a setup script.
Generate an SSH key pair, save it in the current directory, and bake the public key into the image during the packer build to enable SSH access after launch.
Add a daemon.json to enable Docker container logs in CloudWatch, ensure region and log group consistency, and extend the image with additional Packer provisions to move config files and keys.
Prepare and execute a packer build by configuring source, build, and provisions, exporting access and docker credentials, and troubleshooting image filters to successfully package the template.
Run a Packer build to create an image, locate and select a marketplace product image, copy the image location, and verify Docker on the AMI before launching an instance.
Create and verify a packer-built ubuntu image with docker, then deploy a cloud instance via terraform, setting up a vpc, subnets, and a terraform user with an ssh key.
Configure an IAM role with a CloudWatch policy, assign it to the EC2 instance profile, and verify the Docker image logs in Terraform-driven deployment.
Learn to create a custom Packer image, deploy it with Terraform in an EC2 instance, install Docker, run a container from Docker Hub, and automate via ci/cd pipelines.
Explore continuous integration and deployment by building a fully automated pipeline with Terraform, GitHub Actions, and YAML.
Clone the Nomad Store API from the DevOps Masterclass starter report and use Terraform, Docker, Packer, and GitHub actions for automated tablet deployment.
Learn how GitHub Actions provide a first-class, GitHub-integrated CI pipeline that reacts to pushes and pull requests, runs on Linux, Mac, or Windows, and automates builds, tests, and deployments.
Set up a .github/workflows/ci.yaml to trigger on push, define stage and production environments, and configure AWS credentials with the default region for the APC pipeline.
Configure two GitHub Actions environments (stage and production), manage per-environment variables and secrets, require production reviews, and push changes to a new repository.
Configure build triggers in a GitHub workflow to start builds on pushes to master, specific file path changes (dockerfile, workflows, deploy/terraform, packer, source), and pull requests to master.
Explore the yaml-driven ci jobs blueprint for deploying an api: run api tests, build and push a docker image, create an ami, and deploy stage and production with terraform.
Add the first GitHub Actions job named test on ubuntu latest, with checkout, node setup, npm install, and tests; push to review the build and prepare the docker stage.
Explore GitHub Actions syntax and workflow syntax in YAML, learn how keywords like name, runs-on, and steps are defined, and leverage GitHub documentation to streamline deployment.
Add a third build job to create the AMI image by building and pushing the docker image, logging into docker hub, and running packer validation and bake steps.
Establish an immutable deployment by building a new Docker image for each code push, and provision production and stage infrastructure with a VPC, load balancer, and subnets via Terraform modules.
Create Terraform remote backends by configuring an AWS S3 bucket and DynamoDB table for state locking, using a reusable module to support stage and production environments.
Configure stage and production remote backends using a shared module and a global S3 folder for remote state. Initialize and apply with Terraform, managing environment-specific bucket and DynamoDB names.
Create and configure separate remote backends for stage and production environments using S3 buckets and DynamoDB tables, ensuring isolated Terraform state and safe deployment.
Configure a custom VPC with three public subnets, an internet gateway, and route tables across three availability zones using Terraform, preparing the groundwork for the web server cluster.
Configure a load balancer in a VPC to expose a web server cluster via HTTPS and HTTP, manage security groups and subnets, and enable auto scaling.
Configure user data for an auto scaling group to boot docker-enabled ec2 instances, deploy a stripe api container, and manage optional s3 access logs behind a load balancer.
Utilize a terraform data template to render user data for an auto scaling group, fetch the latest Nomad AMI via a data source, and configure security groups, logs, and lifecycle.
Configure an auto scaling group in Terraform by linking a launch configuration to a target group, deploying into multiple subnets, and setting min/max sizes, environment variables, and a load balancer.
Learn to provision an SSL certificate with TerraForm using AWG Certificate Manager Service, configure Route 53 hosted domain, validate domain ownership, and route your custom domain to a load balancer.
Implement a dns-validated ssl certificate for a custom domain using Terraform, Route 53, and Amazon certificate manager, then link it to a load balancer and expose module outputs.
Stage environment execute module in the Terraform masterclass demonstrates using modular configurations to deploy stage resources, configure backend state, and pass variables via environment variables for Stripe, DNS, and SSL.
Deploy a stage environment by configuring EC2 instances to send docker logs to CloudWatch, using Terraform to create an IAM policy and role for the instance profile.
Deployment is usually one of the aspects that is tackled last when it comes to application development, and until only recently deployment experience for both Developers and Operations teams was very painful.
To this end, DevOps practices have now been adopted quite widely, and in a nutshell, DevOps is the intersection between Development and Operations.
A lot of tools have been created to tackle the pain points of making a deployment and these fall into different categories, like configuration tools, server templating, and Infrastructure as Code to mention a few.
Now in a lot of tutorials and courses, the focus is on learning and using these tools individually without any real world context. This means that you will need to use these different tools together yourself, and this can be difficult to use them in a real world context.
In this course we will be making a hands on deployment of an E-commerce Node API application with a custom SSL domain using a combination of the deployments tools that are available. These include:
Git Version control
Linux
Bash Scripts
Terraform
Docker
Packer
Continuous Integration - GitHub Actions
AWS
We're going to use all of these tools together to make an automated deployment without any manual steps such as configuring infrastructure resources in the UI console. We're also going to have the advantage of versioning our infrastructure in Git, which means that should there be any issues we can simply roll back the infrastructure deployed to a previous state very easily.