
Define devops as the collaboration of development and operations to accelerate releases and reliability, using end-to-end AWS pipelines with continuous integration and delivery.
Prepare prerequisites: create an active AWS account with the free tier and a GitHub account. Fork the Hello world repo and set up TerraForm tooling and Grafana alerts.
Install Terraform and Visual Studio Code, create a new AWS VPC with gateways, subnets, ACLs, and security groups, configure S3 as the Terraform state backend, and create an ECR repository.
Install Terraform and Visual Studio Code to provision AWS infrastructure for a CI/CD pipeline. Learn to set up the Terraform path, verify installation, and add the HashiCorp VS Code extension.
Provision a production VPC in AWS using Terraform, organizing infrastructure with main.tf, variables.tf, terraform.tfvars, and outputs.tf. Initialize the provider, plan changes, and apply to deploy a 192.168.0.0/16 VPC.
Store credentials as environment variables to securely pass AWS access key and secret access key to Terraform, avoiding plain text exposure.
Deploys the internet gateway, elastic ip, and nat gateway for the vpc, enabling private subnets to reach the internet via the nat gateway; explains the terraform setup.
Create and attach public and private route tables in a VPC using Terraform, routing traffic to the internet gateway and NAT gateway. Understand CIDR usage and subnet roles.
Learn to create subnets with Terraform in a VPC, configure public and private subnets, set CIDR blocks and availability zones, enable public IP on launch, and manage route tables.
Explicitly associate Terraform-created route tables with each subnet—public subnets to the public route table and private subnets to the private route table—enabling internet and NAT gateway traffic.
Define a Jenkins security group with Terraform, opening ports 8080 and 22 for ingress and allowing all outbound traffic, tied to the production VPC and described clearly.
Create five security groups for the ci/cd pipeline components—sonarqube, ansible, grafana, application, and load balancer—using Terraform, with ingress ports 80, 22, 3000, 3022, and 9000, then plan and apply.
Create an elastic container registry (ecr) with Terraform to store Docker images for deployment, using Ansible to host artifacts. Enable image scanning on push and verify the repo in AWS.
Create a key pair with puttygen, convert it to pem, and save as auth_key.pem for AWS access. Then configure a Terraform aws_key_pair with key_name and public_key and apply to EC2.
Create and configure a Jenkins server in AWS using Terraform, integrating with Git and Maven to automate the CI/CD pipeline.
Launch a Jenkins server on an EC2 instance using Terraform with the Linux 2 AMI, t2 micro, a public subnet, key name, security group, and user data to install Jenkins.
Launch and configure Jenkins on an EC2 instance using Terraform, install Java 11, start Jenkins, and expose its public IP via Terraform outputs for integration with Git and Maven.
Learn to access a Jenkins server on EC2, change the admin password, and configure Java with OpenJDK 11 in Jenkins, paving the way for Git integration.
Install and configure maven on the server, set M2_HOME and M2, and verify with mvn version. Then install Jenkins maven integration and invoker plugins, and configure Jenkins to use /opt/maven.
Create a Jenkins Maven project that builds code pushed to the git main branch. Trigger builds with a pull-based schedule every minute and run clean install package.
Integrate Sonar Cube as the code quality analysis tool in the AWS CI/CD pipeline, launching it with Terraform in the VPC and integrating with Jenkins to analyze code on push.
Write Terraform code to spin up an EC2 instance for SonarQube using an Ubuntu AMI, configure the instance type and network settings, and output the public IP.
Configure an EC2 instance to host a SonarQube server, install OpenJDK 11, Postgres, create sonar user and database, start service, verify access on port 9000, plan Jenkins integration for reports.
Integrate SonarQube with Jenkins to automatically analyze code on GitHub pushes, configure the SonarQube server and scanner on EC2, and run Maven goals to generate detailed quality reports.
Integrate Ansible into the AWS CI/CD pipeline by launching an EC2 host alongside Jenkins, packaging builds into Docker containers, and storing images in ECR for deployment on the Ansible target.
Write Terraform code to launch an Ansible instance and install Ansible and Docker via a shell script. Reuse the Jenkins security group for ssh and output the Ansible public ip.
Configure a Jenkins job to sense git commits, build with Maven, and produce an artifact. Copy the artifact from Jenkins to the Ansible server via SSH for Docker packaging.
Merge sonar analysis into the CI job in Jenkins, run sonar scanner and mvn install, then transfer artifacts to the Ansible server and containerize with Docker to push to ECR.
Create a docker image from a tomcat base by copying your web app, build and run a container, and push the image to an AWS ECR repository for deployment.
Automate docker image creation and storage in AWS Elastic Container Registry using an Ansible playbook, with inventory targets, SSH keys, and tasks to remove, build, tag, and push images.
Create an Ansible cd_playbook to stop and remove the old container, pull the latest image from ECR, and run a new one on port 8080.
Set up a cd job that pulls the latest Docker image from AWS ECR and runs it in a container via Ansible. Trigger this after a successful CI job.
Deploy and configure infrastructure for a scalable pipeline with two app servers behind a load balancer, using Terraform to set up auto scaling and updating Jenkins/Ansible for container deployment.
Create a launch configuration in AWS with Terraform, using the Amazon Linux 2 AMI, t2 micro instances, security groups, and SSH key pair to support the auto scaling group.
Configure a two-instance auto-scaling group with a target group in AWS using Terraform, including launch configuration, subnets, ELB health checks, and an ASG target group attachment for high availability.
Configure an internet-facing application load balancer in amazon web services with Terraform, attach to the auto scaling group, and use a listener to forward http traffic to the target group.
Configure and integrate EC2-based application servers into the ci/cd pipeline using Ansible playbooks, ssh access, Docker deployments to ECR, and Jenkins job limits for local and app servers.
Explore the end-to-end pipeline: Jenkins builds with Maven, analyzes code with SonarQube, packages Docker images in AWS ECR, and deploys via Ansible to app hosts behind a load balancer.
Limit direct access by configuring security groups so only the load balancer can reach port 80. Demonstrate health checks and auto scaling that maintain two healthy instances.
Use Grafana to monitor the pipeline with Cloudwatch data, deploy a dedicated Grafana VM via Terraform, and configure email alerts for CPU and RAM thresholds.
Learn to integrate Grafana with AWS CloudWatch to monitor EC2 metrics, create dashboards, and configure panels with CPU utilization, instance IDs, and load balancer data.
Configure an SNS topic and a CloudWatch rule to monitor EC2 instance state changes in an auto scaling group and trigger SMS alerts.
During this course, we will focus on building a secure CI/CD pipeline, by integrating some well-known DevOps tools. In a typical production scenario, developers working on the same application push their new features to a common repository, which is represented most of the times by Git. In the next step, there comes the need of a continuous integration & building tool, such as Jenkins, whose job is to periodically perform polling activities to the Git repository, and when it senses there was a new commit, it takes the new application, performs some quality and security analysis of the code through the SonarQube app, then builds it with the help of Maven plugin and sends the build artifacts to Ansible. Ansible packages these artifacts into Docker containers and deploys them on the production servers, so that the application is accessible for the clients. All this process happens automatically, meaning that after developers push their new code to Git, the features should be seen by the end user without any intervention from the Dev or Ops teams. The whole infrastructure that performs this process is hosted in AWS cloud and created with the help of the most popular infrastructure provisioning tool, Terraform. Each independent server (Jenkins, Ansible, SonarQube & Application hosts) will also be monitored by Grafana, and alerts will be configured in the case of any malfunctions.