Skip to content

Sharad-Chandra/DevOps-SDLC-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to my DevOps-SDLC-Project ☁️🙋‍

Explanation of Project:

In this project, the deployment of a web application to a production server is being done following the Software Development Life Cycle and utilizing DevOps tools. The first step in this process is using a Terraform script to build AWS EC2 instances. This is a more efficient method compared to building the backend on the AWS console, as it can be automated and saves time and effort. Once the EC2 instances are ready, Jenkins is configured on an EC2 Medium server, and a CICD pipeline is built. This is achieved by configuring Sonarqube for checking code standards and Nexus artifact repository for taking backups. The configuration is done on individual EC2 instances to ensure scalability and fault tolerance. Apache Tomcat is then configured on the production server where the web application is to be deployed. This ensures that the server is ready to handle the application once it is deployed. For monitoring the production server, Prometheus is configured along with the Nord exporter, which uses Grafana dashboard for real-time monitoring. This provides updates on the performance of the web application in real-time, allowing for timely troubleshooting of issues. To monitor the logs of the production server where the application is deployed, ElasticSearch and Metricbeats are configured. This allows for easy access to logs and enables quick identification and resolution of any problems that may arise. Finally, Nginx is used as a reverse proxy to hide the IP address of the production server on which the application is running. This provides an additional layer of security and helps keep the server safe from any malicious attacks. In conclusion, this project takes a comprehensive approach to deploying a web application on a production server, utilizing a wide range of DevOps tools to ensure efficient deployment, effective monitoring, and high-level security. The use of DevOps tools ensures that the deployment process is streamlined, and issues can be quickly identified and resolved.

System Architecture Design:

image

Terraform:

I written the below terraform script to create the backend infrastructure on AWS, which will be required for configuring sonarqube and nexus repo. Using Infrastructure-as-Code is much more efficient instead of building the backend on the AWS console. Screenshot 2023-04-17 at 1 24 14 PM Here i have written a script that would install a Aapche Tomcat on one the first ec2 instance, which will be used as a production server on which the application will be deployed. terraform 2023-04-17 at 1 47 38 PM

Jenkins:

I have configured jenkins on t2.medium (always use t2.medium or higher for Jenkins, because t2.micro's hardware is insufficient for jenkins and it would crash). I have set up Jenkins as an application rather than a service. As Jenkins is an application, it needs Tomcat to be installed in order to function. Here i have used declartive script for this pipeline. Screenshot 2023-04-17 at 2 13 34 PM This can also be done using freestyle pipleline we have to install sonarqube and nexus plugins for this to work.

Screenshot 2023-04-17 at 2 16 28 PM

### Installing SonarQube: I have configured sonarQube on Ubuntu server, below are the list of commands i have used: ```bash sudo apt install wget ``` ```bash wget https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-5.6.7.zip ``` ```bash unzip sonarqube-5.6.7.zip ``` Sonarqube default database is Mysql, so i have installed mysql on the server. ```bash sudo apt install mysql-server -y ``` ```bash sudo systemctl start mysql ``` later i have created a database, user and added privilages to that user.

Screenshot 2023-04-17 at 2 42 25 PM

### SonarQube runs on port 9000

Screenshot 2023-04-17 at 2 45 12 PM

## Nexus Artifact Repo: I have setup nexus repository on t2.micro and configured it into jenkins pipeline. I have created a private repository on nexus for to store the code backup after successful deployment.

Screenshot 2023-04-17 at 2 58 41 PM

## Prometheus and Grafana: On the production server, I've set up Prometheus to keep track of the system-level application insights. NordExporter generates a TCP/IP port on the corresponding system and presents its metric data to Grafana, allowing for real-time monitoring of the system's status.

Screenshot 2023-04-17 at 3 10 59 PM

I have configured grafana dashboard for cpu and memory utilization on application server as per the given threshold limit.

Screenshot 2023-04-17 at 3 11 23 PM

ElasticSearch

On the production server, I've installed Elasticsearch and configured Metricbeat to transmit data to Elasticsearch. This enables us to examine application logs and scrutinize the data in greater detail using the Kibana dashboard.

Screenshot 2023-04-17 at 3 21 25 PM

About

This Github repo showcases my deployment skills using Jenkins, SonarQube, Nexus, Prometheus, Grafana, and Elastic Search to monitor real-time server status. The Terraform scripts help obtain AWS EC2 instances for the servers. The project demonstrates efficient automation and security measures in software development.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors