
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).
Launch three Ubuntu instances to form a Kubernetes cluster with a master node and two worker nodes, configuring storage, security group, and a key pair.
Access master and worker nodes with Mobaxterm using SSH and a private key, then update the software on all three servers with sudo.
Learn to ssh from the master node to worker nodes using a private key, matching the client private key with the workers' public keys and connecting as ubuntu@ip with -i.
Disable swap on all three servers, set hostnames to master and worker nodes, and update /etc/hosts with each IP and name; use ssh -i key ubuntu@IP to verify connectivity.
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.
Install kubeadm, kubelet, and kubectl on three servers with a script that updates packages, downloads certificates, and locks versions; verify master node versions and observe kubelet inactive before initialization.
Initialize the cluster by running cube adm init on the control plane as a regular user, then join worker nodes and verify with cube CTL get nodes and pod -A.
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.
Explore security scanning of a Kubernetes cluster with cube audit, an open source Shopify tool, using manifest, local, and cluster modes to audit manifest files before deployment.
Download and install cube audit on your kubernetes cluster by grabbing the linux amd64 release from github, then extract and move the binary to /usr/local/bin as root.
Scan a Kubernetes manifest for the nginx image with cube audit, resolve errors with optional parameters or auto fix, and save the corrected manifest as fixed pod.yml, leaving only warnings.
Use kube audit in cluster mode to audit all kubernetes resources in a cluster, then run a kubectl-based container audit with the image, and report vulnerabilities.
explore local mode in kube audit by connecting to a cluster with your local kube config, optionally specifying a different kubeconfig location with --kubeconfig and a context with -c.
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.
Install and run SonarQube with Docker, launch a detached container named sonar on port 9000, verify with docker ps, and access via the machine IP:9000.
Open the sonar cube dashboard by adding port 9000 to the VM security group and logging in with admin; set a new password. Preview next steps to configure Nexus.
Set up nexus with docker by updating the system, installing docker, authenticating to docker hub, and running a nexus container on port 8081; verify with docker ps.
Access the Nexus server via its public IP on port 8081, sign in as admin, and retrieve the password from the container's file.
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.
Create and configure a vm running ubuntu 22.04 LTS to host a Jenkins server for real-time ci/cd automation, allocate 30 gb storage, access via ssh, and update software.
Install Jenkins on an Ubuntu virtual machine after ensuring Java 17 or newer, verify with systemctl status Jenkins, and install Docker to complete the Jenkins server setup.
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.
Create the first admin user, choose a username, save and continue to configure Jenkins. Access the Jenkins URL, start using Jenkins, and verify the dashboard shows a completed configuration.
Learn to push local source code to a private GitHub repository, including creating the repo, copying the URL, and using Git Bash on Windows.
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.
Push local code to the GitHub repository by running git add ., git commit -m 'added source code by developers', and git push after placing files in the repo.
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.
Integrate essential tools with the Jenkins server by configuring JDK 17, SonarQube scanner, Maven, and Docker, selecting automatic installations and latest versions.
Create a Jenkins pipeline job, configure tools like JDK 17 and Maven, and implement stages such as checking out from GitHub, handling private repos with credentials.
Create Jenkins credentials for a private GitHub repository using a login name and a personal access token, generated in GitHub, to replace password authentication, then generate the pipeline.
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.
Integrate Maven within a Jenkins pipeline to compile the source code copied from GitHub, download dependencies, and prepare the target directory for an artifact, with unit tests upcoming.
Add and run unit test cases with mvn test to verify compiled code, observe the build lifecycle’s test phase, and confirm success before moving to sonar cube code quality analysis.
Install and configure Trivy on the Jenkins server to scan project dependencies in pom.xml for vulnerabilities and misconfigurations, and generate an HTML report from the scan results.
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.
Configure a SonarQube server and integrate the SonarQube scanner into a Jenkins CI/CD pipeline to perform static code analysis, detect bugs, vulnerabilities, and security hotspots across 20 languages and frameworks.
Extend a Jenkins CI/CD pipeline by adding a sonar cube analysis stage. Configure the sonar cube server and scanner, and wire credentials and environment variables to run the analysis.
Execute the ci pipeline to run the sonar cube job for code quality analysis. View the dashboard to confirm bugs, vulnerabilities, hot spots, code smells, coverage, and duplication pass.
Learn to wait for SonarQube analysis and enforce a quality gate in a Jenkins pipeline with a wait for quality gate step and SonarQube webhook.
Add a wait for quality gate stage in the ci/cd pipeline, run sonar analysis, and optionally abort the pipeline on failure; confirm success when the quality gate passes.
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