
Connect to an ec2 instance using mobaxterm, putty, or gitbash with a public ip and pem key, then access as ec2-user via ssh and configure security groups for ssh.
Connect to an EC2 instance using Putty by converting the pem private key to a ppk with Puttygen, then load it in Putty with the public IP and ec2-user.
Learn to access an EC2 instance with username and password by enabling sshd password authentication, setting a root password, and restarting sshd to log in without a private key.
Demonstrates setting up passwordless ssh login between Linux servers by generating an rsa key pair and placing the public key in root's authorized_keys on the Ubuntu server, with correct permissions.
Demonstrates generating rsa ssh keys, updating the authorized key on the Amazon Linux server, and enabling passwordless access from devops to Amazon Linux and Ubuntu servers for streamlined ci/cd workflows.
Explore the Maven tool for building Java applications and managing the POM.xml, including dependencies and plugins, with essential commands like mvn clean install, mvn clean package, and mvn clean deploy.
Learn how mvn package creates a target directory with an artifact jar, how pom.xml version and artifact id affect the built file, and how changes trigger artifact overrides.
Explore the pom.xml file by running mvn clean package to remove previous artifacts and build a new one, resulting in only a single jar file.
Identify the local .m2 repository location for dependencies, then delete them and run mvn package to download from the public or Malone website, ensuring the local cache speeds future builds.
Build a web application with Maven by packaging via mvn package, generating the artifact in the target directory, downloading dependencies from the Maven repo, and preparing for automatic Jenkins pipelines.
Learn how SonarQube assesses code quality within continuous integration, performing static analysis to detect bugs, code smells, and vulnerabilities across 17 languages. Explore its features and Maven integration.
Access the SonarQube server at port 9000 via the web URL after enabling inbound traffic in the security group, then log in with admin/admin.
Demonstrates using sonar qube to detect and fix code quality issues by replacing System.out.println with a logger after running mvn clean package and inspecting the CI scans.
Install PostgreSQL 13 on Amazon Linux, install server and develop packages, initialize the database, enable and start the service, and prepare integration with SonarQube.
Steps to Integrate Gradle with Nexus
Set up a gradle server on aws linux 2, install java 1.8, install gradle 6, clone the project, and configure build.gradle plugins for nexus and sonar qube.
Move nexus credentials from build.gradle to gradle.properties, avoiding plain text in the main file, by defining repoUser and repoPassword, then publish to nexus maven release, and update version.
Explore Jenkins, an open source automation tool for continuous integration and delivery, and learn how to integrate it with GitHub and Maven using plugins to automate build, test, and deployment.
Configure Jenkins on EC2 by retrieving the admin password, install suggested plugins (Git, Maven, Ansible), and create the first admin user to start using the dashboard.
Configure Jenkins to use GitHub credentials and specify the Maven tool location in global tool configurations. Then explore creating a freestyle project and enabling Maven support with a plugin.
Install the Maven integration plugin in Jenkins and create a Maven project. The developer provides the pom.xml; modify the artifact version and rebuild to observe the changes.
Outline the CI/CD process from code push to GitHub through build, SonarQube checks, Docker image creation, and staging to production deployment, and then automate with Jenkins.
Start the SonarQube service on ubuntu, install OpenJDK, and generate a token. Access the web interface and run the Maven server command to check artifact quality.
Create a dockerfile to build an image from the jar artifact using java 8, copy target jar to app.jar, and set the entrypoint to java -jar app.jar for Amazon ECR.
Create and attach an IAM role to the CI server to grant Amazon ECR access, enabling authentication and Docker image build before pushing to the registry.
Explore continuous deployment by authenticating to AWS ECR from a CD server, then pulling the Docker image and running a container on port 8080.
Complete Pipeline for CICD process using Jenkins
Learn to automate ci/cd with Jenkins by setting up a dedicated build server on Amazon Linux 2, installing Java, Maven, Docker, and Jenkins, and enabling an end-to-end pipeline.
Learn to create a Jenkins Maven pipeline that checks out the project and builds a package using a declarative pipeline, with Maven 3.8.5 and agent any.
Install a SonarQube server on ubuntu via a docker container to check code quality, using the docker image on port 9000 and admin login to set a new password.
set up a jenkins pipeline to perform sonar quality checks by generating a sonar token on sonar qube server, installing the sonar qube plugin, and saving the token as credentials.
Learn to add sonar qube to a Jenkins server, configure the system with the qube URL, port 9000, and authentication token, and implement a sonar quality check in the pipeline.
Configure a Jenkins pipeline to run a SonarQube quality check with the SonarQube scanner, using the server, installation name, and credentials, then run mvn sonar to analyze.
Configure a SonarQube webhook to send quality status to Jenkins, enabling the CI/CD pipeline to proceed with building and pushing a Docker image to AWS ECR upon success.
Add a build stage in the Jenkins pipeline to create a Docker image from a Dockerfile using the project artifact and prepare pushing it to AWS ECR.
Push container images to AWS ECR by installing CloudBees AWS, AWS ECR, Docker, and Docker Pipeline plugins in Jenkins, then create an IAM user and configure Jenkins credentials.
Configure a Jenkins pipeline to email notifications on success or failure using SES, with customized subject and body, and verify the email notification after build and push to ECR.
Disclaimer
This course requires you to download and install the following software and tools before starting:
Prerequisites
AWS Account – A valid AWS account is required.
Java Development Kit (JDK)
Headless Amazon Corretto 11 (java-11-amazon-corretto-headless)
OpenJDK 11 (openjdk-11-jre-headless, openjdk-11-jdk-headless)
Apache Maven – Version 3.8.5 or the latest.
Git – Required for version control.
SonarQube – Version 9.3 or the latest.
Maven Repository Access – Must have access to maven repo website to build packages.
Additional Requirements for Amazon Linux (AWS)
If using an Amazon Linux machine on AWS, install the following packages:
PostgreSQL 13
Vim
EPEL (Extra Packages for Enterprise Linux)
Other Required Tools
Nexus Server
Gradle Server
Jenkins
Ansible
Ensure all dependencies are installed before proceeding with the course for a smooth learning experience.
The entire DevOps course is based on AWS Environment.
In this course module, you will learn in addition to Jenkins, crossing technologies that go hand in hand with this service, such as Docker, AWS, Ansible, Git, Maven, Gradle, Pipelines, and many more!
Every section of this course has a different set of quizzes, and there is also many project lab assignment that will help you demonstrate what you have learned.
Project: Integration of Jenkins with Maven Tool
Project: CICD Process - Manual Approach Using Maven, SonarQube, Docker, AWS ECR.
Project: CI/CD Process Using Jenkins
Project: Continuous Deployment using Ansible Playbook
Project: Jenkins Master and Slave Server Configuration
Project: Hands-On DevOps Project: Deploy a Node.js Web App with Jenkins CI/CD
Introduction
What are DevOps & benefits?
DevOps LifeCycle :
— Continuous Development
— Continuous Integration
— Continuous Testing
— Continuous Feedback
— Continuous Deployment
— Continuous Monitoring
Linux for DevOps
Create an AWS Account
Create an EC2 Instance - Amazon Linux
Create a key pair - Public & Private Key
MobaXterm - Connect EC2 Instance
Putty - Connect EC2 Instance
Gitbash - Connect to EC2 Instance
Create an EC2 Instance - Ubuntu
Filter Instances
Access Instance using User Name & Password (Without using Private key)
More about private & public key
Passwordless authentication from Linux to Ubuntu Server
Lab - Access the Amazon Linux Instance other than the default user
Lab - Access the Ubuntu Linux Instance other than the default user
Lab - Passwordless Authentication between Amazon Linux & Ubuntu and Vice versa
Maven Tool
Overview of Maven Tool
Maven Lifecycle: Default, Clean & Site
Repositories used in Maven
Lab - Build the Springboot package in AWS Environment
Lab: Location of Artifacts & built package dependencies
Lab: Exploring pom.xml file
Lab: Execute & access the package application
Lab: Exploring dependencies of a built package
Lab: Build Lifecycle
Lab: Build a Web Application project using maven
Lab: Build a Web Application project using maven
SonarQube tool in Continuous Integration
About SonarQube tool & its features
Installation of SonarQube
Check SonarQube logs & configuration
SonarQube Service & port
Access SonarQube via URL
Configure Maven (CI Server)
Checkout & build the project using Maven
Integrate Maven with SonarQube to check the code quality
Add Sonar-maven-plugin
Lab - Bad code detected by SonarQube
Lab - Rectified the code & re-check by SonarQube
PostgreSQL Database for SonarQube
About PostgreSQL Database
Setup PostgreSQL Database with SonarQube
Create Database, User, and Grant Privileges
Sonarqube Configuration file sonar properties
Troubleshooting PostgreSQL Database for SonarQube
Integration of Maven with Nexus Repositories
Install & configure Nexus Server
Configure Sonatype Nexus Repository Manager
Configure CI Server to check out the project & Build the package
Configure springboot maven nexus deploy
Nexus Requirements in the pom.xml
Define Nexus login credentials
Deploy the Artifacts to Nexus Repository
Integration of Gradle with Nexus Repositories
Installation of Nexus server
Configuration of Gradle Server as CI
Build the springboot tomcat project using gradle tool
Add plugin in build.gradle
Add Nexus repositories details in build.gradle
Use if-else condition in build.gradle
Add credentials in gradle properties
Publish the project artifacts into Nexus Server
Download the Artifacts using Continuous Deployment
Integrate Jenkins with Git & Maven project
About Jenkins
Overview of Jenkins integration with GitHub & how to build a java based project
Installation of Jenkins, Java, Maven & Git on EC2 Instance
Configure Jenkins on EC2 Instance
Configure GitHub Credentials & Maven Location on Jenkins
Create & Build the Java-based project using Maven Tool
Add Maven Plugins in Jenkins
CI/CD Pipeline – Manual Implementation with Maven, SonarQube, Docker & AWS ECR
CI/CD Process Explained: An Overview
Setting Up a Build Server with Java, Git, Maven, and Docker
Installing SonarQube on an Ubuntu Server
Configure Sonar-Maven-Plugin
Starting the SonarQube Service on Ubuntu
Analyzing Code Quality with SonarQube
Dockerfile Overview: Build Docker Images
AWS ECR: Create a New Repo
Create IAM Role to Allow CI Server Access to AWS ECR
Build and Push Docker Image to AWS ECR
Set Up a CD Server for Continuous Deployment
Pull and Run Docker Image from AWS ECR on CD Server
CI/CD Pipeline: Full Process Recap
CICD Process Using Jenkins
Overview of CICD Process using Jenkins
Install a Jenkins Server (CI Server)
Add maven in Jenkins Server from Global Tool Configuration
Create a Jenkins pipeline for Checkout & build the project
Install SonarQube Server using Docker container
Generate the token from SonarQube Server
Add Sonar Login Credentials on Jenkins Server
Install SonarQube Scanner plugins on Jenkins
Add SonarQube on Jenkins Server
Pipeline for SonarQube Scanner for Jenkins
Pipeline for success or aborted due to quality gate failure
Configure a webhook in your SonarQube Server
Add stage in pipeline to create a Docker Image using DockerFile
Create an IAM User to have access to AWS ECR and add it to Jenkins Server
Add stage in pipeline to Push the Docker Image to AWS ECR
Configure SES to send an email notification
Integrate SES with Jenkins using pipeline
Receive an Email Notification after the success or failure of Jenkins Pipeline
Continuous Deployment using Ansible Playbook
Configure a CD Server using Ubuntu Server
Ansible Setup on Jenkins Server
Install packages on CD Server
Create a Playbook to establish a connection from CD Server to AWS ECR
Playbook to pull the image from ECR to CD Server
Playbook to run the Container using the Docker Image
Access the Springboot Application running on CD Server
Jenkins Master and Slave Server
Overview of Jenkins master & slave server
How does Jenkins Master and Slave Architecture work?
Lab - Install Jenkins Master Server in AWS Environment
Lab - Configure Jenkins Master Server
Lab - Manager Nodes and Clouds
Lab - Setting up Slaves with Jenkins Master
Lab - Troubleshooting while adding a slave server
Lab - Create a job for the Slave Using Freestyle project
Lab - Create a job for Slave Using a pipeline project (Springboot Appl)
Lab - Create a job for Slave Using a pipeline project (Springboot Appl)
Configurations in slave machine
Lab - Establish connectivity between Master & Slave Using SSH keys
Lab - Launch agent on Slave Machine
Lab - Create a job for building a Springboot project on Slave Machine
Hands-On DevOps Project: Deploy a Node.js Web App with Jenkins CI/CD
Introduction
Course Overview
Git Bash and GitHub
Create a GitHub repository for a Bingo application
Install Git Bash
Clone the GitHub repository to your local system
Generate a personal access token
Push the source code to a GitHub repository
Set up the DevOps Environment on AWS
Set up virtual machines for Jenkins and SonarQube servers
Installation of Docker on a SonarQube server
Authenticate to DockerHub from the SonarQube server
Run SonarQube using Docker
Access the SonarQube Server via the URL using port 9000
Installation of Jenkins
Access the Jenkins Server via the URL using port 8080
Customize the Jenkins Server
Plugins required on the Jenkins server
Required Plugins on Jenkins Server
Configure tools on the Jenkins server
Configure JDK tool
Configure SonarQube Scanner tool
Configure Node.js tool
Configure Dependency-Check tool
Configure Docker tool
Set up a connection from Jenkins to the SonarQube server
Set up a connection from Jenkins to the SonarQube server
About Webhook
Configure a webhook
Add SonarQube Server
Jenkins CI/CD pipeline job to clean and check out the project
Create a job to clean the workspace
Add a stage in the pipeline to check out the project
SonarQube - Code quality tool for better code
Add a stage to the pipeline for SonarQube analysis
SonarQube Analysis command using `withSonarQubeEnv`
Run the job and check the SonarQube report
Add a stage WaitforQualityGate
Run the job to verify the WaitforQualityGate
Install Node.js dependencies, use npm command
Add a stage to Install Node.js dependencies
OWASP tool -Security testing tool
Add a stage to perform OWASP scanning
Explore the OWASP report
Trivy scanning tool
Add a stage to perform trivy fs scanning
Explore the trivy report
Build the Docker image and then push it to DockerHub
About the Docker Build
Add a stage to build the Docker image for a Node.js project
Dockerfile for building the Docker image
Run the job to verify the Docker Image
Push the Docker Image to DockerHub
Trivy - Scanning on Docker Image
Add a stage to scan the docker image
Explore the trivy report
Deploy the Node.js web Application
Add a stage to deploy the Docker Image/Node.js Project
Access the Node.js web application through the URL
Domain Registration and SSL Certification
Register a free domain
Install nginx
Modify the 'A' record DNS for the registered domain
Install and obtain the SSL Certificate
Last lecture