
Launch a complete corporate ci/cd pipeline from scratch, covering infrastructure setup, private repository, Kubernetes deployment, and Jenkins-driven build, test, Trivy scans, SonarQube quality checks, and deployment.
Set up a Kubernetes cluster on AWS with a master node and two workers to deploy containerized applications and configure security groups and essential ports (25, 80, 443, 22, 6443).
Learn how to install a container runtime for a Kubernetes cluster using containerd, load overlay and br_netfilter modules, configure sysctl, install containerd, and verify status on all nodes.
Resolve the Kubernetes cluster issue by switching containerd to the systemd cgroup driver, restart containerd and kubelet, and verify pods to prepare for joining worker nodes.
Join worker nodes to the cluster by using the kubeadm join command, running it with sudo on each node, and verifying with kubectl get nodes on AWS.
Launch two Ubuntu 22.04 AWS EC2 instances for sonar cube and Nexus with 20 GB storage, t2.medium, using the security group, and configure SSH access for ci cd pipeline setup.
Set up SonarQube and Nexus on Ubuntu using Docker, including updating packages, installing Docker via script, granting non-root access, and validating with Docker hello-world.
Access the nexus server through the web URL by logging in as admin, enabling anonymous access, and confirming the nexus repository and sonar cube server are configured.
Access Jenkins via web browser using the public IP and port 8080, then unlock Jenkins with the password file using sudo. Install suggested plugins and create a new Jenkins user.
Clone the GitHub repository with git clone in Git Bash, authenticate via a personal access token, and prepare to push local code for the upcoming CI/CD pipeline.
Install the required Jenkins plugins, including JDK, Maven integration, config file provider, pipeline Maven integration, SonarQube scanner, Docker pipeline, and Kubernetes plugins, and prepare integration with Maven and SonarQube.
Set up a Jenkins pipeline to check out the project from GitHub, install the latest JDK (17), run the build, and verify the workspace checkout in var/lib/jenkins/workspace.
Configure a ci/cd pipeline stage to run Trivy for source code vulnerability scanning. It checks pom.xml dependencies for vulnerabilities and sensitive data and forwards the results file to developers.
If you are familiar with various DevOps tools like Git, Jenkins, Maven, Trivy, Ansible, Docker, and Kubernetes but are unsure of how they work together, then using them would be pointless or,
Would you like to establish a comprehensive CI/CD pipeline utilizing a variety of DevOps tools? or,
If you are interested in understanding the logical workflow of a DevOps project, then this course is designed for you.
Course Content:
Section 1: Introduction
-> Introduction
-> Course Overview
Section 2: Set up a Kubernetes cluster in an AWS environment
-> Overview of the Kubernetes cluster created with Kubeadm
-> Create three VMs: one master and two worker nodes
-> Access the VMs using MobaXterm software
-> SSH from the master node to the worker node using a private key
-> Set the hostname, update the hosts file, and disable swap
-> Install a container runtime
-> Install kubeadm,kubelet and kubectl
-> Initialize the K8s cluster
-> Troubleshooting the Kubernetes clusture issue
-> Join worker nodes to the cluster
Section 3: Security scan by KubeAudit on Kubernetes cluster
-> Overview of security scan by kubeaudit
-> Download and install kubeaudit
-> Use kubeaudit to scan the manifest file
-> Use kubeaudit to scan the cluster
-> Use kubeaudit to scan the local
Section 4: Set up VM's for Jenkins,Nexus,Maven,and SonarQube tools
-> Create VM's for SonarQube & nexus
-> Install SonarQube using docker-1
-> Install SonarQube using docker-2
-> Access the SonarQube server through the web URL
-> Install nexus using docker-1
-> Install nexus using docker-2
-> Access the Nexus server through the web URL
-> Create a VM for Jenkins server
-> Install Jenkins on an Ubuntu virtual machine
-> Install Jenkins server through the web URL
-> Customize the jenkins
Section 5: Git Bash and GitHub
-> Create a private repository on GitHub
-> Install Git Bash and then clone the repository
-> Push the source code to a GitHub repository
Section 6: Customize the Jenkins
-> Installing the required plugins on the Jenkins server
-> Configure tools:JDK,sonarqube scanner,maven,docker
Section 7: Create a Jenkins pipeline job to check out the project
-> Create a job on Jenkins
-> Create credentials to access a private GitHub repository
-> Pipeline to checkout the project
Section 8: Compile and run unit test cases on source code
-> Compile the source code
-> Run unit test cases
Section 9: Trivy tool - Vulnerability Scan on Source Code
-> Download and Install Trivy tool
-> Vulnerability scan by Trivy using CICD pipeline
Section 10: SonarQube - Code quality tool for better code
-> Configure SonarQube server
-> Add a stage to the CI/CD pipeline for SonarQube analysis
-> Build the SonarQube job
-> Wait for SonarQube analysis
-> Add a stage WaitforQualityGate to the CI/CD pipeline
Section 11: Build the package: Using maven tool
-> Build the package
Section 12: Upload the artifact to the Nexus Repository
-> Overview of Sonatype Nexus Repository
-> Add a Global maven setting.xml from managed files
-> Add a stage Publish the Artifact into Nexus Repository
-> Build the job-Publish the artifact
Section 13: Build and Tag the Docker Image
-> Build and tag docker image
-> Create a dockerfile
-> Add an entry for Maven snapshots in the pom.xml file
-> Build the Job
Section 14: Docker Image Scanning by Trivy tool
-> Docker Image Scanning by Trivy tool
Section 15: Push the docker image to DockerHub
-> Push the docker image to DockerHub
Section 16: Deploy the application to a Kubernetes cluster environment
-> Create a service account on cluster
-> Create a role and bind it with the Service Account on Cluster
-> Create a authorized token
-> Add a stage to deploy the docker image to K8s Cluster
-> Create a deployment & service yaml file
-> Install kubectl,kubeadm,and kubelet in Jenkins server
-> Build the job
Section 17: Monitoring with Prometheus and Grafana
-> Download and install Prometheus
-> Download and install Grafana
-> Download and install blackbox exporter
-> Edit the prometheus.yml file and add the necessary entry
-> Access Prometheus by using the URL to reach the target
-> Visualize the application data using Grafana
-> Install plugins on Jenkins for system metrics
-> Monitor server metrics using Prometheus with Node Exporter
-> Visualize the server metric data using Grafana - 1
-> Visualize the server metric data using Grafana - 2
-> Last Lecture