DevOps- Project 1 []
CI PIPELINE SETUP WITH VARIOUS TOOLS
Step 1 – Create the Ec2 instance in AWS account with these parameters
EC2 type – Ubuntu t2.medium
EBS volume – 30 GB
Region – US-EAST-1
Step 2 – Connect to EC2 and Install all tools in that system as root user
To login as root user - sudo su
Step 3 – Install Jenkins on CentOS
https://www.jenkins.io/doc/book/installing/linux/
Step 4 – Sign Into Jenkins console
http://<SERVER_IP>:8080/
Step 5 – Install Git.
Step 6 - Install Java
yum install install openjdk-17-jre -y
Step 7 – Install all suggested plugins
Step 8 – Create first user
Step 9 – Create a pipeline Job
https://github.com/singhiam15/Java_app_3.0.git
Step 11 – Add the Plugins
Dashboard -> Manage Jenkins -> Plugins ->
Available plugins Plugins for Sonar/Jfrog –
Sonar Gerrit
SonarQube Scanner
SonarQube Generic Coverage
Sonar Quality Gates
Quality Gates
Artifactory
Jfrog
Step 12 – Setup Docker
https://docs.docker.com/engine/install/centos/
sudo chmod 777 /var/run/docker.sock
Step 13- Install SonarQube
docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube
Step 14 – Sign Into SonarQube console
http://<SERVER_IP>:9000/
user:password - admin:admin
Step 15 -> Create Sonar token for Jenkins
Sonar Dashboard -> Administration -> My Account -> Security -> Create token -> Save the token to some text file
Step 16 - Integrate Sonar to Jenkins
Sonar Dashboard -> Administration -> Configuration -> webhooks -> Add the below name and URL and save
http://<server_IP>:8080/sonarqube-webhook/
Step 18 – Install TRIVY for docker image scan
https://aquasecurity.github.io/trivy-repo/
Integrate All tools with Jenkins
Jenkins Dashboard -> Manage Jenkins -> configure system
Step 1 – ADD SONARQUBE
Click on sonarqube servers -> add url and name -> Click on add token -> Select Secret text -> Add the sonar token -> Give name of token as sonarqube-api
Comments
Post a Comment