From e63aceb4ba8ddd378f3068c709ed1f2dd234d447 Mon Sep 17 00:00:00 2001
From: Akshiv Rajendran <55129768+Akshiv20@users.noreply.github.com>
Date: Wed, 27 Dec 2023 12:13:49 +0530
Subject: [PATCH 01/14] Update README.md
---
README.md | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/README.md b/README.md
index 17faac6e2..f94d70f00 100644
--- a/README.md
+++ b/README.md
@@ -14,14 +14,6 @@
Home Page
-# **Youtube Video for step by step Demonstration!**
-[](https://youtu.be/g8X5AoqCJHc)
-
-
-## Susbcribe:
-[https://www.youtube.com/@cloudchamp?
-](https://www.youtube.com/@cloudchamp?sub_confirmation=1)
-
# Deploy Netflix Clone on Cloud using Jenkins - DevSecOps Project!
### **Phase 1: Initial Setup and Deployment**
@@ -37,7 +29,7 @@
- Clone your application's code repository onto the EC2 instance:
```bash
- git clone https://github.com/N4si/DevSecOps-Project.git
+ git clone https://github.com/Akshiv20/DevSecOps-Project.git
```
@@ -755,4 +747,4 @@ To deploy an application with ArgoCD, you can follow these steps, which I'll out
**Phase 7: Cleanup**
1. **Cleanup AWS EC2 Instances:**
- - Terminate AWS EC2 instances that are no longer needed.
\ No newline at end of file
+ - Terminate AWS EC2 instances that are no longer needed.
From e929073718a4b4019cf8b31b061f2834f34d1659 Mon Sep 17 00:00:00 2001
From: Akshiv Rajendran <55129768+Akshiv20@users.noreply.github.com>
Date: Fri, 12 Jan 2024 22:00:38 +0530
Subject: [PATCH 02/14] Update README.md
Changed Dockerhub repo name from (nasi101) to (akshiv)
---
README.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index f94d70f00..e20e9d635 100644
--- a/README.md
+++ b/README.md
@@ -325,27 +325,27 @@ pipeline{
script{
withDockerRegistry(credentialsId: 'docker', toolName: 'docker'){
sh "docker build --build-arg TMDB_V3_API_KEY= -t netflix ."
- sh "docker tag netflix nasi101/netflix:latest "
- sh "docker push nasi101/netflix:latest "
+ sh "docker tag netflix akshiv/netflix:latest"
+ sh "docker push akshiv/netflix:latest"
}
}
}
}
stage("TRIVY"){
steps{
- sh "trivy image nasi101/netflix:latest > trivyimage.txt"
+ sh "trivy image akshiv/netflix:latest > trivyimage.txt"
}
}
stage('Deploy to container'){
steps{
- sh 'docker run -d --name netflix -p 8081:80 nasi101/netflix:latest'
+ sh 'docker run -d --name netflix -p 8081:80 akshiv/netflix:latest'
}
}
}
}
-If you get docker login failed errorr
+If you get docker login failed error
sudo su
sudo usermod -aG docker jenkins
From bf4b1a8f8871768c4accad798382bb82b7f56e22 Mon Sep 17 00:00:00 2001
From: Akshiv Rajendran <55129768+Akshiv20@users.noreply.github.com>
Date: Fri, 12 Jan 2024 22:05:59 +0530
Subject: [PATCH 03/14] Update README.md
Changed Github name from "n4si" to "Akshiv20"
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index e20e9d635..ec8c64ee4 100644
--- a/README.md
+++ b/README.md
@@ -196,7 +196,7 @@ pipeline {
}
stage('Checkout from Git') {
steps {
- git branch: 'main', url: 'https://github.com/N4si/DevSecOps-Project.git'
+ git branch: 'main', url: 'https://github.com/Akshiv20/DevSecOps-Project.git'
}
}
stage("Sonarqube Analysis") {
@@ -286,7 +286,7 @@ pipeline{
}
stage('Checkout from Git'){
steps{
- git branch: 'main', url: 'https://github.com/N4si/DevSecOps-Project.git'
+ git branch: 'main', url: 'https://github.com/Akshiv20/DevSecOps-Project.git'
}
}
stage("Sonarqube Analysis "){
From 7c39db36b7120a8552fe8bd5b88fb356b344d46e Mon Sep 17 00:00:00 2001
From: Akshiv Rajendran <55129768+Akshiv20@users.noreply.github.com>
Date: Fri, 12 Jan 2024 22:24:30 +0530
Subject: [PATCH 04/14] Update README.md
Line no: 341, removed the docker container name as "Netflix" for safe zone"
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index ec8c64ee4..338b3da32 100644
--- a/README.md
+++ b/README.md
@@ -338,7 +338,7 @@ pipeline{
}
stage('Deploy to container'){
steps{
- sh 'docker run -d --name netflix -p 8081:80 akshiv/netflix:latest'
+ sh 'docker run -d -p 8081:80 akshiv/netflix:latest'
}
}
}
From 173dc561428d99a85316358b5701e77c89a8e129 Mon Sep 17 00:00:00 2001
From: Akshiv Rajendran <55129768+Akshiv20@users.noreply.github.com>
Date: Sat, 13 Jan 2024 00:03:02 +0530
Subject: [PATCH 05/14] Update README.md
Line # 206, changed the project key from (Netflix) to (Netflix-beta)
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 338b3da32..0c6d5a679 100644
--- a/README.md
+++ b/README.md
@@ -203,7 +203,7 @@ pipeline {
steps {
withSonarQubeEnv('sonar-server') {
sh '''$SCANNER_HOME/bin/sonar-scanner -Dsonar.projectName=Netflix \
- -Dsonar.projectKey=Netflix'''
+ -Dsonar.projectKey=Netflix-beta'''
}
}
}
From 60efef7a846ed023a281c78c893a8892db523baf Mon Sep 17 00:00:00 2001
From: Akshiv Rajendran <55129768+Akshiv20@users.noreply.github.com>
Date: Sat, 13 Jan 2024 00:05:47 +0530
Subject: [PATCH 06/14] Update README.md
Line no: 296, changed from Netflix to Netflix-beta
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 0c6d5a679..138ceefc4 100644
--- a/README.md
+++ b/README.md
@@ -293,7 +293,7 @@ pipeline{
steps{
withSonarQubeEnv('sonar-server') {
sh ''' $SCANNER_HOME/bin/sonar-scanner -Dsonar.projectName=Netflix \
- -Dsonar.projectKey=Netflix '''
+ -Dsonar.projectKey=Netflix-beta '''
}
}
}
From 46e7d5a15a1a99227a90f13da550561a78d5f612 Mon Sep 17 00:00:00 2001
From: Akshiv Rajendran <55129768+Akshiv20@users.noreply.github.com>
Date: Sat, 13 Jan 2024 00:12:38 +0530
Subject: [PATCH 07/14] Update README.md
Updated code from line no 345, removed the docker commands from the pipeline script, and pasted outside the script
If you get docker login failed error
sudo su
sudo usermod -aG docker jenkins
sudo systemctl restart jenkins
---
README.md | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index 138ceefc4..589f50f05 100644
--- a/README.md
+++ b/README.md
@@ -343,16 +343,12 @@ pipeline{
}
}
}
-
-
-If you get docker login failed error
+```
+[*** If you get docker login failed error
sudo su
sudo usermod -aG docker jenkins
-sudo systemctl restart jenkins
-
-
-```
+sudo systemctl restart jenkins]
**Phase 4: Monitoring**
From 2dbd999917a7804620b0371856e2691bff32e0ea Mon Sep 17 00:00:00 2001
From: Akshiv Rajendran <55129768+Akshiv20@users.noreply.github.com>
Date: Sat, 13 Jan 2024 00:13:31 +0530
Subject: [PATCH 08/14] Update README.md
provided some space
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 589f50f05..c4dadc51f 100644
--- a/README.md
+++ b/README.md
@@ -347,7 +347,9 @@ pipeline{
[*** If you get docker login failed error
sudo su
+
sudo usermod -aG docker jenkins
+
sudo systemctl restart jenkins]
**Phase 4: Monitoring**
From ec47b754d1068d7a5173dce8113f920f544c6920 Mon Sep 17 00:00:00 2001
From: Akshiv Rajendran <55129768+Akshiv20@users.noreply.github.com>
Date: Sat, 13 Jan 2024 00:45:05 +0530
Subject: [PATCH 09/14] Update README.md
Remote square brackets from line 347
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index c4dadc51f..f6c95c70f 100644
--- a/README.md
+++ b/README.md
@@ -344,13 +344,13 @@ pipeline{
}
}
```
-[*** If you get docker login failed error
+*** If you get docker login failed error
sudo su
sudo usermod -aG docker jenkins
-sudo systemctl restart jenkins]
+sudo systemctl restart jenkins
**Phase 4: Monitoring**
From 471d99125257373d3c2990699882886cc5c729c6 Mon Sep 17 00:00:00 2001
From: Akshiv Rajendran <55129768+Akshiv20@users.noreply.github.com>
Date: Sat, 13 Jan 2024 01:09:36 +0530
Subject: [PATCH 10/14] Update README.md
line no: 390 & 469, changed the editor from nano to "vi"
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index f6c95c70f..2e065c97e 100644
--- a/README.md
+++ b/README.md
@@ -387,7 +387,7 @@ sudo systemctl restart jenkins
Create a systemd unit configuration file for Prometheus:
```bash
- sudo nano /etc/systemd/system/prometheus.service
+ sudo vi /etc/systemd/system/prometheus.service
```
Add the following content to the `prometheus.service` file:
@@ -466,7 +466,7 @@ sudo systemctl restart jenkins
Create a systemd unit configuration file for Node Exporter:
```bash
- sudo nano /etc/systemd/system/node_exporter.service
+ sudo vi /etc/systemd/system/node_exporter.service
```
Add the following content to the `node_exporter.service` file:
From 353435c26dabd32f154d6eb641e92f866e0cef7b Mon Sep 17 00:00:00 2001
From: Akshiv Rajendran <55129768+Akshiv20@users.noreply.github.com>
Date: Sat, 13 Jan 2024 02:50:17 +0530
Subject: [PATCH 11/14] Update README.md
line number 752, added for email notifcation
---
README.md | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 91 insertions(+)
diff --git a/README.md b/README.md
index 2e065c97e..7a72cb2db 100644
--- a/README.md
+++ b/README.md
@@ -671,6 +671,97 @@ That's it! You've successfully installed and set up Grafana to work with Prometh
1. **Implement Notification Services:**
- Set up email notifications in Jenkins or other notification mechanisms.
+
+```groovy
+
+pipeline{
+ agent any
+ tools{
+ jdk 'jdk17'
+ nodejs 'node16'
+ }
+ environment {
+ SCANNER_HOME=tool 'sonar-scanner'
+ }
+ stages {
+ stage('clean workspace'){
+ steps{
+ cleanWs()
+ }
+ }
+ stage('Checkout from Git'){
+ steps{
+ git branch: 'main', url: 'https://github.com/Akshiv20/DevSecOps-Project.git'
+ }
+ }
+ stage("Sonarqube Analysis "){
+ steps{
+ withSonarQubeEnv('sonar-server') {
+ sh ''' $SCANNER_HOME/bin/sonar-scanner -Dsonar.projectName=Netflix \
+ -Dsonar.projectKey=Netflix-beta '''
+ }
+ }
+ }
+ stage("quality gate"){
+ steps {
+ script {
+ waitForQualityGate abortPipeline: false, credentialsId: 'Sonar-token'
+ }
+ }
+ }
+ stage('Install Dependencies') {
+ steps {
+ sh "npm install"
+ }
+ }
+ stage('OWASP FS SCAN') {
+ steps {
+ dependencyCheck additionalArguments: '--scan ./ --disableYarnAudit --disableNodeAudit', odcInstallation: 'DP-Check'
+ dependencyCheckPublisher pattern: '**/dependency-check-report.xml'
+ }
+ }
+ stage('TRIVY FS SCAN') {
+ steps {
+ sh "trivy fs . > trivyfs.txt"
+ }
+ }
+ stage("Docker Build & Push"){
+ steps{
+ script{
+ withDockerRegistry(credentialsId: 'docker', toolName: 'docker'){
+ sh "docker build --build-arg TMDB_V3_API_KEY= -t netflix ."
+ sh "docker tag netflix akshiv/netflix:latest"
+ sh "docker push akshiv/netflix:latest"
+ }
+ }
+ }
+ }
+ stage("TRIVY"){
+ steps{
+ sh "trivy image akshiv/netflix:latest > trivyimage.txt"
+ }
+ }
+ stage('Deploy to container'){
+ steps{
+ sh 'docker run -d -p 8081:80 akshiv/netflix:latest'
+ }
+ }
+ }
+}
+
+ post {
+ always {
+ emailext attachLog: true,
+ subject: "'${currentBuild.result}'",
+ body: "Project: ${env.JOB_NAME}
" +
+ "Build Number: ${env.BUILD_NUMBER}
" +
+ "URL: ${env.BUILD_URL}
",
+ to: 'djaytupe@gmail.com',
+ attachmentsPattern: 'trivyfs.txt,trivyimage.txt'
+ }
+ }
+}
+```
# Phase 6: Kubernetes
From 3268577c64d84a91d906109a8c3b6a9e146625a5 Mon Sep 17 00:00:00 2001
From: Akshiv Rajendran <55129768+Akshiv20@users.noreply.github.com>
Date: Sat, 13 Jan 2024 02:50:56 +0530
Subject: [PATCH 12/14] Update README.md
changed the email address
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 7a72cb2db..8ed879dc9 100644
--- a/README.md
+++ b/README.md
@@ -756,7 +756,7 @@ pipeline{
body: "Project: ${env.JOB_NAME}
" +
"Build Number: ${env.BUILD_NUMBER}
" +
"URL: ${env.BUILD_URL}
",
- to: 'djaytupe@gmail.com',
+ to: 'abc@gmail.com',
attachmentsPattern: 'trivyfs.txt,trivyimage.txt'
}
}
From 0dfcf3e4cc5948d08a705082691ecb5fa6d93d4f Mon Sep 17 00:00:00 2001
From: Akshiv Rajendran <55129768+Akshiv20@users.noreply.github.com>
Date: Sat, 13 Jan 2024 03:08:08 +0530
Subject: [PATCH 13/14] Update README.md
unwanted ) on line no 763, removed it
---
README.md | 1 -
1 file changed, 1 deletion(-)
diff --git a/README.md b/README.md
index 8ed879dc9..f137151d8 100644
--- a/README.md
+++ b/README.md
@@ -760,7 +760,6 @@ pipeline{
attachmentsPattern: 'trivyfs.txt,trivyimage.txt'
}
}
-}
```
# Phase 6: Kubernetes
From 7f934a0d073271caf092646bc677942a12ee8516 Mon Sep 17 00:00:00 2001
From: Akshiv Rajendran
Date: Sun, 9 Aug 2026 11:24:47 +0530
Subject: [PATCH 14/14] Fix grammar in README for trivy usage
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index f137151d8..c9f1b4a0e 100644
--- a/README.md
+++ b/README.md
@@ -98,7 +98,7 @@ docker build --build-arg TMDB_V3_API_KEY= -t netflix .
sudo apt-get install trivy
```
- to scan image using trivy
+ to scan an image using trivy
```
trivy image
```