
Explore how to deploy a real-time Node.js web application via a CI/CD pipeline with DevSecOps, integrating Jenkins, SonarQube, Trivy, Docker, and AWS, with domain registration and SSL for secure deployment.
Deploy a real-time bingo online game via a Jenkins ci/cd pipeline with DevSecOps, integrating NodeJS, GitHub, SonarQube, Trivy, Docker, and domain with SSL for https access.
Create a GitHub repository for the bingo online game by initializing a public repo and pushing local node js source code using git bash.
Install git bash on Windows to push local source code to GitHub; download, install the latest git bash, launch the terminal, and push from your project folder.
Clone your GitHub repository to your local system using git clone, paste your source code into the local folder, and prepare to push in the next lecture.
Push your source code to a GitHub repository with git add, commit, and push, using a personal access token for authentication in CI/CD.
Push local source code to a GitHub repository using a personal access token, set up with two-factor authentication, token scopes, and a 30-day expiration, then verify the push.
Set up two Ubuntu 22.04 VMs on AWS for Jenkins and SonarQube servers, configure HTTP and HTTPS access, and prepare to install required packages.
Access the SonarQube and Jenkins servers via SSH, update the systems, and install Docker from the official apt repository. Ensure Docker runs as preparation for deploying SonarQube with Docker.
Authenticate the SonarQube server to Docker Hub by logging in, resolve normal user permission issues with Docker via sudo, and prepare to pull the SonarQube image for container deployment.
Launch and run a SonarQube container with Docker, mapping port 9000, naming the container, and verifying with docker ps to access via the public IP and port 9000.
Access the sonar cube server via port 9000, open inbound port rules, log in as admin/admin, update the password to admin 123, and use the server to scan the project.
Configure Jenkins on Ubuntu by installing Java 17+, following the official Jenkins install commands, installing Docker, and opening port 8080 in the security group to access the server.
Open port 8080 on the Jenkins server by configuring inbound rules in the security group and verify access via the Jenkins URL. The same group also serves sonar cube.
Configure the Jenkins server by retrieving and entering the administrator password, then customize Jenkins, install suggested plugins, create the first admin user, and prepare for further software installations alongside Sonarqube.
Install the required plugins on Jenkins to integrate tools such as Sonarqube, Java, NodeJS, Trivy, OWASP, and Docker by using Manage Jenkins, plugins, search, install, and restart.
Configure the JDK tool in Jenkins by adding a JDK 17 installation, enabling automatic installs, and installing from adoptme dotnet before saving the settings.
Configure the SonarQube scanner tool in Jenkins to integrate with a SonarQube server, naming the scanner and selecting version five, alongside the JDK tool.
Configure the node js tool in Jenkins, installing node js version 16 with automatic installation, and prepare npm, OWASP, and docker tools for the real-time online game ci/cd setup.
Install and configure the npm dependency check tool in Jenkins by adding the dependency check option, naming it DP, enabling automatic installation from GitHub, selecting the version, and saving.
Configure Docker tool in Jenkins by installing the latest version from docker.com, automatically downloaded, and integrate it with JDK, sonar cube scanner, and Node.js dependency check, then apply and save.
Generate a SonarQube token from the server, copy it, and create a Jenkins secret text credential named sonar-token under Manage Jenkins to use in pipelines.
Create a webhook on the SonarQube server to trigger actions after analysis completes and wait for quality gate to abort the pipeline if it fails.
Create a webhook on the Sonarqube server by naming it (for example, Jenkins), entering the Jenkins server URL, adding the Sonarqube-webhook with a trailing backslash, and clicking create.
Add Sonar Cube server details to the Jenkins server by configuring the Sonar Cube installation, setting the name and URL, and using existing credentials to establish the connection.
Configure a Jenkins ci/cd pipeline that checks out the bingo online source code from GitHub, sets up JDK 17 and NodeJS, and cleans the workspace as the first stage.
Add a new stage to the ci/cd pipeline on a Jenkins server to check out the project from a GitHub repository using the git command on the main branch.
Add a Sonar Cube analysis stage to the Jenkins pipeline, leveraging the existing Sonar Cube server and scanner for code analysis.
Configure a SonarQube project on the server, create a token, and insert the analysis command with withSonarQubeEnv into your pipeline for a NodeJS project on Linux.
Run the sonar cube analysis in the pipeline, review the sonar cube report for bugs, code smells, and security hotspots, fix issues in the source and rebuild.
Add a quality gate stage to the pipeline to determine progression after sonar cube analysis. Configure the script to wait for the quality gate signal via webhook and credentials.
Verify quality gate by running a build in Jenkins, observe the timestamp update from 333 to 341, and confirm a success status via the SonarQube webhook.
Add a stage to install Node.js dependencies with npm install in a Jenkins pipeline, using nvm, and review npm audit findings and vulnerabilities in the CI/CD workflow.
Add a Jenkins pipeline stage to run an OWASP scanning tool via dependency-check, generating an XML report to surface vulnerabilities in the Node.js project for dev teams.
Explore the OWASP report by accessing the Jenkins server, copying the XML report to the local system, and preparing it for developers using WinSCP and PuTTYgen.
If you are familiar with DevOps tools such as Git, Jenkins, Maven, SonarQube, Trivy, OWASP, and Docker but do not understand how they work together, then learning these tools will be of no use to you.
This course module will provide you with a conceptual understanding of how to integrate these tools to deploy an online Bingo web application.
This course module will provide you with hands-on experience in a real-time DevOps project using Node.js with a CI/CD Jenkins pipeline.
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: 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
Section 3: 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
Section 4: Plugins required on the Jenkins server
-> Required Plugins on Jenkins Server
Section 5: Configure tools on the Jenkins server
-> Configure JDK tool
-> Configure SonarQube Scanner tool
-> Configure Node.js tool
-> Configure Dependency-Check tool
-> Configure Docker tool
Section 6 : 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
Section 7: 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
Section 8: 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
Section 9: Install Node.js dependencies, use npm command
-> Add a stage to Install Node.js dependencies
Section 10: OWASP tool -Security testing tool
-> Add a stage to perform OWASP scanning
-> Explore the OWASP report
Section 11: Trivy scanning tool
-> Add a stage to perform trivy fs scanning
-> Explore the trivy report
Section 12: 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
Section 13: Trivy - Scanning on Docker Image
-> Add a stage to scan the docker image
-> Explore the trivy report
Section 14: 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
Section 15: 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