1. Infrastructure as Code (IaC) with Terraform
Terraform is an open-source IaC tool that helps you provision cloud infrastructure using declarative
configuration files. It works with AWS, Azure, GCP, Kubernetes, GitHub, Kubernetes, and
hundreds more via providers.
1.1 Core Terraform Concepts
- Providers: Connect Terraform to cloud platforms (e.g., AWS provider).
- Resources: Actual infrastructure components (EC2, VPC, S3, IAM, etc.).
- Variables: Input configurations.
- State File: Stores current infrastructure state (
terraform.tfstate).
- Modules: Reusable infrastructure components.
1.2 Basic Terraform Workflow
terraform init
terraform plan
terraform apply
terraform destroy
1.3 Provisioning AWS Resources Using Terraform
- Create VPC, Subnets, Route Tables
- Launch EC2 instance via Terraform
- Create S3 bucket & IAM policies
- Use modules for reusable infrastructure patterns
2. Configuration Management with Ansible
Ansible is an agentless configuration management tool used to automate application deployment, updates, user
creation, package installation, firewall rules, etc. It connects to servers using SSH.
2.1 Essential Ansible Components
- Inventory: List of servers to manage.
- Playbooks (YAML): Automation scripts.
- Tasks: Steps inside a playbook.
- Roles: Reusable and structured automation components.
2.2 Sample Playbook
---
- hosts: webservers
become: yes
tasks:
- name: Install Nginx
apt:
name: nginx
state: present
2.3 What You Will Automate
- Install Docker using Ansible
- Configure Jenkins automatically
- Set up Kubernetes nodes
- Deploy apps using Ansible playbooks
3. GitOps & Deployment Strategies
GitOps is a modern DevOps methodology where Git is the source of truth for all
infrastructure and applications. You push changes → automation tools apply them.
3.1 GitOps with ArgoCD
- Manage Kubernetes deployments using Git.
- Automatically sync manifests with K8s clusters.
- Visual dashboard for application health.
3.2 Deployment Strategies
- Blue-Green Deployment: Two identical environments → switch traffic instantly.
- Canary Deployment: Release to small % of users → increase gradually.
- Rolling Deployment: Replace pods one-by-one with zero downtime.
4. End-to-End DevOps Capstone Project
You will create a full production-grade DevOps pipeline integrating all technologies from Month 1 to Month 4.
Project Flow:
- Code Commit → GitHub repo
- CI Pipeline → Jenkins (build + test)
- Docker Image → Build & push to Docker Hub/ECR
- Kubernetes Deployment → K8s cluster using Deployment + Service + Ingress
- IaC Provisioning → Terraform creates EC2, VPC, EKS cluster
- Config Management → Ansible installs dependencies on servers
- GitOps → ArgoCD auto-syncs app updates
Deliverables
- GitHub Repository (Code + Jenkinsfile + Dockerfile + K8s YAML + Terraform + Ansible)
- CI/CD pipeline screenshots
- Architecture Diagram
- Live Application Deployment