Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
6facc03
CICD guide
joakim077 Nov 11, 2024
4971f95
Update cicd.md
joakim077 Nov 11, 2024
769050a
incorporated suggestions from CodeRabbit
joakim077 Nov 12, 2024
a33a762
imroved docs
joakim077 Nov 17, 2024
ac83016
Merge pull request #2 from joakim077/DevOps
LondheShubham153 Nov 19, 2024
b5b2c7b
added k8s
LondheShubham153 Nov 19, 2024
e04841b
Added secrets and configmaps
LondheShubham153 Nov 19, 2024
bca1889
Create README.md
LondheShubham153 Nov 19, 2024
d51f97c
Update README.md
LondheShubham153 Nov 22, 2024
5ce21df
Merge branch 'DevOps' into DevOps
LondheShubham153 Nov 27, 2024
3b4cc09
Created helm chart
joakim077 Nov 28, 2024
80d1e82
Added Autoscaling HPA and VPA
joakim077 Nov 28, 2024
07d90f2
Update hpa_vpa.md
joakim077 Nov 28, 2024
56b2a47
Merge pull request #13 from joakim077/DevOps
LondheShubham153 Dec 7, 2024
21fb585
Create README.md
DevMadhup Dec 18, 2024
31436f9
Delete kubernetes directory
DevMadhup Dec 18, 2024
8fdab90
Create README-K8S.md
DevMadhup Dec 18, 2024
f8833a5
Create bankapp-deployment.yaml
DevMadhup Dec 19, 2024
6d1921c
Create bankapp-service.yaml
DevMadhup Dec 19, 2024
b6e2fca
Create bankapp-namespace.yaml
DevMadhup Dec 19, 2024
fc58e35
Create configmap.yaml
DevMadhup Dec 19, 2024
9bc856f
Create mysql-deployment.yaml
DevMadhup Dec 19, 2024
b5795d0
Create mysql-service.yaml
DevMadhup Dec 19, 2024
eebfc27
Create secrets.yaml
DevMadhup Dec 19, 2024
0cdfa03
Create ingress.yaml
DevMadhup Dec 19, 2024
2e43b74
Create Ingress.md
DevMadhup Dec 19, 2024
8f995fd
Create README.md
DevMadhup Dec 19, 2024
c5179d5
Update Jenkinsfile
DevMadhup Dec 19, 2024
15c9697
Update Jenkinsfile
DevMadhup Dec 19, 2024
7ee83b1
Create README.md
DevMadhup Dec 20, 2024
993b7c3
Create persistent-volume-claim.yaml
DevMadhup Dec 20, 2024
642b7c6
Create persistent-volume.yaml
DevMadhup Dec 20, 2024
85fa15e
Update mysql-deployment.yaml
DevMadhup Dec 20, 2024
fbcea8a
Update README.md
LondheShubham153 Dec 21, 2024
3d4357b
Added k8s manifests
Dec 21, 2024
78b6a39
Update README.md
LondheShubham153 Dec 21, 2024
90fa99a
Update README.md
LondheShubham153 Dec 21, 2024
17b0e8f
Added HPA
Dec 21, 2024
76b33cf
Delete SSL-Encryption directory
LondheShubham153 Dec 21, 2024
f066911
Delete k8s directory
LondheShubham153 Dec 21, 2024
cf86177
Update Jenkinsfile
LondheShubham153 Dec 21, 2024
a05dce0
Update Jenkinsfile
LondheShubham153 Dec 21, 2024
9c56836
Update bankapp-ingress.yml
LondheShubham153 Dec 22, 2024
40cbb6c
Update bankapp-deployment.yml
LondheShubham153 Dec 22, 2024
4e4274c
Update bankapp-hpa.yml
LondheShubham153 Dec 22, 2024
66c677d
Update bankapp-deployment.yml
LondheShubham153 Dec 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DUSER=joakim077
IMAGE=springboot-application
14 changes: 7 additions & 7 deletions GitOps/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pipeline {
stage('Git: Code Checkout') {
steps {
script{
code_checkout("https://github.com/DevMadhup/Springboot-BankApp.git","DevOps")
code_checkout("https://github.com/LondheShubham153/Springboot-BankApp.git","DevOps")
}
}
}
Expand All @@ -35,9 +35,9 @@ pipeline {
stage("Update: Kubernetes manifest"){
steps{
script{
dir('k8s'){
dir('kubernetes'){
sh """
sed -i -e s/springboot-bankapp.*/springboot-bankapp:${params.BACKEND_DOCKER_TAG}/g deployment.yml
sed -i -e 's|trainwithshubham/bankapp-eks:.*|trainwithshubham/bankapp-eks:${params.DOCKER_TAG}|g' bankapp-deployment.yaml
"""
}
}
Expand All @@ -59,7 +59,7 @@ pipeline {
git commit -m "Updated K8s Deployment Docker Image Version"

echo "Pushing changes to github: "
git push https://github.com/DevMadhup/Springboot-BankApp.git DevOps
git push https://github.com/LondheShubham153/Springboot-BankApp.git DevOps
'''
}
}
Expand All @@ -70,7 +70,7 @@ pipeline {
always {
script {
emailext attachLog: true,
from: '8007930568pandey@gmail.com',
from: 'trainwithshubham@gmail.com',
subject: "BankApp Application has been updated and deployed - '${currentBuild.result}'",
body: """
<html>
Expand All @@ -87,9 +87,9 @@ pipeline {
</body>
</html>
""",
to: '8007930568pandey@gmail.com',
to: 'trainwithshubham@gmail.com',
mimeType: 'text/html'
}
}
}
}
}
34 changes: 34 additions & 0 deletions Ingress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Nginx Ingress Controller

1) Apply the Required RBAC (Role-Based Access Control) and Service Account

- Create a service account for the NGINX Ingress Controller and assign it the necessary permissions.
```bash
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/cloud/deploy.yaml
```
This will create all the necessary resources for the NGINX Ingress Controller, including:
- Service accounts
- ClusterRoles and ClusterRoleBindings
- Deployments
- Services
- ConfigMaps
- Ingress Class
---

2) Verify Ingress Controller Installation
- After applying the YAML file, verify that the NGINX Ingress Controller is installed and running.
```bash
kubectl get pods -n ingress-nginx
```
This should show the ingress-nginx-controller pods running.

---

3) Expose the NGINX Ingress Controller (Optional)
- If you want to access the Ingress controller externally (e.g., via LoadBalancer), the ingress-nginx-controller service should be of type LoadBalancer.

To modify the service type, you can run:
```bash
kubectl patch svc ingress-nginx-controller -n ingress-nginx -p '{"spec": {"type": "LoadBalancer"}}'
```
This will expose the NGINX Ingress Controller via a LoadBalancer, allowing you to access your applications from outside the cluster.
10 changes: 5 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pipeline {
stage('Git: Code Checkout') {
steps {
script{
code_checkout("https://github.com/DevMadhup/Springboot-BankApp.git","DevOps")
code_checkout("https://github.com/LondheShubham153/Springboot-BankApp.git","DevOps")
}
}
}
Expand All @@ -47,7 +47,7 @@ pipeline {
stage("SonarQube: Code Analysis"){
steps{
script{
sonarqube_analysis("Sonar","BankApp","BankApp")
sonarqube_analysis("Sonar","bankapp","bankapp")
}
}
}
Expand All @@ -59,19 +59,19 @@ pipeline {
}
}
}

stage("Docker: Build Images"){
steps{
script{
docker_build("BankApp","${params.DOCKER_TAG}","madhupdevops")
docker_build("bankapp","${params.DOCKER_TAG}","madhupdevops")
}
}
}

stage("Docker: Push to DockerHub"){
steps{
script{
docker_push("BankApp","${params.DOCKER_TAG}","madhupdevops")
docker_push("bankapp","${params.DOCKER_TAG}","madhupdevops")
}
}
}
Expand Down
Loading