├── .gitignore
├── README.md
├── docker-compose.yml
├── extensions
├── azure-apim
│ ├── README.md
│ ├── images
│ │ ├── A-01.PNG
│ │ ├── A-02.PNG
│ │ ├── A-03.PNG
│ │ ├── A-04.PNG
│ │ ├── A-05.PNG
│ │ ├── B-01.PNG
│ │ ├── B-02.PNG
│ │ ├── C-01.PNG
│ │ ├── C-02.PNG
│ │ ├── C-03.PNG
│ │ ├── C-04.PNG
│ │ ├── C-05.PNG
│ │ ├── C-06.PNG
│ │ ├── D-01.PNG
│ │ ├── D-02.PNG
│ │ ├── D-03.PNG
│ │ ├── D-04.PNG
│ │ ├── D-05.PNG
│ │ ├── D-06.PNG
│ │ ├── D-07.PNG
│ │ ├── D-08.PNG
│ │ ├── D-09.PNG
│ │ ├── D-10.PNG
│ │ ├── D-11.PNG
│ │ ├── D-12.PNG
│ │ ├── D-13.PNG
│ │ ├── D-14.PNG
│ │ ├── D-15.PNG
│ │ ├── D-16.PNG
│ │ ├── D-17.PNG
│ │ ├── D-18.PNG
│ │ ├── D-19.PNG
│ │ ├── D-20.PNG
│ │ ├── D-21.PNG
│ │ ├── D-22.PNG
│ │ ├── D-23.PNG
│ │ ├── D-24.PNG
│ │ ├── D-25.PNG
│ │ ├── D-26.PNG
│ │ ├── D-27.PNG
│ │ ├── D-28.PNG
│ │ ├── D-29.PNG
│ │ ├── D-30.PNG
│ │ ├── D-31.PNG
│ │ ├── D-32.PNG
│ │ ├── D-33.PNG
│ │ ├── D-34.PNG
│ │ ├── D-35.PNG
│ │ ├── D-36.PNG
│ │ ├── azure-apim.jpg
│ │ └── azure-apim.xml
│ ├── k8s-resources
│ │ ├── internal-ingress.yaml
│ │ └── internal-lb.yaml
│ ├── po-service
│ │ ├── .helmignore
│ │ ├── Chart.yaml
│ │ ├── charts
│ │ │ └── mysql
│ │ │ │ ├── .helmignore
│ │ │ │ ├── Chart.yaml
│ │ │ │ ├── templates
│ │ │ │ ├── NOTES.txt
│ │ │ │ ├── _helpers.tpl
│ │ │ │ ├── deployment.yaml
│ │ │ │ ├── ingress.yaml
│ │ │ │ ├── secrets.yaml
│ │ │ │ └── service.yaml
│ │ │ │ └── values.yaml
│ │ ├── templates
│ │ │ ├── NOTES.txt
│ │ │ ├── _helpers.tpl
│ │ │ ├── configmap.yaml
│ │ │ ├── configmap_db.yaml
│ │ │ ├── deployment.yaml
│ │ │ ├── ingress.yaml
│ │ │ ├── secret.yaml
│ │ │ └── service.yaml
│ │ └── values.yaml
│ └── shell-scripts
│ │ ├── acr-auth.sh
│ │ └── post-orders.sh
├── jenkins-ci-cd
│ ├── .dockerignore
│ ├── Dockerfile
│ ├── Jenkinsfile
│ ├── README.md
│ ├── docker-compose.yml
│ ├── images
│ │ ├── A-01.PNG
│ │ ├── A-02.PNG
│ │ ├── A-03.PNG
│ │ ├── A-04.PNG
│ │ ├── A-05.PNG
│ │ ├── A-06.PNG
│ │ ├── A-07.PNG
│ │ ├── A-08.PNG
│ │ ├── A-09.PNG
│ │ ├── A-10.PNG
│ │ ├── A-11.PNG
│ │ ├── A-12.PNG
│ │ ├── A-13.PNG
│ │ ├── A-14.PNG
│ │ ├── A-15.PNG
│ │ ├── A-16.PNG
│ │ ├── A-17.PNG
│ │ ├── A-18.PNG
│ │ ├── A-19.PNG
│ │ ├── A-20.PNG
│ │ ├── A-21.PNG
│ │ ├── A-22.PNG
│ │ ├── A-23.PNG
│ │ ├── A-24.PNG
│ │ ├── B-01.PNG
│ │ ├── B-02.PNG
│ │ ├── B-03.PNG
│ │ ├── B-04.PNG
│ │ ├── B-05.PNG
│ │ ├── B-06.PNG
│ │ ├── B-07.PNG
│ │ ├── B-08.PNG
│ │ ├── B-09.PNG
│ │ ├── B-10.PNG
│ │ ├── B-11.PNG
│ │ ├── B-12.PNG
│ │ ├── B-13.PNG
│ │ ├── B-14.PNG
│ │ ├── B-15.PNG
│ │ ├── B-16.PNG
│ │ ├── B-17.PNG
│ │ └── Jenkins-cicd-workflow.jpg
│ ├── jenkins-chart
│ │ ├── .helmignore
│ │ ├── Chart.yaml
│ │ ├── templates
│ │ │ ├── NOTES.txt
│ │ │ ├── _helpers.tpl
│ │ │ ├── deployment.yaml
│ │ │ ├── ingress.yaml
│ │ │ └── service.yaml
│ │ └── values.yaml
│ └── plugins.txt
├── k8s-dash-deploy
│ ├── README.md
│ ├── images
│ │ ├── Az-01.PNG
│ │ ├── k8s-dash-deploy-01.PNG
│ │ ├── k8s-dash-deploy-02.PNG
│ │ ├── k8s-dash-deploy-021.PNG
│ │ ├── k8s-dash-deploy-03.PNG
│ │ ├── k8s-dash-deploy-04.PNG
│ │ ├── k8s-dash-deploy-041.PNG
│ │ ├── k8s-dash-deploy-042.PNG
│ │ ├── k8s-dash-deploy-05.PNG
│ │ ├── k8s-dash-deploy-06.PNG
│ │ ├── k8s-dash-deploy-07.PNG
│ │ ├── k8s-dash-deploy-08.PNG
│ │ ├── k8s-dash-deploy-09.PNG
│ │ ├── k8s-dash-deploy-10.PNG
│ │ ├── k8s-dash-deploy-11.PNG
│ │ ├── k8s-dash-deploy-12.PNG
│ │ ├── k8s-dash-deploy-13.PNG
│ │ ├── k8s-dash-deploy-14.PNG
│ │ ├── k8s-dash-deploy-15.PNG
│ │ ├── k8s-dash-deploy-16.PNG
│ │ ├── k8s-dash-deploy-17.PNG
│ │ ├── k8s-dash-deploy-18.PNG
│ │ ├── k8s-dash-deploy-19.PNG
│ │ ├── k8s-dash-deploy-20.PNG
│ │ ├── k8s-dash-deploy-21.PNG
│ │ ├── k8s-dash-deploy-22.PNG
│ │ ├── k8s-dash-deploy-23.PNG
│ │ ├── k8s-dash-deploy-24.PNG
│ │ └── k8s-dash-deploy-25.PNG
│ └── k8s-scripts
│ │ ├── acr-auth.sh
│ │ ├── app-config-map.yaml
│ │ ├── app-deployment.yaml
│ │ ├── app-mysql-secret.yaml
│ │ ├── app-service.yaml
│ │ ├── deploy-app-persistent.yaml
│ │ ├── deploy-app.yaml
│ │ ├── dev-namespace.json
│ │ ├── mysql-deployment.yaml
│ │ ├── mysql-secret.yaml
│ │ └── mysql-svc.yaml
└── po-deploy-azuredb-mysql
│ ├── README.md
│ ├── images
│ ├── B-01.PNG
│ ├── B-02.PNG
│ ├── D-01.PNG
│ ├── D-02.PNG
│ ├── D-03.PNG
│ ├── D-04.PNG
│ ├── D-05.PNG
│ ├── D-06.PNG
│ ├── D-07.PNG
│ ├── aks-osba-po-deploy.jpg
│ └── aks-osba-po-deploy.xml
│ ├── k8s-resources
│ ├── create-aci.yaml
│ ├── mysql-database-binding.yaml
│ ├── mysql-database-instance.yaml
│ ├── mysql-dbms-instance.yaml
│ ├── po-deployment.yaml
│ └── po-service.yaml
│ ├── po-service
│ ├── .helmignore
│ ├── Chart.yaml
│ ├── templates
│ │ ├── NOTES.txt
│ │ ├── _helpers.tpl
│ │ ├── deployment.yaml
│ │ ├── ingress.yaml
│ │ └── service.yaml
│ └── values.yaml
│ └── shell-scripts
│ ├── create-aci.sh
│ ├── create-sp-sub.sh
│ └── delete-aci.sh
├── images
├── A-01.png
├── A-02.PNG
├── A-03.PNG
├── A-05.PNG
├── A-06.PNG
├── A-07.PNG
├── A-08.PNG
├── A-09.PNG
├── A-10.PNG
├── A-11.PNG
├── A-12.PNG
├── A-14.PNG
├── A-15.PNG
├── A-17.PNG
├── A-18.PNG
├── A-19.PNG
├── A-20.PNG
├── A-21.PNG
├── A-81.PNG
├── A-82.PNG
├── B-01.png
├── B-02.png
├── C-01.png
├── C-02.png
├── D-01.PNG
├── D-02.png
├── D-03.png
├── D-04.png
├── E-01.png
├── E-02.PNG
├── E-03.PNG
├── E-04.PNG
├── E-05.PNG
├── E-051.PNG
├── E-06.PNG
├── E-07.PNG
├── E-071.PNG
├── E-08.PNG
├── E-09.PNG
├── E-10.PNG
├── E-11.PNG
├── E-12.PNG
├── E-13.PNG
├── E-14.PNG
├── E-16.PNG
├── E-17.PNG
├── E-18.PNG
├── E-19.PNG
├── SB-VSTS-AKS.jpg
├── SB-VSTS-AKS_v2.jpg
├── SB-VSTS-AKS_v2.xml
├── Steps.jpg
├── k8s-springboot-data-rest.png
└── k8s-springboot-data-rest.xml
├── k8s-scripts
├── app-deploy-pull-secrets.yaml
├── app-deploy.yaml
├── app-deploy_v1.8.yaml
├── app-update-deploy.yaml
├── dev-namespace.json
├── mysql-deploy.yaml
├── mysql-deploy_v1.8.yaml
└── mysqldb.properties
├── pom.xml
├── shell-scripts
├── acr-auth.sh
├── jenkins-acr-auth.sh
└── setup-bastion.sh
├── src
├── Dockerfile
└── main
│ ├── java
│ └── ocp
│ │ └── s2i
│ │ └── springboot
│ │ └── rest
│ │ ├── Application.java
│ │ ├── config
│ │ └── PropertiesConfiguration.java
│ │ └── model
│ │ ├── PORepository.java
│ │ └── PurchaseOrder.java
│ └── resources
│ ├── application.properties
│ ├── data.sql
│ └── schema.sql
└── test-scripts
├── delete-order.sh
├── get-order.sh
├── get-orders.sh
├── post-order.sh
├── search-by-item.sh
└── update-order.sh
/.gitignore:
--------------------------------------------------------------------------------
1 | *.jar
2 | *.war
3 | target/
4 | pom.xml.h2
5 |
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '2'
2 | services:
3 | api:
4 | image: po-service
5 | build:
6 | context: .
7 | dockerfile: ./src/Dockerfile
8 | ports:
9 | - "8080"
10 | environment:
11 | - APP_OPTIONS=
12 |
--------------------------------------------------------------------------------
/extensions/azure-apim/images/A-01.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/A-01.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/A-02.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/A-02.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/A-03.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/A-03.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/A-04.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/A-04.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/A-05.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/A-05.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/B-01.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/B-01.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/B-02.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/B-02.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/C-01.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/C-01.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/C-02.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/C-02.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/C-03.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/C-03.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/C-04.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/C-04.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/C-05.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/C-05.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/C-06.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/C-06.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-01.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-01.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-02.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-02.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-03.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-03.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-04.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-04.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-05.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-05.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-06.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-06.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-07.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-07.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-08.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-08.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-09.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-09.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-10.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-10.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-11.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-11.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-12.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-12.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-13.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-13.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-14.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-14.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-15.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-15.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-16.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-16.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-17.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-17.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-18.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-18.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-19.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-19.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-20.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-20.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-21.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-21.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-22.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-22.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-23.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-23.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-24.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-24.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-25.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-25.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-26.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-26.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-27.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-27.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-28.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-28.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-29.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-29.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-30.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-30.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-31.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-31.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-32.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-32.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-33.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-33.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-34.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-34.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-35.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-35.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/D-36.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/D-36.PNG
--------------------------------------------------------------------------------
/extensions/azure-apim/images/azure-apim.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/azure-apim/images/azure-apim.jpg
--------------------------------------------------------------------------------
/extensions/azure-apim/images/azure-apim.xml:
--------------------------------------------------------------------------------
1 | 7L3X0ttIljX6NB1xzsV0wJtLeBCOAEHC3XTAAyS8JfD0J5OSqkslzen6Y1QTY351U/oIgEDmNmuvtTP51d9woX0rUzxUZp/lzd8wJHv/DRf/hmEoQpHgH3jk+HaEpb8cKac6+3rsnwfc+sy/Xfj16Fpn+fzdhUvfN0s9fH8w7bsuT5fvjsXT1O/fX1b0zfdPHeIy/+GAm8bNj0f9OluqL0cZEvnncTWvy+rbk1Hk65kkTl/l1K/d1+f9DcOLz58vp9v4272+Xj9XcdbvvzuES3/Dhanvly8/tW8hb6Bxv5nty+fkf+fsb+Oe8m75Ux8gvnxii5s1/zbkz8CW45sxPtPJ4QfQv+H8XtVL7g5xCs/uwP/gWLW0zdfTWTxXv13742i+DnDLpyV//+7Q19Eped/my3SAS76exb9Z6mso4d9CZP+nX3Di622r3/uE+nph/DUWyt/u/U97gB++muTn5mF/sXWKummEvumnz2fxLM6ZIgXH52XqX/nvzlApkycFOFNOcVYD8/3uHJ3HVI789qlvAYr9GoMz39sbxX+0N/0t2n9vb4L8BfbG/spo/KPxyZzJiJ8Zn8ESnKL+KgP/ZtFvFiZ/tDD1MwvjzC+wMP2faGEAe1j60/DOqIQi/zoL/yGGMeJHC5PoTyyM/ZIYJv9a0Mg/f35mVZzCWTz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v9I9F/f7Pq7t/SrB+4yDOuH2zfb7r1KzV/AG78m1vDfogefwG3/uVv//C+sW+uG8Oxb8j4J9eNffccivyLB/3t61a3nAIuxfi6HEyB3jxiWPE/
--------------------------------------------------------------------------------
/extensions/azure-apim/k8s-resources/internal-ingress.yaml:
--------------------------------------------------------------------------------
1 | controller:
2 | service:
3 | annotations:
4 | service.beta.kubernetes.io/azure-load-balancer-internal: "true"
5 | rbac:
6 | create: false
7 |
8 | serviceAccount:
9 | create: false
10 |
--------------------------------------------------------------------------------
/extensions/azure-apim/k8s-resources/internal-lb.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: internal-lb
5 | namespace: kube-system
6 | annotations:
7 | service.beta.kubernetes.io/azure-load-balancer-internal: "true"
8 | spec:
9 | type: LoadBalancer
10 | ports:
11 | - port: 80
12 | selector:
13 | app: internal-lb
14 |
--------------------------------------------------------------------------------
/extensions/azure-apim/po-service/.helmignore:
--------------------------------------------------------------------------------
1 | # Patterns to ignore when building packages.
2 | # This supports shell glob matching, relative path matching, and
3 | # negation (prefixed with !). Only one pattern per line.
4 | .DS_Store
5 | # Common VCS dirs
6 | .git/
7 | .gitignore
8 | .bzr/
9 | .bzrignore
10 | .hg/
11 | .hgignore
12 | .svn/
13 | # Common backup files
14 | *.swp
15 | *.bak
16 | *.tmp
17 | *~
18 | # Various IDEs
19 | .project
20 | .idea/
21 | *.tmproj
22 |
--------------------------------------------------------------------------------
/extensions/azure-apim/po-service/Chart.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | appVersion: "1.0"
3 | description: A Helm chart for Kubernetes
4 | name: po-service
5 | version: 0.1.0
6 |
--------------------------------------------------------------------------------
/extensions/azure-apim/po-service/charts/mysql/.helmignore:
--------------------------------------------------------------------------------
1 | # Patterns to ignore when building packages.
2 | # This supports shell glob matching, relative path matching, and
3 | # negation (prefixed with !). Only one pattern per line.
4 | .DS_Store
5 | # Common VCS dirs
6 | .git/
7 | .gitignore
8 | .bzr/
9 | .bzrignore
10 | .hg/
11 | .hgignore
12 | .svn/
13 | # Common backup files
14 | *.swp
15 | *.bak
16 | *.tmp
17 | *~
18 | # Various IDEs
19 | .project
20 | .idea/
21 | *.tmproj
22 |
--------------------------------------------------------------------------------
/extensions/azure-apim/po-service/charts/mysql/Chart.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | appVersion: "1.0"
3 | description: A Helm chart for deploying mysqldb on AKS
4 | name: mysql
5 | version: 0.1.0
6 |
--------------------------------------------------------------------------------
/extensions/azure-apim/po-service/charts/mysql/templates/NOTES.txt:
--------------------------------------------------------------------------------
1 | 1. Get the application URL by running these commands:
2 | {{- if .Values.ingress.enabled }}
3 | {{- range .Values.ingress.hosts }}
4 | http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
5 | {{- end }}
6 | {{- else if contains "NodePort" .Values.service.type }}
7 | export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "mysql.fullname" . }})
8 | export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
9 | echo http://$NODE_IP:$NODE_PORT
10 | {{- else if contains "LoadBalancer" .Values.service.type }}
11 | NOTE: It may take a few minutes for the LoadBalancer IP to be available.
12 | You can watch the status of by running 'kubectl get svc -w {{ template "mysql.fullname" . }}'
13 | export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "mysql.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
14 | echo http://$SERVICE_IP:{{ .Values.service.port }}
15 | {{- else if contains "ClusterIP" .Values.service.type }}
16 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "mysql.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
17 | echo "Visit http://127.0.0.1:8080 to use your application"
18 | kubectl port-forward $POD_NAME 8080:80
19 | {{- end }}
20 |
--------------------------------------------------------------------------------
/extensions/azure-apim/po-service/charts/mysql/templates/_helpers.tpl:
--------------------------------------------------------------------------------
1 | {{/* vim: set filetype=mustache: */}}
2 | {{/*
3 | Expand the name of the chart.
4 | */}}
5 | {{- define "mysql.name" -}}
6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7 | {{- end -}}
8 |
9 | {{/*
10 | Create a default fully qualified app name.
11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12 | If release name contains chart name it will be used as a full name.
13 | */}}
14 | {{- define "mysql.fullname" -}}
15 | {{- if .Values.fullnameOverride -}}
16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
17 | {{- else -}}
18 | {{- $name := default .Chart.Name .Values.nameOverride -}}
19 | {{- if contains $name .Release.Name -}}
20 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}}
21 | {{- else -}}
22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
23 | {{- end -}}
24 | {{- end -}}
25 | {{- end -}}
26 |
27 | {{/*
28 | Create chart name and version as used by the chart label.
29 | */}}
30 | {{- define "mysql.chart" -}}
31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
32 | {{- end -}}
33 |
--------------------------------------------------------------------------------
/extensions/azure-apim/po-service/charts/mysql/templates/deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: Deployment
3 | metadata:
4 | name: {{ template "mysql.fullname" . }}
5 | labels:
6 | app: {{ template "mysql.name" . }}
7 | chart: {{ template "mysql.chart" . }}
8 | release: {{ .Release.Name }}
9 | heritage: {{ .Release.Service }}
10 | spec:
11 | replicas: {{ .Values.replicaCount }}
12 | selector:
13 | matchLabels:
14 | app: {{ template "mysql.name" . }}
15 | release: {{ .Release.Name }}
16 | template:
17 | metadata:
18 | labels:
19 | app: {{ template "mysql.name" . }}
20 | release: {{ .Release.Name }}
21 | spec:
22 | containers:
23 | - name: {{ .Chart.Name }}
24 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
25 | imagePullPolicy: {{ .Values.image.pullPolicy }}
26 | ports:
27 | - name: mysql
28 | containerPort: {{ .Values.service.targetPort }}
29 | protocol: TCP
30 | env:
31 | - name: MYSQL_USER
32 | valueFrom:
33 | secretKeyRef:
34 | name: mysql
35 | key: database-user
36 | - name: MYSQL_PASSWORD
37 | valueFrom:
38 | secretKeyRef:
39 | name: mysql
40 | key: database-password
41 | - name: MYSQL_ROOT_PASSWORD
42 | valueFrom:
43 | secretKeyRef:
44 | name: mysql
45 | key: database-root-password
46 | - name: MYSQL_DATABASE
47 | valueFrom:
48 | secretKeyRef:
49 | name: mysql
50 | key: database-name
51 | resources:
52 | {{ toYaml .Values.resources | indent 12 }}
53 | {{- with .Values.nodeSelector }}
54 | nodeSelector:
55 | {{ toYaml . | indent 8 }}
56 | {{- end }}
57 | {{- with .Values.affinity }}
58 | affinity:
59 | {{ toYaml . | indent 8 }}
60 | {{- end }}
61 | {{- with .Values.tolerations }}
62 | tolerations:
63 | {{ toYaml . | indent 8 }}
64 | {{- end }}
65 |
--------------------------------------------------------------------------------
/extensions/azure-apim/po-service/charts/mysql/templates/ingress.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.ingress.enabled -}}
2 | {{- $fullName := include "mysql.fullname" . -}}
3 | {{- $ingressPath := .Values.ingress.path -}}
4 | apiVersion: extensions/v1beta1
5 | kind: Ingress
6 | metadata:
7 | name: {{ $fullName }}
8 | labels:
9 | app: {{ template "mysql.name" . }}
10 | chart: {{ template "mysql.chart" . }}
11 | release: {{ .Release.Name }}
12 | heritage: {{ .Release.Service }}
13 | {{- with .Values.ingress.annotations }}
14 | annotations:
15 | {{ toYaml . | indent 4 }}
16 | {{- end }}
17 | spec:
18 | {{- if .Values.ingress.tls }}
19 | tls:
20 | {{- range .Values.ingress.tls }}
21 | - hosts:
22 | {{- range .hosts }}
23 | - {{ . }}
24 | {{- end }}
25 | secretName: {{ .secretName }}
26 | {{- end }}
27 | {{- end }}
28 | rules:
29 | {{- range .Values.ingress.hosts }}
30 | - host: {{ . }}
31 | http:
32 | paths:
33 | - path: {{ $ingressPath }}
34 | backend:
35 | serviceName: {{ $fullName }}
36 | servicePort: http
37 | {{- end }}
38 | {{- end }}
39 |
--------------------------------------------------------------------------------
/extensions/azure-apim/po-service/charts/mysql/templates/secrets.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Secret
3 | metadata:
4 | name: mysql
5 | type: Opaque
6 | data:
7 | database-name: c2FtcGxlZGI=
8 | database-password: cGFzc3dvcmQ=
9 | database-root-password: cGFzc3dvcmQ=
10 | database-user: bXlzcWw=
11 |
--------------------------------------------------------------------------------
/extensions/azure-apim/po-service/charts/mysql/templates/service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: {{ template "mysql.fullname" . }}
5 | labels:
6 | app: {{ template "mysql.name" . }}
7 | chart: {{ template "mysql.chart" . }}
8 | release: {{ .Release.Name }}
9 | heritage: {{ .Release.Service }}
10 | spec:
11 | type: {{ .Values.service.type }}
12 | ports:
13 | - port: {{ .Values.service.port }}
14 | targetPort: {{ .Values.service.targetPort }}
15 | protocol: TCP
16 | name: mysql
17 | selector:
18 | app: {{ template "mysql.name" . }}
19 | release: {{ .Release.Name }}
20 |
--------------------------------------------------------------------------------
/extensions/azure-apim/po-service/charts/mysql/values.yaml:
--------------------------------------------------------------------------------
1 | # Default values for mysqldb.
2 | # This is a YAML-formatted file.
3 | # Declare variables to be passed into your templates.
4 |
5 | replicaCount: 1
6 |
7 | image:
8 | repository: mysql/mysql-server
9 | tag: 5.7.22
10 | pullPolicy: IfNotPresent
11 |
12 | service:
13 | type: ClusterIP
14 | port: 3306
15 | targetPort: 3306
16 |
17 | ingress:
18 | enabled: false
19 | annotations: {}
20 | # kubernetes.io/ingress.class: nginx
21 | # kubernetes.io/tls-acme: "true"
22 | path: /
23 | hosts:
24 | - 10.0.0.35
25 | tls: []
26 | # - secretName: chart-example-tls
27 | # hosts:
28 | # - chart-example.local
29 |
30 | resources: {}
31 | # We usually recommend not to specify default resources and to leave this as a conscious
32 | # choice for the user. This also increases chances charts run on environments with little
33 | # resources, such as Minikube. If you do want to specify resources, uncomment the following
34 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
35 | # limits:
36 | # cpu: 100m
37 | # memory: 128Mi
38 | # requests:
39 | # cpu: 100m
40 | # memory: 128Mi
41 |
42 | nodeSelector: {}
43 |
44 | tolerations: []
45 |
46 | affinity: {}
47 |
--------------------------------------------------------------------------------
/extensions/azure-apim/po-service/templates/NOTES.txt:
--------------------------------------------------------------------------------
1 | 1. Get the application URL by running these commands:
2 | {{- if .Values.ingress.enabled }}
3 | {{- range .Values.ingress.hosts }}
4 | http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
5 | {{- end }}
6 | {{- else if contains "NodePort" .Values.service.type }}
7 | export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "po-service.fullname" . }})
8 | export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
9 | echo http://$NODE_IP:$NODE_PORT
10 | {{- else if contains "LoadBalancer" .Values.service.type }}
11 | NOTE: It may take a few minutes for the LoadBalancer IP to be available.
12 | You can watch the status of by running 'kubectl get svc -w {{ template "po-service.fullname" . }}'
13 | export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "po-service.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
14 | echo http://$SERVICE_IP:{{ .Values.service.port }}
15 | {{- else if contains "ClusterIP" .Values.service.type }}
16 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "po-service.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
17 | echo "Visit http://127.0.0.1:8080 to use your application"
18 | kubectl port-forward $POD_NAME 8080:80
19 | {{- end }}
20 |
--------------------------------------------------------------------------------
/extensions/azure-apim/po-service/templates/_helpers.tpl:
--------------------------------------------------------------------------------
1 | {{/* vim: set filetype=mustache: */}}
2 | {{/*
3 | Expand the name of the chart.
4 | */}}
5 | {{- define "po-service.name" -}}
6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7 | {{- end -}}
8 |
9 | {{/*
10 | Create a default fully qualified app name.
11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12 | If release name contains chart name it will be used as a full name.
13 | */}}
14 | {{- define "po-service.fullname" -}}
15 | {{- if .Values.fullnameOverride -}}
16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
17 | {{- else -}}
18 | {{- $name := default .Chart.Name .Values.nameOverride -}}
19 | {{- if contains $name .Release.Name -}}
20 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}}
21 | {{- else -}}
22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
23 | {{- end -}}
24 | {{- end -}}
25 | {{- end -}}
26 |
27 | {{/*
28 | Create chart name and version as used by the chart label.
29 | */}}
30 | {{- define "po-service.chart" -}}
31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
32 | {{- end -}}
33 |
--------------------------------------------------------------------------------
/extensions/azure-apim/po-service/templates/configmap.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ConfigMap
3 | metadata:
4 | name: mysql-db-name
5 | data:
6 | mysqldb.properties: |
7 | mysql.dbname=sampledb
8 |
--------------------------------------------------------------------------------
/extensions/azure-apim/po-service/templates/configmap_db.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ConfigMap
3 | metadata:
4 | name: mysql-database
5 | data:
6 | mysql.dbname: sampledb
7 |
--------------------------------------------------------------------------------
/extensions/azure-apim/po-service/templates/deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: Deployment
3 | metadata:
4 | name: {{ template "po-service.fullname" . }}
5 | labels:
6 | app: {{ template "po-service.name" . }}
7 | chart: {{ template "po-service.chart" . }}
8 | release: {{ .Release.Name }}
9 | heritage: {{ .Release.Service }}
10 | spec:
11 | replicas: {{ .Values.replicaCount }}
12 | selector:
13 | matchLabels:
14 | app: {{ template "po-service.name" . }}
15 | release: {{ .Release.Name }}
16 | template:
17 | metadata:
18 | labels:
19 | app: {{ template "po-service.name" . }}
20 | release: {{ .Release.Name }}
21 | spec:
22 | volumes:
23 | - name: mysqlcm
24 | configMap:
25 | name: mysql-db-name
26 | - name: mysqlse
27 | secret:
28 | secretName: mysql-secret
29 | containers:
30 | - name: {{ .Chart.Name }}
31 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
32 | imagePullPolicy: {{ .Values.image.pullPolicy }}
33 | ports:
34 | - name: http
35 | containerPort: {{ .Values.service.targetPort }}
36 | protocol: TCP
37 | volumeMounts:
38 | - name: mysqlcm
39 | mountPath: /etc/config
40 | - name: mysqlse
41 | mountPath: /etc/vol-secrets
42 | env:
43 | - name: DB_NAME
44 | valueFrom:
45 | configMapKeyRef:
46 | name: mysql-database
47 | key: mysql.dbname
48 | - name: SPRING_DATASOURCE_URL
49 | value: "jdbc:mysql://{{ .Release.Name }}-mysql.development.svc.cluster.local:{{ .Values.global.mysqlPort }}/$(DB_NAME)"
50 | resources:
51 | {{ toYaml .Values.resources | indent 12 }}
52 | {{- with .Values.nodeSelector }}
53 | nodeSelector:
54 | {{ toYaml . | indent 8 }}
55 | {{- end }}
56 | {{- with .Values.affinity }}
57 | affinity:
58 | {{ toYaml . | indent 8 }}
59 | {{- end }}
60 | {{- with .Values.tolerations }}
61 | tolerations:
62 | {{ toYaml . | indent 8 }}
63 | {{- end }}
64 |
--------------------------------------------------------------------------------
/extensions/azure-apim/po-service/templates/ingress.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.ingress.enabled -}}
2 | {{- $fullName := include "po-service.fullname" . -}}
3 | {{- $ingressPath := .Values.ingress.path -}}
4 | apiVersion: extensions/v1beta1
5 | kind: Ingress
6 | metadata:
7 | name: {{ $fullName }}
8 | labels:
9 | app: {{ template "po-service.name" . }}
10 | chart: {{ template "po-service.chart" . }}
11 | release: {{ .Release.Name }}
12 | heritage: {{ .Release.Service }}
13 | {{- with .Values.ingress.annotations }}
14 | annotations:
15 | {{ toYaml . | indent 4 }}
16 | {{- end }}
17 | spec:
18 | {{- if .Values.ingress.tls }}
19 | tls:
20 | {{- range .Values.ingress.tls }}
21 | - hosts:
22 | {{- range .hosts }}
23 | - {{ . }}
24 | {{- end }}
25 | secretName: {{ .secretName }}
26 | {{- end }}
27 | {{- end }}
28 | rules:
29 | - http:
30 | paths:
31 | - path: {{ $ingressPath }}
32 | backend:
33 | serviceName: {{ $fullName }}
34 | servicePort: http
35 | {{- end }}
36 |
--------------------------------------------------------------------------------
/extensions/azure-apim/po-service/templates/secret.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Secret
3 | metadata:
4 | name: mysql-secret
5 | type: Opaque
6 | data:
7 | username.properties: bXlzcWwudXNlcj1teXNxbAo=
8 | password.properties: bXlzcWwucGFzc3dvcmQ9cGFzc3dvcmQK
9 |
--------------------------------------------------------------------------------
/extensions/azure-apim/po-service/templates/service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: {{ template "po-service.fullname" . }}
5 | labels:
6 | app: {{ template "po-service.name" . }}
7 | chart: {{ template "po-service.chart" . }}
8 | release: {{ .Release.Name }}
9 | heritage: {{ .Release.Service }}
10 | spec:
11 | type: {{ .Values.service.type }}
12 | ports:
13 | - port: {{ .Values.service.port }}
14 | targetPort: {{ .Values.service.targetPort }}
15 | protocol: TCP
16 | name: http
17 | selector:
18 | app: {{ template "po-service.name" . }}
19 | release: {{ .Release.Name }}
20 |
--------------------------------------------------------------------------------
/extensions/azure-apim/po-service/values.yaml:
--------------------------------------------------------------------------------
1 | # Default values for po-service.
2 | # This is a YAML-formatted file.
3 | # Declare variables to be passed into your templates.
4 |
5 | replicaCount: 1
6 |
7 | image:
8 | repository: mtcslabtest.azurecr.io/po-service
9 | tag: latest
10 | pullPolicy: Always
11 |
12 | service:
13 | type: ClusterIP
14 | port: 80
15 | targetPort: 8080
16 |
17 | ingress:
18 | enabled: true
19 | annotations:
20 | kubernetes.io/ingress.class: nginx
21 | nginx.ingress.kubernetes.io/ssl-redirect: "false"
22 | nginx.ingress.kubernetes.io/rewrite-target: /
23 | # kubernetes.io/tls-acme: "true"
24 | path: /bcc
25 | hosts: []
26 | tls: []
27 | # - secretName: chart-example-tls
28 | # hosts:
29 | # - chart-example.local
30 |
31 | resources: {}
32 | # We usually recommend not to specify default resources and to leave this as a conscious
33 | # choice for the user. This also increases chances charts run on environments with little
34 | # resources, such as Minikube. If you do want to specify resources, uncomment the following
35 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
36 | # limits:
37 | # cpu: 100m
38 | # memory: 128Mi
39 | # requests:
40 | # cpu: 100m
41 | # memory: 128Mi
42 |
43 | nodeSelector: {}
44 |
45 | tolerations: []
46 |
47 | affinity: {}
48 |
49 | global:
50 | mysqlPort: 3306
51 |
--------------------------------------------------------------------------------
/extensions/azure-apim/shell-scripts/acr-auth.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Before running this script, specify correct values for the following 4 variables !!!!
4 | AKS_RESOURCE_GROUP=mtcs-dev-grts-rg
5 | AKS_CLUSTER_NAME=aks-cluster-apim
6 | ACR_RESOURCE_GROUP=myResourceGroup
7 | ACR_NAME=mtcslabtest
8 |
9 | # Get the id of the service principal configured for AKS
10 | CLIENT_ID=$(az aks show --resource-group $AKS_RESOURCE_GROUP --name $AKS_CLUSTER_NAME --query "servicePrincipalProfile.clientId" --output tsv)
11 |
12 | # Get the ACR registry resource id
13 | ACR_ID=$(az acr show --name $ACR_NAME --resource-group $ACR_RESOURCE_GROUP --query "id" --output tsv)
14 |
15 | # Create role assignment
16 | az role assignment create --assignee $CLIENT_ID --role Reader --scope $ACR_ID
17 |
18 | echo "CLIENT_ID_SP: $CLIENT_ID"
19 | echo "ACR_ID: $ACR_ID"
20 |
--------------------------------------------------------------------------------
/extensions/azure-apim/shell-scripts/post-orders.sh:
--------------------------------------------------------------------------------
1 | i=1
2 | while [ $i -le 100 ]
3 | do
4 | curl -k -i -X POST -H "Content-Type:application/json" -H "Ocp-Apim-Trace:true" -H "Ocp-Apim-Subscription-Key:ababxxxyyyyzzzz" -d "{ \"item\" : \"Colombia\", \"price\" : 28.75, \"quantity\" : 80, \"description\" : \"Medium Roast Ethiopian\", \"cname\" : \"Acme Corporation\", \"dcode\" : \"8%\", \"origin\" : \"SAP\"}" https://xyz.azure-api.net/bcc/orders
5 | i=$[$i+1]
6 | echo "-----------------------------------------------"
7 | # sleep 1
8 | done
9 |
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/.dockerignore:
--------------------------------------------------------------------------------
1 | jenkins_home
2 |
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/Dockerfile:
--------------------------------------------------------------------------------
1 | # Build custom Jenkins Image with Git, Pipeline, Maven, Build Timestamp & other plugins. Image also includes Docker client and Kube CLI.
2 | # Dated: 09-27-2018
3 | # Author: Ganesh Radhakrishnan
4 | # Image name: jenkins-gr
5 | FROM jenkins/jenkins:lts
6 | MAINTAINER Ganesh Radhakrishnan ganrad01@gmail.com
7 |
8 | # Install Jenkins plugins
9 | RUN echo "Installing Jenkins Plugins ..."
10 | COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
11 | RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt
12 |
13 | USER root
14 |
15 | # Install docker client
16 | RUN echo "Installing Docker-ce ..." && \
17 | apt-get update && \
18 | apt-get -y install apt-transport-https \
19 | ca-certificates \
20 | curl \
21 | gnupg2 \
22 | software-properties-common && \
23 | curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg > /tmp/dkey; apt-key add /tmp/dkey && \
24 | add-apt-repository \
25 | "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
26 | $(lsb_release -cs) \
27 | stable" && \
28 | apt-get update && \
29 | apt-get -y install docker-ce
30 |
31 | # Install kubectl CLI
32 | RUN echo "Installing Kubectl ..." \
33 | && curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - \
34 | && touch /etc/apt/sources.list.d/kubernetes.list \
35 | && echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list \
36 | && apt-get update \
37 | && apt-get install -y kubectl
38 |
39 | # Add jenkins user to docker group
40 | RUN usermod -aG docker jenkins
41 |
42 | USER jenkins
43 |
44 |
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/Jenkinsfile:
--------------------------------------------------------------------------------
1 | /*
2 | Author: garadha@microsoft.com
3 | Dated: 09-23-2018
4 | Description:
5 | This pipeline defines the stages and steps for building and deploying the 'po-service' application
6 | to AKS.
7 | Before running a build, make sure the following pre-requisites are satisfied.
8 | 1. Make sure 'Build Timestamp' Jenkins Plug-in is installed
9 | 2. Define environment variable - ACR_LOGINSERVER
10 | 3. Define a credential with Jenkins provider - acr-credentials
11 | 4. Define a k8s KubeConfig credential with Plain Credentials provider - k8s-credentials
12 | 5. Specify the correct MVN repository mount location (host path) for the Maven container
13 | */
14 | node {
15 | def app
16 |
17 | stage('Clone repository') {
18 | sh 'echo "Cloning GitHub repository ..."'
19 | checkout scm
20 | }
21 |
22 | stage('Update MySQL SVC and Namespace') {
23 | sh 'echo "Updating MySQL co-ordinates ..."'
24 | sh 'sed -i "s/__svc.name.k8s.namespace__/mysql.development/g" ./src/main/resources/application.properties'
25 | }
26 |
27 | docker.image('maven:3-alpine').inside('-v $HOME/.m2:/root/.m2') {
28 | stage('Build po-service Application') {
29 | sh 'echo "Building application ..."'
30 | sh 'mvn -DskipTests clean package'
31 | }
32 | }
33 |
34 | /* stage('Print Data ... ') {
35 | sh 'echo "Present working directory ..."'
36 | sh 'pwd'
37 | } */
38 |
39 | stage('Build Application Container Image') {
40 | sh 'echo "Building application container image ..."'
41 | app = docker.build("po-service:${env.BUILD_TIMESTAMP}.${env.BUILD_ID}",". -f ./src/Dockerfile")
42 | // Don't need to tag image. 'docker.withRegistry' does it automatically!
43 | // sh "docker tag po-service:${env.Build_TIMESTAMP}.${env.BUILD_ID} ${env.ACR_LOGINSERVER}/po-service:${env.BUILD_TIMESTAMP}.${env.BUILD_ID}"
44 | }
45 |
46 | stage('Push Container Image To ACR') {
47 | sh 'echo "Pushing container image to ACR ..."'
48 | docker.withRegistry("https://${env.ACR_LOGINSERVER}",'acr-credentials') {
49 | app.push()
50 | app.push("latest")
51 | }
52 | }
53 |
54 | stage('Re-deploy Application Container to AKS') {
55 | sh 'echo "Using Kubectl to upgrade application (redeploy) on AKS"'
56 | withKubeConfig(
57 | caCertificate: '',
58 | contextName: 'dev',
59 | credentialsId: 'aks-credentials',
60 | serverUrl: 'https://akscluster-cicd-9974af20.hcp.westus.azmk8s.io:443') {
61 | sh "kubectl set image deployment/po-service po-service=${env.ACR_LOGINSERVER}/po-service:${env.BUILD_TIMESTAMP}.${env.BUILD_ID}"
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/README.md:
--------------------------------------------------------------------------------
1 | ## Use Azure DevOps to deploy Jenkins CI/CD on AKS and implement a Jenkins *Continuous Delivery* pipeline
2 |
3 | **Prerequisites:**
4 | 1. Before working on the hands-on labs in this project, readers are required to complete all hands-on labs (Sections) in the [parent project](https://github.com/ganrad/k8s-springboot-data-rest). In case you have come to this project directly, go back and finish the lab exercises in the parent project.
5 | 2. Readers are required to be familiar with basic Linux commands. Experience working in Linux environments will definitely be helpful.
6 | 3. In this hands-on lab, readers will be working with two of the commonly used and popular **DevOps** tools - *Azure DevOps (VSTS)* and *Jenkins*. Hence readers are assumed to have some level of exposure to these tools.
7 |
8 | **Description:**
9 |
10 | In a nutshell, you will work on the following tasks.
11 | 1. Implement a *Azure DevOps Build and Release Pipeline* to deploy Jenkins CI/CD on AKS (Section [A])
12 |
13 | **Result:** A Jenkins CI/CD cluster (1-executor) deployed on Azure Kubernetes Service (AKS)
14 | 2. Implement a *Continuous Delivery Pipeline* in Jenkins to build and re-deploy *po-service* Springboot Java microservice on AKS (Section [B])
15 |
16 | **Result:** A **Continuous Delivery** pipeline deployed in Jenkins which will be used to re-deploy the *po-service* microservice on AKS (previously deployed to AKS in the parent project).
17 |
18 | **Workflow:**
19 |
20 | 
21 |
22 | For easy and quick reference, readers can refer to the following on-line resources as needed.
23 | - [Azure DevOps](https://docs.microsoft.com/en-us/azure/devops/?view=vsts)
24 | - [Jenkins](https://jenkins.io/doc/)
25 | - [Helm](https://docs.helm.sh/)
26 |
27 | **Important Notes:**
28 | - Keep in mind that this is an **Advanced** lab targeted towards experienced Kubernetes users who are familiar with CLI (`kubectl`) and the API model.
29 | - For deploying the Jenkins container on AKS, we will be using **Helm** in the Azure DevOps release (CD) pipeline. Helm is a package manager for Kubernetes and has become the de-facto tool for managing the lifecycle of containerized applications on Kubernetes. With Helm, Kubernetes resources for a given application are packaged within a *Chart*. When a Chart is deployed to Kubernetes, Helm creates a new release. A given Chart can be updated and deployed multiple times. Each deployment creates a new *Revision* for the release. A specific deployment can also be rolled back to a previous revision and/or deleted. A Chart can also be deployed multiple times (multiple releases). We won't be going into the details of Helm and it's internals as it is beyond the scope of this project. Refer to the Helm documentation (links provided above) for details.
30 |
31 | ### A] Implement Azure DevOps pipelines to deploy Jenkins CI/CD on AKS
32 | **Approx. time to complete this section: 1 Hour**
33 |
34 | In this section, we will implement a CI and CD pipeline in *Azure DevOps* in order to build and deploy *Jenkins* on the AKS cluster deployed in the parent project labs.
35 |
36 | 1. In this step we will implement a CI pipeline in Azure DevOps to build and push a custom *Jenkins* container image into ACR.
37 |
38 | Log into your Azure DevOps account and create a new project. Give a meaningful name to the project. Click **Create**. See screenshot below.
39 |
40 | 
41 |
42 | Click on **Pipelines** on the top menu and then select **Builds**. If you have turned on **Preview Features** in your account, the top menu will appear in the left navigational panel. Then click on **New pipeline**. See screenshot below.
43 |
44 | 
45 |
46 | In the **Select a source** page, select **GitHub**, specify a **Connection name** and use your credentials to authenticate to GitHub. You can use OAuth or a PAT Token to authenticate to GitHub. Then select this GitHub repository (your forked repo.) and click on **Continue**. See image below.
47 |
48 | 
49 |
50 | In the **Select a template** page, click on **Empty Job**. Next, select the **Default** *Agent pool* or other agent pool which you might have created in the parent project labs. Then click on the **+** symbol besides **Agent job 1**. See screenshot below.
51 |
52 | 
53 |
54 | Under **Add tasks**, search for text **Docker Compose** and add this task to the CI pipeline. This task will be used to build a *Custom* Jenkins container image containing Jenkins Plugins, Docker client and Kubernetes CLI installed on it. Review the **Dockerfile** in the GitHub repository to view which binaries will be installed in the container image once it is built.
55 |
56 | 
57 |
58 | Click on **Docker Compose** task in the left panel and update all field values marked with a **blue** checkmark as shown in the screenshot below.
59 |
60 | 
61 |
62 | Add another **Docker Compose** task to the CI pipeline. This task will be used to push the built custom Jenkins container image into the ACR (Azure Container Repository). This ACR should have been provisioned in the parent project labs. Click on this task in the left panel and update all field values marked with a **blue** checkmark as shown in the screenshot below.
63 |
64 | 
65 |
66 | Search for task **Copy files** and add it to the CI pipeline. This task will be used to copy the Helm chart folder to a staging directory.
67 |
68 | Configure this task as shown in the screenshot below.
69 |
70 | 
71 |
72 | Search for task **Publish Build Artifacts** and add it to the CI pipeline. This task will be used to publish the Helm chart folder from the staging directory to a **drop** location which would be accessible in the CD (Release) pipeline.
73 |
74 | Configure the task as shown in the images below.
75 |
76 | 
77 |
78 | 
79 |
80 | Click on **Save** in the tab panel (on top) to save the build definition. Then run a build by clicking on **Queue** in the tab panel on top as shown in the image below. Alternatively, click **Save and Queue** in the tab panel to save the build definition and queue it for execution on the build agent.
81 |
82 | 
83 |
84 | The build will take approx. 10-15 mins to finish. Proceed with the next step when the build finishes Ok.
85 |
86 | 
87 |
88 | 2. In this step we will implement the CD (Continuous Deployment) pipeline in Azure DevOps to deploy Jenkins on AKS.
89 |
90 | Before proceeding, review the Helm Chart artifacts in directory `./jenkins-chart`.
91 |
92 | We will use the new Azure DevOps UI for completing this step. Click on your account name in the top panel then select *Preview features* in the drop down menu and enable the features as shown in the screenshots below.
93 |
94 | 
95 |
96 | 
97 |
98 | Click on **Releases** in the left panel and then click on **New Pipeline**. Select an **Empty job** in the **Select a template** panel. In the field **Stage name**, specify a meaningful value (eg., AKS-Dev-Deploy) and click on the *X* to clear the panel. See screenshot below.
99 |
100 | 
101 |
102 | Change the name of the CD pipeline as shown in the image below.
103 |
104 | 
105 |
106 | Under **Artifacts**, click on **Add an artifact** and select **Build** as the **Source type**. Specify values as shown in the image below. Remember to select the build pipeline which was implemented in the previous step in field **Source**. Click on **Add**.
107 |
108 | 
109 |
110 | With this configuration, the CD pipeline will be triggered and executed when the CI pipeline completes OK.
111 |
112 | Under **Stages**, click on **1 job, 0 task**. Then click on **Agent job** and make sure the **Agent pool** which was created in the parent project lab (Default) is selected as shown in the image below.
113 |
114 | 
115 |
116 | Click on the + sign besides **Agent job** to add a new release *Task*. Search for text **Helm** in the search field besides **Add tasks**. And **Add** the **Helm tool installer** task.
117 |
118 | 
119 |
120 | In the task configuration panel, uncheck checkboxes for **Check for latest version of Helm** and **Install Kubectl** as shown below.
121 |
122 | 
123 |
124 | Click on the + sign besides **Agent job** and search for text **Helm** again. Add the task named **Package and deploy Helm charts** to the release pipeline. See screenshot below.
125 |
126 | 
127 |
128 | Click on the **Helm** task you just added and configure values as shown in the screenshots below. Provide correct values for all fields marked with a blue tick mark.
129 |
130 | 
131 |
132 | 
133 |
134 | After updating all values, click on **Save**. You can now run the CD pipeline by creating a new **Release** and deploying it or by re-running the **CI** (Build) pipeline.
135 |
136 | Proceed with Section [B] when the CD pipeline completes OK. See screenshot below.
137 |
138 | 
139 |
140 | ### B] Implement a Continuous Delivery (CD) pipeline for *po-service* microservice in Jenkins
141 | **Approx. time to complete this section: 1 Hour**
142 |
143 | 1. Open a terminal window and connect to the Bastion host (Linux VM) via SSH. Use the command below to ascertain the IP address of the **Jenkins** service. The value under column *EXTERNAL-IP* is the host IP.
144 | ```
145 | gradhakr@garadha-surface:~/git-repos/k8s-springboot-data-rest/extensions/jenkins-ci-cd$ kubectl get svc -n jenkins
146 | NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
147 | amber-nightingale-jenkins-chart LoadBalancer 10.0.115.162 104.42.121.82 80:31573/TCP 11h
148 | ```
149 | Use to web browser to access the Jenkins UI.
150 | **NOTE:** For the purposes of this lab, security in Jenkins has been disabled.
151 |
152 | 2. In this step, add a global variable *ACR_LOGINSERVER' which will be used in the CD pipeline.
153 |
154 | Click on **Manage Jenkins** on the left nav panel. See image below.
155 |
156 | 
157 |
158 | Then click on **Configure System**. In the configuration web page, check the box for **Environment variables** under **Global properties**. Add an environment variable named **ACR_LOGINSERVER**. Specify the variable value to be the name of your ACR which you deployed in the parent project. It should be of the form **xxxx**.azurecr.io, where *xxxx* is the name of your registry. Also, under *Build Timestamp*, change the value of *Pattern* to only include the year, month and day (yyyy-MM-dd). See screenshot below.
159 |
160 | 
161 |
162 | Click **Save**.
163 |
164 | 3. Store the ACR SP credentials (created in parent project) in Jenkins Credential vault.
165 |
166 | This credential will be used to access ACR in the CD pipeline.
167 |
168 | Click on **Credentials** on the left nav panel. See image below.
169 |
170 | 
171 |
172 | Click on **Jenkins** link under **Stored scoped to Jenkins** as shown in the image below.
173 |
174 | 
175 |
176 | Click on **Global credentials (unrestricted)** link. Then click on **Add Credentials** link as shown in the image below.
177 |
178 | 
179 |
180 | In the next web page, provide the details as shown in the image below. For **Username**, specify the Azure Service Principal (SP) **appId** value and for **Password** specify the SP **password**. Recall that you created a SP for ACR in the parent lab (Section [B], Step 3) and the SP **appId** and **password** should have been saved in a file **SP_ACR.txt** in the project directory. For **ID**, specify the value `acr-credentials`. These values are needed for pushing the built *po-service* container image into ACR.
181 |
182 | 
183 |
184 | Click **OK**.
185 |
186 | 4. Store the AKS credentials (Kube Config) in Jenkins Credential vault.
187 |
188 | This credential will be used to deploy the *po-service* microservice on AKS in the CD pipeline.
189 |
190 | Click on **Add Credentials** link again. Provide the values as shown in the image below. In the dropdown box for **Kind**, select value `Secret file`. Click on **Choose File** and select the *Kubernetes Config* file which you saved in the parent project labs. Specify value `aks-credentials` for field **ID** and enter a short description for this credential in the **Description** field.
191 |
192 | 
193 |
194 | Click **OK**. Then click on the **Jenkins** link on the top nav panel as shown in the image below.
195 |
196 | 
197 |
198 | 5. Next, define a CD Pipeline.
199 |
200 | Click on **New Item** in the left nav panel OR click on **create new jobs** link.
201 |
202 | 
203 |
204 | Give the CD pipeline a meaningful name and select the **Pipeline** project as shown in the image below.
205 |
206 | 
207 |
208 | Click **OK**. On the configuration web page and in the **Description** field, provide a brief description for this pipeline. In the **General** section, select the checkbox besides **GitHub Project** and specify the URL for the GitHub project which you forked in the parent project. Make sure the URL is the URL for your forked GitHub repository. See screenshot below.
209 |
210 | 
211 |
212 | Under **Build Triggers**, click the checkbox besides **GitHub hook trigger for GITScm polling**.
213 |
214 | 
215 |
216 | Under **Pipeline**, besides **Definition** select *Pipeline script from SCM*. In the drop down box for **SCM**, select *Git* and specify this GitHub URL (Your forked repo.) for field **Repository URL**. For field **Script Path**, specify value `extensions/jenkins-ci-cd/Jenkinsfile`. Leave other field values as is. Click **Save** when you are done. See screenshot below.
217 |
218 | 
219 |
220 | 5. In the next page, click **Build Now** in the left nav panel.
221 |
222 | 
223 |
224 | The *Pipeline Stage View* plugin will display the progress of the pipeline execution. See below.
225 |
226 | 
227 |
228 | While waiting for the pipeline execution to finish, open `./Jenkinsfile` and go thru the *Pipeline* stages and steps.
229 |
230 | All the pipeline stages should complete OK (green box) as shown in the image below.
231 |
232 | 
233 |
234 | To review the pipeline execution log and/or troubleshoot problems when any of the pipeline stages fail, click on the **Build #** under **Build History** and then click on **Console Output**. Alternatively, you can also click on **Pipeline Steps** to review the details (log output) of each step executed during each stage.
235 |
236 | 
237 |
238 |
239 | You have now successfully completed this lab. Congrats!
240 |
241 | To recap, during this lab you completed the following steps -
242 | - Defined a **Build (CI)** and **Release (CD)** pipeline in *Azure DevOps* to build a custom Jenkins container image and then deployed Jenkins on *Azure Kubernetes Service*
243 | - Defined and executed a **Continuous Delivery** pipeline in Jenkins and re-deployed the *po-service* microservice on *Azure Kubernetes Service*.
244 |
245 | You can return to the [parent project](https://github.com/ganrad/k8s-springboot-data-rest) to work on another sub-project. Happy Kubernet'ing!
246 |
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '2'
2 |
3 | services:
4 | jenkins:
5 | image: jenkins-gr
6 | build:
7 | context: .
8 | dockerfile: ./Dockerfile
9 | ports:
10 | - "8080"
11 |
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-01.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-01.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-02.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-02.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-03.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-03.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-04.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-04.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-05.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-05.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-06.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-06.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-07.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-07.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-08.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-08.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-09.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-09.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-10.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-10.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-11.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-11.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-12.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-12.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-13.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-13.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-14.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-14.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-15.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-15.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-16.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-16.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-17.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-17.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-18.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-18.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-19.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-19.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-20.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-20.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-21.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-21.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-22.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-22.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-23.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-23.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/A-24.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/A-24.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/B-01.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/B-01.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/B-02.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/B-02.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/B-03.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/B-03.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/B-04.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/B-04.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/B-05.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/B-05.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/B-06.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/B-06.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/B-07.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/B-07.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/B-08.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/B-08.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/B-09.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/B-09.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/B-10.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/B-10.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/B-11.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/B-11.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/B-12.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/B-12.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/B-13.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/B-13.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/B-14.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/B-14.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/B-15.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/B-15.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/B-16.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/B-16.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/B-17.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/B-17.PNG
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/images/Jenkins-cicd-workflow.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/jenkins-ci-cd/images/Jenkins-cicd-workflow.jpg
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/jenkins-chart/.helmignore:
--------------------------------------------------------------------------------
1 | # Patterns to ignore when building packages.
2 | # This supports shell glob matching, relative path matching, and
3 | # negation (prefixed with !). Only one pattern per line.
4 | .DS_Store
5 | # Common VCS dirs
6 | .git/
7 | .gitignore
8 | .bzr/
9 | .bzrignore
10 | .hg/
11 | .hgignore
12 | .svn/
13 | # Common backup files
14 | *.swp
15 | *.bak
16 | *.tmp
17 | *~
18 | # Various IDEs
19 | .project
20 | .idea/
21 | *.tmproj
22 |
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/jenkins-chart/Chart.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | appVersion: "1.0"
3 | description: A Helm chart for deploying Jenkins CI/CD
4 | name: jenkins-chart
5 | version: 0.1.0
6 |
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/jenkins-chart/templates/NOTES.txt:
--------------------------------------------------------------------------------
1 | 1. Get the application URL by running these commands:
2 | {{- if .Values.ingress.enabled }}
3 | {{- range .Values.ingress.hosts }}
4 | http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
5 | {{- end }}
6 | {{- else if contains "NodePort" .Values.service.type }}
7 | export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "jenkins-chart.fullname" . }})
8 | export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
9 | echo http://$NODE_IP:$NODE_PORT
10 | {{- else if contains "LoadBalancer" .Values.service.type }}
11 | NOTE: It may take a few minutes for the LoadBalancer IP to be available.
12 | You can watch the status of by running 'kubectl get svc -w {{ template "jenkins-chart.fullname" . }}'
13 | export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "jenkins-chart.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
14 | echo http://$SERVICE_IP:{{ .Values.service.port }}
15 | {{- else if contains "ClusterIP" .Values.service.type }}
16 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "jenkins-chart.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
17 | echo "Visit http://127.0.0.1:8080 to use your application"
18 | kubectl port-forward $POD_NAME 8080:80
19 | {{- end }}
20 |
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/jenkins-chart/templates/_helpers.tpl:
--------------------------------------------------------------------------------
1 | {{/* vim: set filetype=mustache: */}}
2 | {{/*
3 | Expand the name of the chart.
4 | */}}
5 | {{- define "jenkins-chart.name" -}}
6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7 | {{- end -}}
8 |
9 | {{/*
10 | Create a default fully qualified app name.
11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12 | If release name contains chart name it will be used as a full name.
13 | */}}
14 | {{- define "jenkins-chart.fullname" -}}
15 | {{- if .Values.fullnameOverride -}}
16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
17 | {{- else -}}
18 | {{- $name := default .Chart.Name .Values.nameOverride -}}
19 | {{- if contains $name .Release.Name -}}
20 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}}
21 | {{- else -}}
22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
23 | {{- end -}}
24 | {{- end -}}
25 | {{- end -}}
26 |
27 | {{/*
28 | Create chart name and version as used by the chart label.
29 | */}}
30 | {{- define "jenkins-chart.chart" -}}
31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
32 | {{- end -}}
33 |
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/jenkins-chart/templates/deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: Deployment
3 | metadata:
4 | name: {{ template "jenkins-chart.fullname" . }}
5 | labels:
6 | app: {{ template "jenkins-chart.name" . }}
7 | chart: {{ template "jenkins-chart.chart" . }}
8 | release: {{ .Release.Name }}
9 | heritage: {{ .Release.Service }}
10 | spec:
11 | replicas: {{ .Values.replicaCount }}
12 | selector:
13 | matchLabels:
14 | app: {{ template "jenkins-chart.name" . }}
15 | release: {{ .Release.Name }}
16 | template:
17 | metadata:
18 | labels:
19 | app: {{ template "jenkins-chart.name" . }}
20 | release: {{ .Release.Name }}
21 | spec:
22 | containers:
23 | - name: {{ .Chart.Name }}
24 | image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
25 | env:
26 | - name: JAVA_OPTS
27 | value: -Djenkins.install.runSetupWizard=false
28 | imagePullPolicy: {{ .Values.image.pullPolicy }}
29 | volumeMounts:
30 | - name: jenkins-home
31 | mountPath: /var/jenkins_home
32 | - name: docker-socket
33 | mountPath: /var/run/docker.sock
34 | ports:
35 | - name: http-port
36 | containerPort: {{ .Values.service.targetPort }}
37 | protocol: TCP
38 | - name: jnlp-port
39 | containerPort: 50000
40 | resources:
41 | {{ toYaml .Values.resources | indent 12 }}
42 | {{- with .Values.nodeSelector }}
43 | nodeSelector:
44 | {{ toYaml . | indent 8 }}
45 | {{- end }}
46 | {{- with .Values.affinity }}
47 | affinity:
48 | {{ toYaml . | indent 8 }}
49 | {{- end }}
50 | {{- with .Values.tolerations }}
51 | tolerations:
52 | {{ toYaml . | indent 8 }}
53 | {{- end }}
54 | volumes:
55 | - name: jenkins-home
56 | emptyDir: {}
57 | - name: docker-socket
58 | hostPath:
59 | path: /var/run/docker.sock
60 |
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/jenkins-chart/templates/ingress.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.ingress.enabled -}}
2 | {{- $fullName := include "jenkins-chart.fullname" . -}}
3 | {{- $ingressPath := .Values.ingress.path -}}
4 | apiVersion: extensions/v1beta1
5 | kind: Ingress
6 | metadata:
7 | name: {{ $fullName }}
8 | labels:
9 | app: {{ template "jenkins-chart.name" . }}
10 | chart: {{ template "jenkins-chart.chart" . }}
11 | release: {{ .Release.Name }}
12 | heritage: {{ .Release.Service }}
13 | {{- with .Values.ingress.annotations }}
14 | annotations:
15 | {{ toYaml . | indent 4 }}
16 | {{- end }}
17 | spec:
18 | {{- if .Values.ingress.tls }}
19 | tls:
20 | {{- range .Values.ingress.tls }}
21 | - hosts:
22 | {{- range .hosts }}
23 | - {{ . }}
24 | {{- end }}
25 | secretName: {{ .secretName }}
26 | {{- end }}
27 | {{- end }}
28 | rules:
29 | {{- range .Values.ingress.hosts }}
30 | - host: {{ . }}
31 | http:
32 | paths:
33 | - path: {{ $ingressPath }}
34 | backend:
35 | serviceName: {{ $fullName }}
36 | servicePort: http
37 | {{- end }}
38 | {{- end }}
39 |
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/jenkins-chart/templates/service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: {{ template "jenkins-chart.fullname" . }}
5 | labels:
6 | app: {{ template "jenkins-chart.name" . }}
7 | chart: {{ template "jenkins-chart.chart" . }}
8 | release: {{ .Release.Name }}
9 | heritage: {{ .Release.Service }}
10 | spec:
11 | type: {{ .Values.service.type }}
12 | ports:
13 | - port: {{ .Values.service.port }}
14 | targetPort: {{ .Values.service.targetPort }}
15 | protocol: TCP
16 | name: http
17 | selector:
18 | app: {{ template "jenkins-chart.name" . }}
19 | release: {{ .Release.Name }}
20 |
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/jenkins-chart/values.yaml:
--------------------------------------------------------------------------------
1 | # Default values for jenkins-chart.
2 | # This is a YAML-formatted file.
3 | # Declare variables to be passed into your templates.
4 |
5 | replicaCount: 1
6 |
7 | image:
8 | repository: mtcslabtest.azurecr.io/jenkins-gr
9 | tag: latest
10 | pullPolicy: Always
11 |
12 | service:
13 | type: LoadBalancer
14 | port: 80
15 | targetPort: 8080
16 |
17 | ingress:
18 | enabled: false
19 | annotations: {}
20 | # kubernetes.io/ingress.class: nginx
21 | # kubernetes.io/tls-acme: "true"
22 | path: /
23 | hosts:
24 | - chart-example.local
25 | tls: []
26 | # - secretName: chart-example-tls
27 | # hosts:
28 | # - chart-example.local
29 |
30 | resources: {}
31 | # We usually recommend not to specify default resources and to leave this as a conscious
32 | # choice for the user. This also increases chances charts run on environments with little
33 | # resources, such as Minikube. If you do want to specify resources, uncomment the following
34 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
35 | # limits:
36 | # cpu: 100m
37 | # memory: 128Mi
38 | # requests:
39 | # cpu: 100m
40 | # memory: 128Mi
41 |
42 | nodeSelector: {}
43 |
44 | tolerations: []
45 |
46 | affinity: {}
47 |
--------------------------------------------------------------------------------
/extensions/jenkins-ci-cd/plugins.txt:
--------------------------------------------------------------------------------
1 | build-timestamp:1.0.2
2 | git:3.9.1
3 | git-client:2.7.3
4 | git-server:1.7
5 | github:1.29.2
6 | github-pullrequest:0.2.4
7 | github-oauth:0.29
8 | github-api:1.92
9 | pipeline-model-definition:1.3.2
10 | pipeline-model-api:1.3.2
11 | pipeline-stage-view:2.10
12 | kubernetes-cli:1.2.0
13 |
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/README.md:
--------------------------------------------------------------------------------
1 | ## Create an Azure Container Service (AKS) cluster and then use *Kubernetes Dashboard* to deploy the *po-service* Springboot Java Microservice
2 |
3 | In order to access the Kubernetes Dashboard (Web UI), a PC (or a VM) running MacOS or Linux Desktop OS such as Fedora/Ubuntu/Debian (any Linux flavor) will be required. Alternatively, a Windows 10 PC running Ubuntu/Debian/SLES Linux OS on Windows Sub-System for Linux should also work. Azure CLI v2.0.4 or later **should** be installed on this VM/Machine. Refer to the [Azure CLI 2.0](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) documentation to install Azure CLI on this machine.
4 | For the remainder of this text, this machine (Linux/MacOS/Windows) will be referred to as the **Host** machine.
5 |
6 | You will first deploy an AKS cluster on Azure using the Azure Portal. You will then use the Kubernetes Dashboard (Web) UI to deploy the **MySQL** database and **po-service** application containers.
7 |
8 | YAML files for deploying all required Kubernetes objects (API resources) are provided in the [k8s-scripts](./k8s-scripts) sub-directory. Before proceeding with the next steps, we highly recommend that you go thru the Kubernetes object definition files in this directory.
9 |
10 |
11 | ### Provision the AKS cluster
12 | 1. Open a terminal window on the **Host** machine & use Azure CLI to login to your Azure account. Next, install **kubectl** which is a command line tool for administering and managing a Kubernetes cluster. Refer to the commands below in order to install *kubectl*.
13 | ```
14 | # (Optional) Login to your Azure account. Substitute correct values for and .
15 | $ az login -u -p
16 | #
17 | # Switch to your home directory
18 | $ cd
19 | #
20 | # Create a new directory 'aztools' under home directory to store the kubectl binary
21 | $ mkdir aztools
22 | #
23 | # Install kubectl binary in the new directory
24 | $ az aks install-cli --install-location=./aztools/kubectl
25 | #
26 | # Add the location of 'kubectl' binary to your search path and export it.
27 | # Alternatively, add the export command below to your '.bashrc' file in your home directory. Then logout of your Host (VM) from the terminal window and log back in for changes to take effect. By including this command in your '.bashrc' file, you don't have to set the location of the 'kubectl' binary in the PATH environment variable and export it every time you open a new terminal window.
28 | $ export PATH=$PATH:/home/labuser/aztools
29 | #
30 | # Check if kubectl is installed OK
31 | $ kubectl version -o yaml
32 | ```
33 |
34 | 2. Using a web browser, login to the [Azure portal](https://portal.azure.com) using your account ID and password. Access the **Azure Active Directory** blade and verify that you have adequate permissions to register applications. See screenshot below.
35 |
36 | 
37 |
38 | 3. Search for **Kubernetes services** PaaS service in **All services**. Click on the link to open up the blade (detail panel). Then click on *Create Kubernetes service* button (or ** + Add ** new cluster in case you have already deployed other clusters).
39 |
40 | 
41 |
42 | In the *Basics* tab, specify values for **Subscription**, **Resource group**, **Kubernetes cluster name** & **DNS name prefix** as shown in the screenshot below. Also, change the value of field **Node count** to **1** or else AKS will deploy a 3-node cluster (default). Click **Next:Authentication**.
43 |
44 | 
45 |
46 | In the *Authentication* tab, leave the default value for **Service principal** and click **Next:Networking**.
47 |
48 | 
49 |
50 | Leave all the default values as-is on the **Networking** tab. Click **Next:Monitoring**.
51 |
52 | 
53 |
54 | Leave the default values on the **Monitoring** and **Tags** tabs and click on **Review + create** button.
55 |
56 | 
57 |
58 | 
59 |
60 | In the summary page, review all the details and then click on **Create**.
61 |
62 | 
63 |
64 | The AKS cluster will take a few minutes (5-10 mins) to get provisioned. Once the cluster creation process finishes, the **akscluster** cluster will be displayed in the list as shown in the screenshot below.
65 |
66 | 
67 |
68 | 4. Switch back to the *Host* terminal window and start the Kubernetes Dashboard proxy using **one** of the options listed below
69 | - Use the Kubernetes proxy (kubectl) to connect to Kubernetes Dashboard
70 | ```
71 | # Configure kubectl to connect to the AKS cluster
72 | $ az aks get-credentials --resource-group myResourceGroup --name akscluster
73 | #
74 | # Start the Kubernetes dashboard proxy
75 | $ kubectl proxy -p 8001
76 | ```
77 | - Use Azure AKS CLI to connect to the Kubernetes Dashboard
78 | ```
79 | # Configure kubectl to connect to the AKS cluster
80 | $ az aks get-credentials --resource-group myResourceGroup --name akscluster
81 | #
82 | # Start the Kubernetes dashboard by running the following command
83 | $ az aks browse --name akscluster --resource-group myResourceGroup
84 | ```
85 |
86 | 5. Open another browser tab and point your browser to the Kubernetes dashboard URL [http://localhost:8001/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/](http://localhost:8001/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/)
87 |
88 | 6. Next, create a new Kubernetes **namespace** called *development*. In the Kubernetes **Dashboard**, click on *Namespaces* under *Cluster* on the left navigational panel. Then click on *CREATE* link on the top. This will open up a YAML/JSON editor (shown below). Cut and paste the contents of file **./k8s-scripts/dev-namespace.json** into the editor, then click *Upload*. See the screenshots below. Alternatively, use the *Create From File* tab to upload an YAML/JSON file containing Kubernetes resource/object definition and create corresponding object on the Kubernetes API Server.
89 |
90 | 
91 |
92 | 
93 |
94 | 7. Before proceeding, make sure you have selected the **development** namespace in the Kubernetes Dashboard UI. This is extremely important. Otherwise the Kubernetes API objects might get created in the wrong namespace (eg., default). See the screenshot below.
95 |
96 | 
97 |
98 | 8. Switch back to the terminal window. Create the **dev** Kubernetes context and make it the current context. We will be deploying the **MySQL** and **po-service** application pods and all associated Kubernetes resources (objects) within this namespace.
99 | ```
100 | # Create the 'dev' context. Remember to specify correct values for 'Resource Group' and 'AKS Cluster' names in the '--user' parameter.
101 | # eg., --user=clusterUser__
102 | $ kubectl config set-context dev --cluster=akscluster --user=clusterUser_myResourceGroup_akscluster --namespace=development
103 | #
104 | # Switch the current context to 'dev'
105 | $ kubectl config use-context dev
106 | #
107 | # Check your current context (should list 'dev' in the output)
108 | $ kubectl config current-context
109 | ```
110 |
111 | 9. Configure Kubernetes to pull application container images from ACR. When AKS cluster is created, Azure also creates a 'Service Principal' (SP) to support cluster operability with other Azure resources. This auto-generated service principal can be used to authenticate against the ACR. To do so, we need to create an Azure AD role assignment that grants the cluster's SP access to the Azure Container Registry. In a Linux terminal window, update the shell script `./k8s-scripts/acr-auth.sh` with correct values for the following variables.
112 |
113 | Variable | Description
114 | ----------------- | -------------------
115 | AKS_RESOURCE_GROUP | Name of the AKS resource group
116 | AKS_CLUSTER_NAME | Name of the AKS cluster instance
117 | ACR_RESOURCE_GROUP | Name of the ACR resource group
118 | ACR_NAME | Name of ACR instance
119 |
120 | Then execute this shell script. See below.
121 |
122 | ```
123 | # chmod 700 ./k8s-scripts/acr-auth.sh
124 | #
125 | # Update the shell script and then run it
126 | $ ./k8s-scripts/acr-auth.sh
127 | #
128 | ```
129 |
130 | If you are familiar with Kubernetes API/Object model, you can skip to [Deploy All Kubernetes API Objects](#deploy-all-kubernetes-api-objects).
131 |
132 | If you are new to Kubernetes, proceed with the next step.
133 |
134 | ### Deploy Kubernetes API Objects Step By Step
135 |
136 | In this section, you will deploy all Kubernetes API objects step by step. This will help you understand the relationships between the objects (Kubernetes API/Object Model), how everything ties together.
137 |
138 | 1. Use the Kubernetes Dashboard (Web UI) to deploy the **MySQL** database resources on Kubernetes.
139 | - Create the MySQL Secret API object. Click on *Secrets* link on the left navigational panel and then click on *Create* link on the top. Cut and paste the contents of file *./k8s-scripts/mysql-secret.yaml* into the editor and click *UPLOAD*. Alternatively, you can also use the *Create From File* option to upload the contents of this file and create the Secret API object.
140 |
141 | 
142 |
143 | 
144 |
145 | - Create the MySQL Service API object. Click on the *Services* link on the left navigational panel and then click on *Create* link on the top. Cut and paste the contents of file *./k8s-scripts/mysql-svc.yaml* into the editor and then click *UPLOAD*. Alternatively, use the *Create From File" option to upload the contents of this file and create the Service API object.
146 |
147 | 
148 |
149 | 
150 |
151 | - Create the MySQL *Deployment* API object. Click on the *Deployments* link on the left navigational panel and then click on *Create* link on the top. Cut and paste the contents of file *./k8s-scripts/mysql-deployment.yaml* into the editor and then click *UPLOAD*. Alternatively, use the *Create From File" option to upload the contents of this file and create the Kubernetes Deployment API object.
152 |
153 | 
154 |
155 | 
156 |
157 | You may have to refresh the web page to view the status of the Kubernetes API objects.
158 |
159 | 
160 |
161 | 2. Update the file **k8s-scripts/app-deployment.yaml**. The *image* attribute should point to **your** ACR instance. This will ensure AKS pulls the application container image from the correct registry. Substitute the correct value for the ACR *registry name* in the *image* attribute (highlighted in yellow) within the *containers section* as shown in the screenshot below.
162 |
163 | 
164 |
165 | 3. Use the Kubernetes Dashboard (Web UI) to deploy the **po-service** Springboot application resources on Kubernetes.
166 | - Create the Config Map API object. Click on *Config Maps* link on the left navigational panel and then click on *Create* link on the top. Cut and paste the contents of file *./k8s-scripts/app-config-map.yaml* into the editor and click *UPLOAD*. Alternatively, you can also use the *Create From File* option to upload the contents of this file and create the Configmap API object.
167 |
168 | 
169 |
170 | 
171 |
172 | - Create the Secret API object. Click on the *Secrets* link on the left navigational panel and then click on *Create* link on the top. Cut and paste the contents of file *./k8s-scripts/app-mysql-secret.yaml* into the editor and then click *UPLOAD*. Alternatively, use the *Create From File" option to upload the contents of this file and create the Secret API object.
173 |
174 | 
175 |
176 | 
177 |
178 | - Create the Service API object. Click on the *Services* link on the left navigational panel and then click on *Create* link on the top. Cut and paste the contents of file *./k8s-scripts/app-service.yaml* into the editor and then click *UPLOAD*. Alternatively, use the *Create From File" option to upload the contents of this file and create the Service API object.
179 |
180 | 
181 |
182 | 
183 |
184 | - Create the po-service *Deployment* API object. Click on the *Deployments* link on the left navigational panel and then click on *Create* link on the top. Cut and paste the contents of file *./k8s-scripts/app-deployment.yaml* into the editor and then click *UPLOAD*. Alternatively, use the *Create From File" option to upload the contents of this file and create the Kubernetes Deployment API object.
185 |
186 | 
187 |
188 | 
189 |
190 | You may have to refresh the web page to view the status of the Kubernetes API objects.
191 |
192 | 
193 |
194 | You can now go back to the [k8s-springboot-data-rest](https://github.com/ganrad/k8s-springboot-data-rest#accessing-the-purchase-order-microservice-rest-api) GitHub project and follow the instructions for testing the **po-service** microservice application.
195 |
196 | ### Deploy All Kubernetes API Objects
197 |
198 | In this section, you will use the Kubernetes Dashboard UI to deploy all Kubernetes API objects to AKS. A single Kubernetes manifest file will be used to deploy all application artifacts.
199 |
200 | **NOTE:** The **k8s-scripts/deploy-app.yaml** file deploys a **ephemeral** MySQL database server container on AKS. This implies, when the Kubernetes **deployment** object corresponding to the MySQL application is deleted (Pod is terminated/deleted), the storage space used by the MySQL container will also be deleted and the data stored in the MySQL databases will be lost.
201 |
202 | For deploying a **persistent** MySQL database server container, review and then update the file **k8s-scripts/deploy-app-persistent.yaml** instead of **k8s-scripts/deploy-app.yaml**. The persistent MySQL container uses an **Azure Disk** to persist the MySQL databases. Essentially, all data stored within the MySQL databases will be persisted in a disk and will not be lost when the MySQL **deployment** object is deleted. The data will only be deleted when the corresponding **Persistent Volume Claim** object is deleted.
203 |
204 | 1. Update the file **k8s-scripts/deploy-app.yaml**. The *image* attribute should point to **your** ACR instance. This will ensure AKS pulls the application container image from the correct registry. Substitute the correct value for the ACR *registry name* in the *image* attribute (highlighted in yellow) within the deployment API object (*containers section*) as shown in the screenshot below.
205 |
206 | 
207 |
208 | 2. Use the Kubernetes Dashboard (Web UI) to deploy the Springboot application resources on Kubernetes. In the **Overview** page of the Kubernetes Dashboard UI, click on **CREATE** link on the top. Cut and paste the contents of file *./k8s-scripts/deploy-app.yaml* into the editor and click *UPLOAD*. Alternatively, you can also use the *Create From File* option to upload the contents of this file. The Kubernetes runtime will create all the API objects and deploy the *po-service* Springboot microservice & *MySQL* database service containers.
209 |
210 | 
211 |
212 | 
213 |
214 | 
215 |
216 | 
217 |
218 | You can now go to the [k8s-springboot-data-rest](https://github.com/ganrad/k8s-springboot-data-rest#accessing-the-purchase-order-microservice-rest-api) GitHub project and follow the steps for testing the **po-service** microservice application.
219 |
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/Az-01.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/Az-01.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-01.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-01.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-02.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-02.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-021.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-021.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-03.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-03.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-04.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-04.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-041.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-041.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-042.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-042.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-05.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-05.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-06.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-06.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-07.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-07.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-08.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-08.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-09.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-09.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-10.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-10.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-11.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-11.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-12.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-12.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-13.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-13.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-14.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-14.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-15.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-15.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-16.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-16.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-17.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-17.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-18.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-18.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-19.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-19.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-20.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-20.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-21.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-21.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-22.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-22.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-23.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-23.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-24.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-24.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/images/k8s-dash-deploy-25.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/k8s-dash-deploy/images/k8s-dash-deploy-25.PNG
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/k8s-scripts/acr-auth.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Specify correct values for the following 4 variables
4 | AKS_RESOURCE_GROUP=MTC-TA-Sep21-RG
5 | AKS_CLUSTER_NAME=akscluster
6 | ACR_RESOURCE_GROUP=myResourceGroup
7 | ACR_NAME=mtcslabtest
8 |
9 | # Get the id of the service principal configured for AKS
10 | CLIENT_ID=$(az aks show --resource-group $AKS_RESOURCE_GROUP --name $AKS_CLUSTER_NAME --query "servicePrincipalProfile.clientId" --output tsv)
11 |
12 | # Get the ACR registry resource id
13 | ACR_ID=$(az acr show --name $ACR_NAME --resource-group $ACR_RESOURCE_GROUP --query "id" --output tsv)
14 |
15 | # Create role assignment
16 | az role assignment create --assignee $CLIENT_ID --role Reader --scope $ACR_ID
17 |
18 | echo "CLIENT_ID_SP: $CLIENT_ID"
19 | echo "ACR_ID: $ACR_ID"
20 |
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/k8s-scripts/app-config-map.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ConfigMap
3 | metadata:
4 | name: mysql-db-name
5 | data:
6 | mysqldb.properties: |
7 | mysql.dbname=sampledb
8 |
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/k8s-scripts/app-deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: Deployment
3 | metadata:
4 | name: po-service
5 | labels:
6 | app: po-service
7 | spec:
8 | replicas: 1
9 | selector:
10 | matchLabels:
11 | app: po-service
12 | template:
13 | metadata:
14 | labels:
15 | app: po-service
16 | spec:
17 | volumes:
18 | - name: mysqlcm
19 | configMap:
20 | name: mysql-db-name
21 | - name: mysqlse
22 | secret:
23 | secretName: mysql-secret
24 | containers:
25 | - name: po-service
26 | image: mtcslabtest.azurecr.io/po-service:latest
27 | ports:
28 | - containerPort: 8080
29 | protocol: TCP
30 | volumeMounts:
31 | - name: mysqlcm
32 | mountPath: /etc/config
33 | - name: mysqlse
34 | mountPath: /etc/vol-secrets
35 |
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/k8s-scripts/app-mysql-secret.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Secret
3 | metadata:
4 | name: mysql-secret
5 | type: Opaque
6 | data:
7 | username.properties: bXlzcWwudXNlcj1teXNxbAo=
8 | password.properties: bXlzcWwucGFzc3dvcmQ9cGFzc3dvcmQK
9 |
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/k8s-scripts/app-service.yaml:
--------------------------------------------------------------------------------
1 | kind: Service
2 | apiVersion: v1
3 | metadata:
4 | name: po-service
5 | spec:
6 | type: LoadBalancer
7 | selector:
8 | app: po-service
9 | ports:
10 | - name: 80-tcp
11 | protocol: TCP
12 | port: 80
13 | targetPort: 8080
14 |
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/k8s-scripts/deploy-app-persistent.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | kind: StorageClass
3 | apiVersion: storage.k8s.io/v1
4 | metadata:
5 | name: managed-dev-mysql
6 | provisioner: kubernetes.io/azure-disk
7 | parameters:
8 | storageaccounttype: Standard_LRS
9 | kind: managed
10 | ---
11 | apiVersion: v1
12 | kind: PersistentVolumeClaim
13 | metadata:
14 | name: azure-mgd-dsk-mysql
15 | spec:
16 | accessModes:
17 | - ReadWriteOnce
18 | storageClassName: managed-dev-mysql
19 | resources:
20 | requests:
21 | storage: 5Gi
22 | ---
23 | apiVersion: v1
24 | kind: Secret
25 | metadata:
26 | name: mysql
27 | type: Opaque
28 | data:
29 | database-name: c2FtcGxlZGI=
30 | database-password: cGFzc3dvcmQ=
31 | database-root-password: cGFzc3dvcmQ=
32 | database-user: bXlzcWw=
33 | ---
34 | kind: Service
35 | apiVersion: v1
36 | metadata:
37 | name: mysql
38 | spec:
39 | selector:
40 | app: mysql
41 | ports:
42 | - protocol: TCP
43 | port: 3306
44 | targetPort: 3306
45 | ---
46 | apiVersion: apps/v1
47 | kind: Deployment
48 | metadata:
49 | name: mysql
50 | labels:
51 | app: mysql-persistent
52 | spec:
53 | replicas: 1
54 | selector:
55 | matchLabels:
56 | app: mysql
57 | template:
58 | metadata:
59 | labels:
60 | app: mysql
61 | spec:
62 | containers:
63 | - name: mysql
64 | image: mysql/mysql-server:5.7.22
65 | ports:
66 | - containerPort: 3306
67 | protocol: TCP
68 | volumeMounts:
69 | - mountPath: /var/lib/mysql
70 | name: data-volume
71 | subPath: mysql
72 | env:
73 | - name: MYSQL_USER
74 | valueFrom:
75 | secretKeyRef:
76 | name: mysql
77 | key: database-user
78 | - name: MYSQL_PASSWORD
79 | valueFrom:
80 | secretKeyRef:
81 | name: mysql
82 | key: database-password
83 | - name: MYSQL_ROOT_PASSWORD
84 | valueFrom:
85 | secretKeyRef:
86 | name: mysql
87 | key: database-root-password
88 | - name: MYSQL_DATABASE
89 | valueFrom:
90 | secretKeyRef:
91 | name: mysql
92 | key: database-name
93 | volumes:
94 | - name: data-volume
95 | persistentVolumeClaim:
96 | claimName: azure-mgd-dsk-mysql
97 | ---
98 | apiVersion: v1
99 | kind: ConfigMap
100 | metadata:
101 | name: mysql-db-name
102 | data:
103 | mysqldb.properties: |
104 | mysql.dbname=sampledb
105 | ---
106 | apiVersion: v1
107 | kind: Secret
108 | metadata:
109 | name: mysql-secret
110 | type: Opaque
111 | data:
112 | username.properties: bXlzcWwudXNlcj1teXNxbAo=
113 | password.properties: bXlzcWwucGFzc3dvcmQ9cGFzc3dvcmQK
114 | ---
115 | kind: Service
116 | apiVersion: v1
117 | metadata:
118 | name: po-service
119 | spec:
120 | type: LoadBalancer
121 | selector:
122 | app: po-service
123 | ports:
124 | - name: 80-tcp
125 | protocol: TCP
126 | port: 80
127 | targetPort: 8080
128 | ---
129 | apiVersion: apps/v1
130 | kind: Deployment
131 | metadata:
132 | name: po-service
133 | labels:
134 | app: po-service
135 | spec:
136 | replicas: 1
137 | selector:
138 | matchLabels:
139 | app: po-service
140 | template:
141 | metadata:
142 | labels:
143 | app: po-service
144 | spec:
145 | volumes:
146 | - name: mysqlcm
147 | configMap:
148 | name: mysql-db-name
149 | - name: mysqlse
150 | secret:
151 | secretName: mysql-secret
152 | containers:
153 | - name: po-service
154 | image: mtcslabtest.azurecr.io/po-service:latest
155 | ports:
156 | - containerPort: 8080
157 | protocol: TCP
158 | volumeMounts:
159 | - name: mysqlcm
160 | mountPath: /etc/config
161 | - name: mysqlse
162 | mountPath: /etc/vol-secrets
163 | ---
164 |
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/k8s-scripts/deploy-app.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | apiVersion: v1
3 | kind: Secret
4 | metadata:
5 | name: mysql
6 | type: Opaque
7 | data:
8 | database-name: c2FtcGxlZGI=
9 | database-password: cGFzc3dvcmQ=
10 | database-root-password: cGFzc3dvcmQ=
11 | database-user: bXlzcWw=
12 | ---
13 | kind: Service
14 | apiVersion: v1
15 | metadata:
16 | name: mysql
17 | spec:
18 | selector:
19 | app: mysql
20 | ports:
21 | - protocol: TCP
22 | port: 3306
23 | targetPort: 3306
24 | ---
25 | apiVersion: apps/v1
26 | kind: Deployment
27 | metadata:
28 | name: mysql
29 | labels:
30 | app: mysql-ephemeral
31 | spec:
32 | replicas: 1
33 | selector:
34 | matchLabels:
35 | app: mysql
36 | template:
37 | metadata:
38 | labels:
39 | app: mysql
40 | spec:
41 | containers:
42 | - name: mysql
43 | image: mysql/mysql-server:5.7.22
44 | ports:
45 | - containerPort: 3306
46 | protocol: TCP
47 | env:
48 | - name: MYSQL_USER
49 | valueFrom:
50 | secretKeyRef:
51 | name: mysql
52 | key: database-user
53 | - name: MYSQL_PASSWORD
54 | valueFrom:
55 | secretKeyRef:
56 | name: mysql
57 | key: database-password
58 | - name: MYSQL_ROOT_PASSWORD
59 | valueFrom:
60 | secretKeyRef:
61 | name: mysql
62 | key: database-root-password
63 | - name: MYSQL_DATABASE
64 | valueFrom:
65 | secretKeyRef:
66 | name: mysql
67 | key: database-name
68 | ---
69 | apiVersion: v1
70 | kind: ConfigMap
71 | metadata:
72 | name: mysql-db-name
73 | data:
74 | mysqldb.properties: |
75 | mysql.dbname=sampledb
76 | ---
77 | apiVersion: v1
78 | kind: Secret
79 | metadata:
80 | name: mysql-secret
81 | type: Opaque
82 | data:
83 | username.properties: bXlzcWwudXNlcj1teXNxbAo=
84 | password.properties: bXlzcWwucGFzc3dvcmQ9cGFzc3dvcmQK
85 | ---
86 | kind: Service
87 | apiVersion: v1
88 | metadata:
89 | name: po-service
90 | spec:
91 | type: LoadBalancer
92 | selector:
93 | app: po-service
94 | ports:
95 | - name: 80-tcp
96 | protocol: TCP
97 | port: 80
98 | targetPort: 8080
99 | ---
100 | apiVersion: apps/v1
101 | kind: Deployment
102 | metadata:
103 | name: po-service
104 | labels:
105 | app: po-service
106 | spec:
107 | replicas: 1
108 | selector:
109 | matchLabels:
110 | app: po-service
111 | template:
112 | metadata:
113 | labels:
114 | app: po-service
115 | spec:
116 | volumes:
117 | - name: mysqlcm
118 | configMap:
119 | name: mysql-db-name
120 | - name: mysqlse
121 | secret:
122 | secretName: mysql-secret
123 | containers:
124 | - name: po-service
125 | image: mtcslabtest.azurecr.io/po-service:latest
126 | ports:
127 | - containerPort: 8080
128 | protocol: TCP
129 | volumeMounts:
130 | - name: mysqlcm
131 | mountPath: /etc/config
132 | - name: mysqlse
133 | mountPath: /etc/vol-secrets
134 | ---
135 |
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/k8s-scripts/dev-namespace.json:
--------------------------------------------------------------------------------
1 | {
2 | "kind": "Namespace",
3 | "apiVersion": "v1",
4 | "metadata": {
5 | "name": "development",
6 | "labels": {
7 | "name": "development"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/k8s-scripts/mysql-deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: Deployment
3 | metadata:
4 | name: mysql
5 | labels:
6 | app: mysql-ephemeral
7 | spec:
8 | replicas: 1
9 | selector:
10 | matchLabels:
11 | app: mysql
12 | template:
13 | metadata:
14 | labels:
15 | app: mysql
16 | spec:
17 | containers:
18 | - name: mysql
19 | image: mysql/mysql-server:5.7.22
20 | ports:
21 | - containerPort: 3306
22 | protocol: TCP
23 | env:
24 | - name: MYSQL_USER
25 | valueFrom:
26 | secretKeyRef:
27 | name: mysql
28 | key: database-user
29 | - name: MYSQL_PASSWORD
30 | valueFrom:
31 | secretKeyRef:
32 | name: mysql
33 | key: database-password
34 | - name: MYSQL_ROOT_PASSWORD
35 | valueFrom:
36 | secretKeyRef:
37 | name: mysql
38 | key: database-root-password
39 | - name: MYSQL_DATABASE
40 | valueFrom:
41 | secretKeyRef:
42 | name: mysql
43 | key: database-name
44 |
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/k8s-scripts/mysql-secret.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Secret
3 | metadata:
4 | name: mysql
5 | type: Opaque
6 | data:
7 | database-name: c2FtcGxlZGI=
8 | database-password: cGFzc3dvcmQ=
9 | database-root-password: cGFzc3dvcmQ=
10 | database-user: bXlzcWw=
11 |
--------------------------------------------------------------------------------
/extensions/k8s-dash-deploy/k8s-scripts/mysql-svc.yaml:
--------------------------------------------------------------------------------
1 | kind: Service
2 | apiVersion: v1
3 | metadata:
4 | name: mysql
5 | spec:
6 | selector:
7 | app: mysql
8 | ports:
9 | - protocol: TCP
10 | port: 3306
11 | targetPort: 3306
12 |
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/images/B-01.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/po-deploy-azuredb-mysql/images/B-01.PNG
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/images/B-02.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/po-deploy-azuredb-mysql/images/B-02.PNG
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/images/D-01.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/po-deploy-azuredb-mysql/images/D-01.PNG
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/images/D-02.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/po-deploy-azuredb-mysql/images/D-02.PNG
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/images/D-03.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/po-deploy-azuredb-mysql/images/D-03.PNG
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/images/D-04.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/po-deploy-azuredb-mysql/images/D-04.PNG
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/images/D-05.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/po-deploy-azuredb-mysql/images/D-05.PNG
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/images/D-06.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/po-deploy-azuredb-mysql/images/D-06.PNG
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/images/D-07.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/po-deploy-azuredb-mysql/images/D-07.PNG
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/images/aks-osba-po-deploy.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/extensions/po-deploy-azuredb-mysql/images/aks-osba-po-deploy.jpg
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/images/aks-osba-po-deploy.xml:
--------------------------------------------------------------------------------
1 | 7Vvbcts2EP0azbQP1ZAEL9KjZbtppk6bVtNp8uSBRIhiQxEqCNlSvr4ACfACQLJsgbKjVJmJyQV4wTm7i90FOADXq+07AtfLDzhG2cBz4u0A3Aw8z3XdkP3hkl0lGYegEiQkjUWnRjBNvyIhdIR0k8ao6HSkGGc0XXeFc5znaE47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fyaMQaZCrzKzSOC6dnckGuw6wa4ancxK6is/39LTcZFA2EkUX9GlQbyRTJChJi3KK7DNV9IFasjLVV03Jog8sEKmn/NK4riUQ7PhPCcX3YVq+UoUJDBlPaGDEirvT80jJyK+bGSI5y7VZpOlM94QGl8mIpxR2vUgvqLgmSjwblOhJ6MV4O14PS/nabJ8+Loi67Pmubk/+uB978kyxX5hxG5mxg4QfmFze+7ygMJ9zW6t6swfVF7xRq7MRVXgqVUdGFcHpVAVAw7WnymXPhYh6k0MrsxQB9CsXIoBSmPbDw4UFz3FO698tdJxciKgVurHm93lCUFEI8yU4y0r7/eG3JE+3P2oadQGpc2hYf+srdQ6CXmzS1W2yU7/p20A93UDtl35eZKHaXDk6XCpU+wehXYsL+llOMijAsZyjbUo/tY6bO+zTBoXSl6nHq2hDBJxnaYPaH/iW/a9ejLmoMmWgZH6+Yf193JOrNZSANUS/0TSjrEzec6NeMWOZ32cYxvczmPEAm/Sbe9SRaZ3LRxqjxqV4C9UV8Izc445Bwv5MJCjfVdYBHLXgAjSSTNm9b2HhBRyxbeubNruMzaD92lgYjoeKlY30+ox5660FAvU56aII7Js7X+HOC73jPKRngTu7Kb+IDMW6sowNB6+6K0FuDG8Hk7Lf+ZeZwRF7/FAeX/GvLhojOLiBci8KT47uCQWTsueF2FpMrH4XEI6UYK1iS1x1KLgOn7hRRbF2oxfE2eAsGy7OoP3AsEdPWsQraL++uGJxqlC8dODwfz1MIXhDszRnT5dfSznHzCt4sWA52nDDkrViuEKIpnliKcSOAmUKiQxfMwSGAr9U85M41b8QuVqvMwZbiabn/MVHrNH8NmJn2+tk6l79yPANlHGvvo11MhmN23FaL3dMh9zdUU5LRqodp+XZdlrmSUbdyheoi2D2JhnflJ7+7w1PDaid1/SGvr4z5/v1hmrtp09vyE6b73wrY2w+pga3/wE=
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/k8s-resources/create-aci.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: '2018-10-01'
2 | location: westus
3 | name: po-service-aci-group
4 | properties:
5 | containers:
6 | - name: po-service-aci
7 | properties:
8 | command:
9 | - /bin/bash
10 | - -c
11 | - java -Dspring.datasource.url="jdbc:mysql://hostname:3306/dbname?useSSL=true&requireSSL=true" -jar ./po-rest-service-1.0.jar
12 | image: mtcslabtest.azurecr.io/po-service:latest
13 | ports:
14 | - port: 8080
15 | resources:
16 | requests:
17 | cpu: 1.0
18 | memoryInGB: 1.0
19 | volumeMounts:
20 | - mountPath: /etc/vol-secrets
21 | name: secretvolume1
22 | - mountPath: /etc/config
23 | name: secretvolume2
24 | osType: Linux
25 | restartPolicy: OnFailure
26 | ipAddress:
27 | dnsNameLabel: po-service-MyInitial
28 | type: Public
29 | ports:
30 | - protocol: tcp
31 | port: '8080'
32 | volumes:
33 | - name: secretvolume1
34 | secret:
35 | username.properties: 'Base64 encoded value of : mysql.user=value'
36 | password.properties: 'Base64 encoded value of : mysql.password=value'
37 | - name: secretvolume2
38 | secret:
39 | mysqldb.properties: 'Any base64 encoded value. This value is not used'
40 | imageRegistryCredentials:
41 | - server: mtcslabtest.azurecr.io
42 | username: mtcslabtest
43 | password: 'Substitute value of ACR password'
44 | tags: {}
45 | type: Microsoft.ContainerInstance/containerGroups
46 |
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/k8s-resources/mysql-database-binding.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: servicecatalog.k8s.io/v1beta1
2 | kind: ServiceBinding
3 | metadata:
4 | name: po-service-mysql-database-binding
5 | namespace: dev-azure-mysql
6 | spec:
7 | instanceRef:
8 | name: po-service-mysql-database-instance
9 | secretName: mysql-secret
10 |
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/k8s-resources/mysql-database-instance.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: servicecatalog.k8s.io/v1beta1
2 | kind: ServiceInstance
3 | metadata:
4 | name: po-service-mysql-database-instance
5 | namespace: dev-azure-mysql
6 | spec:
7 | clusterServiceClassExternalName: azure-mysql-5-7-database
8 | clusterServicePlanExternalName: database
9 | parameters:
10 | parentAlias: 71b6b6c4-5271-47d3-8188-51e69fba914e
11 |
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/k8s-resources/mysql-dbms-instance.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: servicecatalog.k8s.io/v1beta1
2 | kind: ServiceInstance
3 | metadata:
4 | name: po-service-mysql-dbms-instance
5 | namespace: dev-azure-mysql
6 | spec:
7 | clusterServiceClassExternalName: azure-mysql-5-7-dbms
8 | clusterServicePlanExternalName: basic
9 | parameters:
10 | location: westus
11 | resourceGroup: myResourceGroup
12 | alias: 71b6b6c4-5271-47d3-8188-51e69fba914e
13 | firewallRules:
14 | - startIPAddress: "0.0.0.0"
15 | endIPAddress: "255.255.255.255"
16 | name: "AllowAll"
17 |
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/k8s-resources/po-deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: Deployment
3 | metadata:
4 | name: po-service-svcat
5 | namespace: dev-svcat
6 | labels:
7 | app: po-service-svcat
8 | spec:
9 | replicas: 1
10 | selector:
11 | matchLabels:
12 | app: po-service-svcat
13 | template:
14 | metadata:
15 | labels:
16 | app: po-service-svcat
17 | spec:
18 | containers:
19 | - name: po-service-svcat
20 | image: mtcslabtest.azurecr.io/po-service:latest
21 | volumeMounts:
22 | - name: mysqlse
23 | mountPath: "/etc/vol-secrets"
24 | - name: mysqlcm
25 | mountPath: "/etc/config"
26 | ports:
27 | - containerPort: 8080
28 | protocol: TCP
29 | env:
30 | - name: DB_HOST
31 | valueFrom:
32 | secretKeyRef:
33 | name: mysql-secret
34 | key: host
35 | - name: DB_HOST_PORT
36 | valueFrom:
37 | secretKeyRef:
38 | name: mysql-secret
39 | key: port
40 | - name: DB_NAME
41 | valueFrom:
42 | secretKeyRef:
43 | name: mysql-secret
44 | key: database
45 | - name: DB_SSL_REQ
46 | valueFrom:
47 | secretKeyRef:
48 | name: mysql-secret
49 | key: sslRequired
50 | - name: SPRING_DATASOURCE_URL
51 | value: "jdbc:mysql://$(DB_HOST):$(DB_HOST_PORT)/$(DB_NAME)?useSSL=true&requireSSL=$(DB_SSL_REQ)"
52 | - name: SPRING_DATASOURCE_USERNAME
53 | valueFrom:
54 | secretKeyRef:
55 | name: mysql-secret
56 | key: username
57 | - name: SPRING_DATASOURCE_PASSWORD
58 | valueFrom:
59 | secretKeyRef:
60 | name: mysql-secret
61 | key: password
62 | volumes:
63 | - name: mysqlse
64 | secret:
65 | secretName: mysql-secret
66 | items:
67 | - key: username
68 | path: username.properties
69 | mode: 511
70 | - key: password
71 | path: password.properties
72 | mode: 511
73 | - name: mysqlcm
74 | secret:
75 | secretName: mysql-secret
76 | items:
77 | - key: database
78 | path: mysqldb.properties
79 | mode: 511
80 |
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/k8s-resources/po-service.yaml:
--------------------------------------------------------------------------------
1 | kind: Service
2 | apiVersion: v1
3 | metadata:
4 | name: po-service-svcat
5 | namespace: dev-svcat
6 | spec:
7 | type: LoadBalancer
8 | selector:
9 | app: po-service-svcat
10 | ports:
11 | - name: 80-tcp
12 | protocol: TCP
13 | port: 80
14 | targetPort: 8080
15 |
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/po-service/.helmignore:
--------------------------------------------------------------------------------
1 | # Patterns to ignore when building packages.
2 | # This supports shell glob matching, relative path matching, and
3 | # negation (prefixed with !). Only one pattern per line.
4 | .DS_Store
5 | # Common VCS dirs
6 | .git/
7 | .gitignore
8 | .bzr/
9 | .bzrignore
10 | .hg/
11 | .hgignore
12 | .svn/
13 | # Common backup files
14 | *.swp
15 | *.bak
16 | *.tmp
17 | *~
18 | # Various IDEs
19 | .project
20 | .idea/
21 | *.tmproj
22 |
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/po-service/Chart.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | appVersion: "1.0"
3 | description: A Helm chart for deploying the 'po-service' Java Springboot microservice to AKS
4 | name: po-service
5 | version: 0.1.0
6 |
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/po-service/templates/NOTES.txt:
--------------------------------------------------------------------------------
1 | 1. Get the application URL by running these commands:
2 | {{- if .Values.ingress.enabled }}
3 | {{- range .Values.ingress.hosts }}
4 | http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
5 | {{- end }}
6 | {{- else if contains "NodePort" .Values.service.type }}
7 | export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "po-service.fullname" . }})
8 | export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
9 | echo http://$NODE_IP:$NODE_PORT
10 | {{- else if contains "LoadBalancer" .Values.service.type }}
11 | NOTE: It may take a few minutes for the LoadBalancer IP to be available.
12 | You can watch the status of by running 'kubectl get svc -w {{ template "po-service.fullname" . }}'
13 | export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "po-service.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
14 | echo http://$SERVICE_IP:{{ .Values.service.port }}
15 | {{- else if contains "ClusterIP" .Values.service.type }}
16 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "po-service.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
17 | echo "Visit http://127.0.0.1:8080 to use your application"
18 | kubectl port-forward $POD_NAME 8080:80
19 | {{- end }}
20 |
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/po-service/templates/_helpers.tpl:
--------------------------------------------------------------------------------
1 | {{/* vim: set filetype=mustache: */}}
2 | {{/*
3 | Expand the name of the chart.
4 | */}}
5 | {{- define "po-service.name" -}}
6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7 | {{- end -}}
8 |
9 | {{/*
10 | Create a default fully qualified app name.
11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12 | If release name contains chart name it will be used as a full name.
13 | */}}
14 | {{- define "po-service.fullname" -}}
15 | {{- if .Values.fullnameOverride -}}
16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
17 | {{- else -}}
18 | {{- $name := default .Chart.Name .Values.nameOverride -}}
19 | {{- if contains $name .Release.Name -}}
20 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}}
21 | {{- else -}}
22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
23 | {{- end -}}
24 | {{- end -}}
25 | {{- end -}}
26 |
27 | {{/*
28 | Create chart name and version as used by the chart label.
29 | */}}
30 | {{- define "po-service.chart" -}}
31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
32 | {{- end -}}
33 |
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/po-service/templates/deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: Deployment
3 | metadata:
4 | name: {{ template "po-service.fullname" . }}
5 | labels:
6 | app: {{ template "po-service.name" . }}
7 | chart: {{ template "po-service.chart" . }}
8 | release: {{ .Release.Name }}
9 | heritage: {{ .Release.Service }}
10 | spec:
11 | replicas: {{ .Values.replicaCount }}
12 | selector:
13 | matchLabels:
14 | app: {{ template "po-service.name" . }}
15 | release: {{ .Release.Name }}
16 | template:
17 | metadata:
18 | labels:
19 | app: {{ template "po-service.name" . }}
20 | release: {{ .Release.Name }}
21 | spec:
22 | volumes:
23 | - name: mysqlcm
24 | secret:
25 | secretName: mysql-secret
26 | items:
27 | - key: database
28 | path: mysqldb.properties
29 | mode: {{ .Values.secret.mode }}
30 | - name: mysqlse
31 | secret:
32 | secretName: mysql-secret
33 | items:
34 | - key: username
35 | path: username.properties
36 | mode: {{ .Values.secret.mode }}
37 | - key: password
38 | path: password.properties
39 | mode: {{ .Values.secret.mode }}
40 | containers:
41 | - name: {{ .Chart.Name }}
42 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
43 | imagePullPolicy: {{ .Values.image.pullPolicy }}
44 | volumeMounts:
45 | - name: mysqlcm
46 | mountPath: /etc/config
47 | - name: mysqlse
48 | mountPath: /etc/vol-secrets
49 | ports:
50 | - name: http
51 | containerPort: {{ .Values.service.targetPort }}
52 | protocol: TCP
53 | env:
54 | - name: DB_HOST
55 | valueFrom:
56 | secretKeyRef:
57 | name: mysql-secret
58 | key: host
59 | - name: DB_HOST_PORT
60 | valueFrom:
61 | secretKeyRef:
62 | name: mysql-secret
63 | key: port
64 | - name: DB_NAME
65 | valueFrom:
66 | secretKeyRef:
67 | name: mysql-secret
68 | key: database
69 | - name: DB_SSL_REQ
70 | valueFrom:
71 | secretKeyRef:
72 | name: mysql-secret
73 | key: sslRequired
74 | - name: SPRING_DATASOURCE_URL
75 | value: "jdbc:mysql://$(DB_HOST):$(DB_HOST_PORT)/$(DB_NAME)?useSSL=true&requireSSL=$(DB_SSL_REQ)"
76 | - name: SPRING_DATASOURCE_USERNAME
77 | valueFrom:
78 | secretKeyRef:
79 | name: mysql-secret
80 | key: username
81 | - name: SPRING_DATASOURCE_PASSWORD
82 | valueFrom:
83 | secretKeyRef:
84 | name: mysql-secret
85 | key: password
86 | resources:
87 | {{ toYaml .Values.resources | indent 12 }}
88 | {{- with .Values.nodeSelector }}
89 | nodeSelector:
90 | {{ toYaml . | indent 8 }}
91 | {{- end }}
92 | {{- with .Values.affinity }}
93 | affinity:
94 | {{ toYaml . | indent 8 }}
95 | {{- end }}
96 | {{- with .Values.tolerations }}
97 | tolerations:
98 | {{ toYaml . | indent 8 }}
99 | {{- end }}
100 |
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/po-service/templates/ingress.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.ingress.enabled -}}
2 | {{- $fullName := include "po-service.fullname" . -}}
3 | {{- $ingressPath := .Values.ingress.path -}}
4 | apiVersion: extensions/v1beta1
5 | kind: Ingress
6 | metadata:
7 | name: {{ $fullName }}
8 | labels:
9 | app: {{ template "po-service.name" . }}
10 | chart: {{ template "po-service.chart" . }}
11 | release: {{ .Release.Name }}
12 | heritage: {{ .Release.Service }}
13 | {{- with .Values.ingress.annotations }}
14 | annotations:
15 | {{ toYaml . | indent 4 }}
16 | {{- end }}
17 | spec:
18 | {{- if .Values.ingress.tls }}
19 | tls:
20 | {{- range .Values.ingress.tls }}
21 | - hosts:
22 | {{- range .hosts }}
23 | - {{ . }}
24 | {{- end }}
25 | secretName: {{ .secretName }}
26 | {{- end }}
27 | {{- end }}
28 | rules:
29 | {{- range .Values.ingress.hosts }}
30 | - host: {{ . }}
31 | http:
32 | paths:
33 | - path: {{ $ingressPath }}
34 | backend:
35 | serviceName: {{ $fullName }}
36 | servicePort: http
37 | {{- end }}
38 | {{- end }}
39 |
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/po-service/templates/service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: {{ template "po-service.fullname" . }}
5 | labels:
6 | app: {{ template "po-service.name" . }}
7 | chart: {{ template "po-service.chart" . }}
8 | release: {{ .Release.Name }}
9 | heritage: {{ .Release.Service }}
10 | spec:
11 | type: {{ .Values.service.type }}
12 | ports:
13 | - port: {{ .Values.service.port }}
14 | targetPort: {{ .Values.service.targetPort }}
15 | protocol: TCP
16 | name: http
17 | selector:
18 | app: {{ template "po-service.name" . }}
19 | release: {{ .Release.Name }}
20 |
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/po-service/values.yaml:
--------------------------------------------------------------------------------
1 | # Default values for po-service.
2 | # This is a YAML-formatted file.
3 | # Declare variables to be passed into your templates.
4 |
5 | replicaCount: 1
6 |
7 | image:
8 | repository: mtcslabtest.azurecr.io/po-service
9 | tag: latest
10 | pullPolicy: Always
11 |
12 | service:
13 | type: ClusterIP
14 | port: 80
15 | targetPort: 8080
16 |
17 | secret:
18 | mode: 511
19 |
20 | ingress:
21 | enabled: true
22 | name: po-service
23 | annotations:
24 | kubernetes.io/ingress.class: addon-http-application-routing
25 | # kubernetes.io/ingress.class: nginx
26 | # kubernetes.io/tls-acme: "true"
27 | path: /orders
28 | hosts:
29 | - po-service.033185fc7e8b483fae46.westus.aksapp.io
30 | tls:
31 | - secretName: po-ssh-secret
32 | hosts:
33 | - po-service.033185fc7e8b483fae46.westus.aksapp.io
34 |
35 | resources: {}
36 | # We usually recommend not to specify default resources and to leave this as a conscious
37 | # choice for the user. This also increases chances charts run on environments with little
38 | # resources, such as Minikube. If you do want to specify resources, uncomment the following
39 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
40 | # limits:
41 | # cpu: 100m
42 | # memory: 512Mi
43 | # requests:
44 | # cpu: 100m
45 | # memory: 128Mi
46 |
47 | nodeSelector: {}
48 |
49 | tolerations: []
50 |
51 | affinity: {}
52 |
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/shell-scripts/create-aci.sh:
--------------------------------------------------------------------------------
1 | az container create -g myResourceGroup -n po-service-aci-group \
2 | --image mtcslabtest.azurecr.io/po-service:latest \
3 | --cpu 1 --memory 1 \
4 | --registry-login-server mtcslabtest.azurecr.io \
5 | --registry-username mtcslabtest \
6 | --registry-password "xyz" \
7 | --secrets username.properties="xyz" password.properties="abc" --secrets-mount-path /etc/vol-secrets \
8 | --dns-name-label po-service-demo \
9 | --command-line "/bin/bash -c 'java -Dspring.datasource.url=\"jdbc:mysql://host:3306/database?useSSL=true&requireSSL=true\" -Dspring.datasource.password=\"xyz\" -Dspring.datasource.username=\"xyz\" -jar ./po-rest-service-1.0.jar'" \
10 | --restart-policy OnFailure \
11 | --ports 8080
12 |
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/shell-scripts/create-sp-sub.sh:
--------------------------------------------------------------------------------
1 | # Get user's subscription ID
2 | SUB_ID=$(az account show --query id --output tsv)
3 |
4 | # Create the SP and assign 'Contributor' role access to the user's subscription
5 | az ad sp create-for-rbac --scopes $SUB_ID --role Contributor --name sp-sub-contributor >> SP_SUB.txt
6 |
7 | cat ./SP_SUB.txt
8 |
--------------------------------------------------------------------------------
/extensions/po-deploy-azuredb-mysql/shell-scripts/delete-aci.sh:
--------------------------------------------------------------------------------
1 | az container delete -n po-service-aci-group -g myResourceGroup
2 |
--------------------------------------------------------------------------------
/images/A-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/A-01.png
--------------------------------------------------------------------------------
/images/A-02.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/A-02.PNG
--------------------------------------------------------------------------------
/images/A-03.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/A-03.PNG
--------------------------------------------------------------------------------
/images/A-05.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/A-05.PNG
--------------------------------------------------------------------------------
/images/A-06.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/A-06.PNG
--------------------------------------------------------------------------------
/images/A-07.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/A-07.PNG
--------------------------------------------------------------------------------
/images/A-08.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/A-08.PNG
--------------------------------------------------------------------------------
/images/A-09.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/A-09.PNG
--------------------------------------------------------------------------------
/images/A-10.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/A-10.PNG
--------------------------------------------------------------------------------
/images/A-11.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/A-11.PNG
--------------------------------------------------------------------------------
/images/A-12.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/A-12.PNG
--------------------------------------------------------------------------------
/images/A-14.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/A-14.PNG
--------------------------------------------------------------------------------
/images/A-15.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/A-15.PNG
--------------------------------------------------------------------------------
/images/A-17.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/A-17.PNG
--------------------------------------------------------------------------------
/images/A-18.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/A-18.PNG
--------------------------------------------------------------------------------
/images/A-19.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/A-19.PNG
--------------------------------------------------------------------------------
/images/A-20.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/A-20.PNG
--------------------------------------------------------------------------------
/images/A-21.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/A-21.PNG
--------------------------------------------------------------------------------
/images/A-81.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/A-81.PNG
--------------------------------------------------------------------------------
/images/A-82.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/A-82.PNG
--------------------------------------------------------------------------------
/images/B-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/B-01.png
--------------------------------------------------------------------------------
/images/B-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/B-02.png
--------------------------------------------------------------------------------
/images/C-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/C-01.png
--------------------------------------------------------------------------------
/images/C-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/C-02.png
--------------------------------------------------------------------------------
/images/D-01.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/D-01.PNG
--------------------------------------------------------------------------------
/images/D-02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/D-02.png
--------------------------------------------------------------------------------
/images/D-03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/D-03.png
--------------------------------------------------------------------------------
/images/D-04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/D-04.png
--------------------------------------------------------------------------------
/images/E-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/E-01.png
--------------------------------------------------------------------------------
/images/E-02.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/E-02.PNG
--------------------------------------------------------------------------------
/images/E-03.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/E-03.PNG
--------------------------------------------------------------------------------
/images/E-04.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/E-04.PNG
--------------------------------------------------------------------------------
/images/E-05.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/E-05.PNG
--------------------------------------------------------------------------------
/images/E-051.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/E-051.PNG
--------------------------------------------------------------------------------
/images/E-06.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/E-06.PNG
--------------------------------------------------------------------------------
/images/E-07.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/E-07.PNG
--------------------------------------------------------------------------------
/images/E-071.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/E-071.PNG
--------------------------------------------------------------------------------
/images/E-08.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/E-08.PNG
--------------------------------------------------------------------------------
/images/E-09.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/E-09.PNG
--------------------------------------------------------------------------------
/images/E-10.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/E-10.PNG
--------------------------------------------------------------------------------
/images/E-11.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/E-11.PNG
--------------------------------------------------------------------------------
/images/E-12.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/E-12.PNG
--------------------------------------------------------------------------------
/images/E-13.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/E-13.PNG
--------------------------------------------------------------------------------
/images/E-14.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/E-14.PNG
--------------------------------------------------------------------------------
/images/E-16.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/E-16.PNG
--------------------------------------------------------------------------------
/images/E-17.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/E-17.PNG
--------------------------------------------------------------------------------
/images/E-18.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/E-18.PNG
--------------------------------------------------------------------------------
/images/E-19.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/E-19.PNG
--------------------------------------------------------------------------------
/images/SB-VSTS-AKS.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/SB-VSTS-AKS.jpg
--------------------------------------------------------------------------------
/images/SB-VSTS-AKS_v2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/SB-VSTS-AKS_v2.jpg
--------------------------------------------------------------------------------
/images/Steps.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/Steps.jpg
--------------------------------------------------------------------------------
/images/k8s-springboot-data-rest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ganrad/k8s-springboot-data-rest/92d297e99328b2f9c8ef4fa5ac76cf1ffb8c7852/images/k8s-springboot-data-rest.png
--------------------------------------------------------------------------------
/images/k8s-springboot-data-rest.xml:
--------------------------------------------------------------------------------
1 | 7Vxbc6M4Fv41qZp9sIubwDwmTiddNend9GZ2ZufJhUHGmgFEc0ns/vUrAcIgyTaxhdvdvU5VYoS46Hznpk9HuTHn8eYx89L1JxzA6MbQgs2NeX9jGK5rkd+0YVs3zCyzbggzFNRN+q7hBX2FTaPWtJYogHmvY4FxVKC03+jjJIF+0Wvzsgy/9butcNR/auqFUGh48b1IbP0DBcW6GQXQdu0fIQrX7Mm61pxZev7fYYbLpHnejWGuqk99OvbYvZr++doL8FunyfxwY84zjIv6W7yZw4iKlomtvu5hz9n2vTOYFEMuMOoLXr2ohOyNq/cqtkwW1Wgg7a/fmHdva1TAl9Tz6dk3Aj5pWxdx1JxeoSia4whn1bWm70NAxm7e5UWG/4adM6Ztuia56V2YeQEib9s510hsd+4eZQRlhBNyPsEZleGdONJm8K8wK+Cm09SM/BHiGBbZlnRhZ80GhUZLDbs5ftthbrM+6w7e5qxp9Bo9C9t772RNvjTi3iN6V7HsaxkzfTVENGD1OYiGAqkC2+lJFQBLkKouk6qjQKi69WMK1XT6qmrpFxTqxWW6AvRHJlO7+tArcM9l1B9FCszG18jatES30Drwrqx1xzpf2OC4sNugoZEBB16+rgSvyYTMRJTghOpo5C1h9Ixz1DhTn0gJkvN3VDqIxL8nrsMSFwWOOx1uIxTSEwWmoHrNUXsf8mopfct4E9LEYBrnvgenfoTLYEqCdeGhBGaLHGaviCoHD7ymOe69rQhGs++HTOAIMAKZc7fPB3EmgJjiCRu1of3yjIN/nBloiTBfmmslgXflrhx6qwNeSbTCEYRu2bbop1yZ1FU4f/MnsJ0MhiinghnVeNoMh+FoG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ZLmCVEfXp7Lr6bQi8Foc3WTM6/iaFN1xxRp/nSEGWxDRhjxLa9oroS2+ZTwJMndPyNwMAJnTLzG6UES/mW8uMleuCq9IMv0bPdE/XD5IKIzSep6vTjr6h4KjKwKDeform/ePr8+OlNxsu1u95+g178HW0BFbysRNP2Ol6dLcMf2gIq+6dwJyxYkcPdfwCtgdz9l1Xzw/8A
--------------------------------------------------------------------------------
/k8s-scripts/app-deploy-pull-secrets.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ConfigMap
3 | metadata:
4 | name: mysql-db-name
5 | data:
6 | mysqldb.properties: |
7 | mysql.dbname=sampledb
8 | ---
9 | apiVersion: v1
10 | kind: Secret
11 | metadata:
12 | name: mysql-secret
13 | type: Opaque
14 | data:
15 | username.properties: bXlzcWwudXNlcj1teXNxbAo=
16 | password.properties: bXlzcWwucGFzc3dvcmQ9cGFzc3dvcmQK
17 | ---
18 | apiVersion: apps/v1
19 | kind: Deployment
20 | metadata:
21 | name: po-service
22 | labels:
23 | app: po-service
24 | spec:
25 | replicas: 1
26 | selector:
27 | matchLabels:
28 | app: po-service
29 | template:
30 | metadata:
31 | labels:
32 | app: po-service
33 | spec:
34 | volumes:
35 | - name: mysqlcm
36 | configMap:
37 | name: mysql-db-name
38 | - name: mysqlse
39 | secret:
40 | secretName: mysql-secret
41 | containers:
42 | - name: po-service
43 | image: mtcslabtest.azurecr.io/po-service:latest
44 | ports:
45 | - containerPort: 8080
46 | protocol: TCP
47 | volumeMounts:
48 | - name: mysqlcm
49 | mountPath: /etc/config
50 | - name: mysqlse
51 | mountPath: /etc/vol-secrets
52 | imagePullSecrets:
53 | - name: acr-registry
54 | ---
55 | kind: Service
56 | apiVersion: v1
57 | metadata:
58 | name: po-service
59 | spec:
60 | type: LoadBalancer
61 | selector:
62 | app: po-service
63 | ports:
64 | - name: 80-tcp
65 | protocol: TCP
66 | port: 80
67 | targetPort: 8080
68 |
--------------------------------------------------------------------------------
/k8s-scripts/app-deploy.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ConfigMap
3 | metadata:
4 | name: mysql-db-name
5 | data:
6 | mysqldb.properties: |
7 | mysql.dbname=sampledb
8 | ---
9 | apiVersion: v1
10 | kind: Secret
11 | metadata:
12 | name: mysql-secret
13 | type: Opaque
14 | data:
15 | username.properties: bXlzcWwudXNlcj1teXNxbAo=
16 | password.properties: bXlzcWwucGFzc3dvcmQ9cGFzc3dvcmQK
17 | ---
18 | apiVersion: apps/v1
19 | kind: Deployment
20 | metadata:
21 | name: po-service
22 | labels:
23 | app: po-service
24 | spec:
25 | replicas: 1
26 | selector:
27 | matchLabels:
28 | app: po-service
29 | template:
30 | metadata:
31 | labels:
32 | app: po-service
33 | spec:
34 | volumes:
35 | - name: mysqlcm
36 | configMap:
37 | name: mysql-db-name
38 | - name: mysqlse
39 | secret:
40 | secretName: mysql-secret
41 | containers:
42 | - name: po-service
43 | image: sep21taacr.azurecr.io/po-service:latest
44 | ports:
45 | - containerPort: 8080
46 | protocol: TCP
47 | volumeMounts:
48 | - name: mysqlcm
49 | mountPath: /etc/config
50 | - name: mysqlse
51 | mountPath: /etc/vol-secrets
52 | ---
53 | kind: Service
54 | apiVersion: v1
55 | metadata:
56 | name: po-service
57 | spec:
58 | type: LoadBalancer
59 | selector:
60 | app: po-service
61 | ports:
62 | - name: 80-tcp
63 | protocol: TCP
64 | port: 80
65 | targetPort: 8080
66 |
--------------------------------------------------------------------------------
/k8s-scripts/app-deploy_v1.8.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ConfigMap
3 | metadata:
4 | name: mysql-db-name
5 | data:
6 | mysqldb.properties: |
7 | mysql.dbname=sampledb
8 | ---
9 | apiVersion: v1
10 | kind: Secret
11 | metadata:
12 | name: mysql-secret
13 | type: Opaque
14 | data:
15 | username.properties: bXlzcWwudXNlcj1teXNxbAo=
16 | password.properties: bXlzcWwucGFzc3dvcmQ9cGFzc3dvcmQK
17 | ---
18 | apiVersion: v1
19 | kind: ReplicationController
20 | metadata:
21 | name: po-service
22 | labels:
23 | app: po-service
24 | spec:
25 | replicas: 1
26 | selector:
27 | app: po-service
28 | template:
29 | metadata:
30 | name: po-service
31 | labels:
32 | app: po-service
33 | spec:
34 | volumes:
35 | - name: mysqlcm
36 | configMap:
37 | name: mysql-db-name
38 | - name: mysqlse
39 | secret:
40 | secretName: mysql-secret
41 | containers:
42 | - name: po-service
43 | image: mtcslabtest.azurecr.io/po-service:latest
44 | ports:
45 | - containerPort: 8080
46 | protocol: TCP
47 | volumeMounts:
48 | - name: mysqlcm
49 | mountPath: /etc/config
50 | - name: mysqlse
51 | mountPath: /etc/vol-secrets
52 | imagePullSecrets:
53 | - name: acr-registry
54 | ---
55 | kind: Service
56 | apiVersion: v1
57 | metadata:
58 | name: po-service
59 | spec:
60 | type: LoadBalancer
61 | selector:
62 | app: po-service
63 | ports:
64 | - name: 80-tcp
65 | protocol: TCP
66 | port: 80
67 | targetPort: 8080
68 |
--------------------------------------------------------------------------------
/k8s-scripts/app-update-deploy.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: Deployment
3 | metadata:
4 | name: po-service
5 | labels:
6 | app: po-service
7 | spec:
8 | replicas: 1
9 | selector:
10 | matchLabels:
11 | app: po-service
12 | template:
13 | metadata:
14 | labels:
15 | app: po-service
16 | spec:
17 | volumes:
18 | - name: mysqlcm
19 | configMap:
20 | name: mysql-db-name
21 | - name: mysqlse
22 | secret:
23 | secretName: mysql-secret
24 | containers:
25 | - name: po-service
26 | image: sep21taacr.azurecr.io/po-service:__Build.BuildNumber__
27 | ports:
28 | - containerPort: 8080
29 | protocol: TCP
30 | volumeMounts:
31 | - name: mysqlcm
32 | mountPath: /etc/config
33 | - name: mysqlse
34 | mountPath: /etc/vol-secrets
35 |
--------------------------------------------------------------------------------
/k8s-scripts/dev-namespace.json:
--------------------------------------------------------------------------------
1 | {
2 | "kind": "Namespace",
3 | "apiVersion": "v1",
4 | "metadata": {
5 | "name": "development",
6 | "labels": {
7 | "name": "development"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/k8s-scripts/mysql-deploy.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Secret
3 | metadata:
4 | name: mysql
5 | type: Opaque
6 | data:
7 | database-name: c2FtcGxlZGI=
8 | database-password: cGFzc3dvcmQ=
9 | database-root-password: cGFzc3dvcmQ=
10 | database-user: bXlzcWw=
11 | ---
12 | kind: Service
13 | apiVersion: v1
14 | metadata:
15 | name: mysql
16 | spec:
17 | selector:
18 | app: mysql
19 | ports:
20 | - protocol: TCP
21 | port: 3306
22 | targetPort: 3306
23 | ---
24 | apiVersion: apps/v1
25 | kind: Deployment
26 | metadata:
27 | name: mysql
28 | labels:
29 | app: mysql-ephemeral
30 | spec:
31 | replicas: 1
32 | selector:
33 | matchLabels:
34 | app: mysql
35 | template:
36 | metadata:
37 | labels:
38 | app: mysql
39 | spec:
40 | containers:
41 | - name: mysql
42 | image: mysql/mysql-server:5.7.22
43 | ports:
44 | - containerPort: 3306
45 | protocol: TCP
46 | env:
47 | - name: MYSQL_USER
48 | valueFrom:
49 | secretKeyRef:
50 | name: mysql
51 | key: database-user
52 | - name: MYSQL_PASSWORD
53 | valueFrom:
54 | secretKeyRef:
55 | name: mysql
56 | key: database-password
57 | - name: MYSQL_ROOT_PASSWORD
58 | valueFrom:
59 | secretKeyRef:
60 | name: mysql
61 | key: database-root-password
62 | - name: MYSQL_DATABASE
63 | valueFrom:
64 | secretKeyRef:
65 | name: mysql
66 | key: database-name
67 |
--------------------------------------------------------------------------------
/k8s-scripts/mysql-deploy_v1.8.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Secret
3 | metadata:
4 | name: mysql
5 | type: Opaque
6 | data:
7 | database-name: c2FtcGxlZGI=
8 | database-password: cGFzc3dvcmQ=
9 | database-root-password: cGFzc3dvcmQ=
10 | database-user: bXlzcWw=
11 | ---
12 | kind: Service
13 | apiVersion: v1
14 | metadata:
15 | name: mysql
16 | spec:
17 | selector:
18 | app: mysql
19 | ports:
20 | - protocol: TCP
21 | port: 3306
22 | targetPort: 3306
23 | ---
24 | apiVersion: v1
25 | kind: ReplicationController
26 | metadata:
27 | name: mysql
28 | spec:
29 | replicas: 1
30 | selector:
31 | app: mysql
32 | template:
33 | metadata:
34 | name: mysql
35 | labels:
36 | app: mysql
37 | spec:
38 | containers:
39 | - name: mysql
40 | image: mysql/mysql-server:5.7.22
41 | ports:
42 | - containerPort: 3306
43 | protocol: TCP
44 | env:
45 | - name: MYSQL_USER
46 | valueFrom:
47 | secretKeyRef:
48 | name: mysql
49 | key: database-user
50 | - name: MYSQL_PASSWORD
51 | valueFrom:
52 | secretKeyRef:
53 | name: mysql
54 | key: database-password
55 | - name: MYSQL_ROOT_PASSWORD
56 | valueFrom:
57 | secretKeyRef:
58 | name: mysql
59 | key: database-root-password
60 | - name: MYSQL_DATABASE
61 | valueFrom:
62 | secretKeyRef:
63 | name: mysql
64 | key: database-name
65 |
--------------------------------------------------------------------------------
/k8s-scripts/mysqldb.properties:
--------------------------------------------------------------------------------
1 | mysql.dbname=sampledb
2 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 |
6 | ocp.s2i.springboot.rest
7 | po-rest-service
8 | 1.0
9 |
10 |
11 | org.springframework.boot
12 | spring-boot-starter-parent
13 | 1.5.8.RELEASE
14 |
15 |
16 |
17 | 1.8
18 |
19 |
20 |
21 |
22 | org.springframework.boot
23 | spring-boot-starter-data-rest
24 |
25 |
26 | org.springframework.boot
27 | spring-boot-starter-data-jpa
28 |
29 |
30 | org.springframework.boot
31 | spring-boot-starter-test
32 | test
33 |
34 |
35 | mysql
36 | mysql-connector-java
37 |
38 |
39 |
40 |
41 |
42 |
43 | org.springframework.boot
44 | spring-boot-maven-plugin
45 |
46 |
47 |
48 |
49 |
50 |
51 | spring-releases
52 | https://repo.spring.io/libs-release
53 |
54 |
55 |
56 |
57 | spring-releases
58 | https://repo.spring.io/libs-release
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/shell-scripts/acr-auth.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Before running this script, specify correct values for the following 4 variables !!!!
4 | AKS_RESOURCE_GROUP=MTC-TA-Sep21-RG
5 | AKS_CLUSTER_NAME=tacluster
6 | ACR_RESOURCE_GROUP=MTC-TA-Sep21-RG
7 | ACR_NAME=sep21taACR
8 |
9 | # Get the id of the service principal configured for AKS
10 | CLIENT_ID=$(az aks show --resource-group $AKS_RESOURCE_GROUP --name $AKS_CLUSTER_NAME --query "servicePrincipalProfile.clientId" --output tsv)
11 |
12 | # Get the ACR registry resource id
13 | ACR_ID=$(az acr show --name $ACR_NAME --resource-group $ACR_RESOURCE_GROUP --query "id" --output tsv)
14 |
15 | # Create role assignment
16 | az role assignment create --assignee $CLIENT_ID --role Reader --scope $ACR_ID
17 |
18 | echo "CLIENT_ID_SP: $CLIENT_ID"
19 | echo "ACR_ID: $ACR_ID"
20 |
--------------------------------------------------------------------------------
/shell-scripts/jenkins-acr-auth.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Before running this script, specify correct values for the following 2 variables !!!!
4 | ACR_RESOURCE_GROUP=ACR-RG-NAME
5 | ACR_NAME=ACR-NAME
6 |
7 | # Get the ACR registry resource id
8 | ACR_ID=$(az acr show --name $ACR_NAME --resource-group $ACR_RESOURCE_GROUP --query "id" --output tsv)
9 | SP_ID=sp-$ACR_NAME
10 |
11 | # Create the service principal with "Contributor" role acccess to the ACR and save the output
12 | # to a file SP_ACR.txt in current directory
13 | az ad sp create-for-rbac --scopes $ACR_ID --role Contributor --name $SP_ID >> SP_ACR.txt
14 |
15 | cat ./SP_ACR.txt
16 |
--------------------------------------------------------------------------------
/shell-scripts/setup-bastion.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # Author: Ganesh Radhakrishnan, garadha@microsoft.com
3 | # Dated: 10-05-2018
4 | # Notes:
5 | # 1. Make sure you run this script in your home directory (of the logged in user)!
6 | #
7 |
8 | set -e
9 |
10 | if [ $# -ne 2 ]; then
11 | echo -e "\nUsage: setup-bastion.sh "
12 | echo -e "\tMissing arguments : Azure User name and/or password"
13 | exit 1
14 | fi
15 |
16 | # Set the user name variable
17 | USER=`whoami`
18 |
19 | # Install Azure CLI on this VM so that we can to deploy this application to the AKS cluster later in step [D].
20 | #
21 | # Import the Microsoft repository key.
22 | sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
23 | #
24 | # Create the local azure-cli repository information.
25 | sudo sh -c 'echo -e "[azure-cli]\nname=Azure CLI\nbaseurl=https://packages.microsoft.com/yumrepos/azure-cli\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/azure-cli.repo'
26 | #
27 | # Install with the yum install command.
28 | echo "Installing Azure CLI"
29 | sudo yum -y install azure-cli
30 | #
31 | # Test the install
32 | echo "Printing Azure CLI version"
33 | az -v
34 | #
35 | # Login to your Azure account
36 | echo "Logging into Azure using CLI"
37 | az login -u $1 -p $2
38 | #
39 | # View help on az commands, sub-commands
40 | echo "Listing Azure CLI commands"
41 | az --help
42 | #
43 | # Install Git client
44 | echo "Installing GIT client"
45 | sudo yum -y install git
46 | #
47 | # Check Git version number
48 | echo "Printing GIT version"
49 | git --version
50 | #
51 | # Install OpenJDK 8 on the VM.
52 | echo "Installing OpenJDK v1.8.0"
53 | sudo yum install -y java-1.8.0-openjdk-devel
54 | #
55 | # Check JDK version
56 | echo "Printing OpenJDK version"
57 | java -version
58 | #
59 | # Install Jenkins 2.138.1
60 | echo "Installing Jenkins"
61 | mkdir jenkins
62 | cd jenkins
63 | wget http://mirrors.jenkins.io/war-stable/latest/jenkins.war
64 | #
65 | # Switch back to home directory
66 | cd
67 | #
68 | # Install Maven 3.5.4
69 | echo "Installing Maven"
70 | mkdir maven
71 | cd maven
72 | wget http://www-eu.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz
73 | tar -xzvf apache-maven-3.5.4-bin.tar.gz
74 | #
75 | # Switch back to home directory
76 | cd
77 | #
78 | # Install Helm v2.11.0
79 | # Create a new directory 'Helm' under home directory to store the helm binary
80 | echo "Installing Helm"
81 | mkdir helm
82 | cd helm
83 | wget https://storage.googleapis.com/kubernetes-helm/helm-v2.11.0-linux-amd64.tar.gz
84 | tar -xzvf helm-v2.11.0-linux-amd64.tar.gz
85 | #
86 | # Switch back to home directory
87 | cd
88 | #
89 | # Install Kubernetes CLI
90 | # Create a new directory 'aztools' under home directory to store the kubectl binary
91 | mkdir aztools
92 | #
93 | # Install kubectl binary in the new directory
94 | echo "Installing Kubectl"
95 | az aks install-cli --install-location=./aztools/kubectl
96 | #
97 | # Install Kubernetes Service Catalog 'svcat' binary in 'aztools' directory
98 | echo "Installing Kubernetes Service Catalog"
99 | $ cd aztools
100 | $ curl -sLO https://servicecatalogcli.blob.core.windows.net/cli/latest/$(uname -s)/$(uname -m)/svcat
101 | $ chmod +x ./svcat
102 | # Switch back to home directory
103 | $ cd
104 | # Finally, update '.bashrc' file and set the path to Maven, Helm and Kubectl binaries
105 | echo "Configuring PATH ..."
106 | cd
107 | KUBECLI=/home/${USER}/aztools
108 | MAVEN=/home/${USER}/maven/apache-maven-3.5.4/bin
109 | HELM=/home/${USER}/helm/linux-amd64
110 | echo "export PATH=$MAVEN:$KUBECLI:$HELM:${PATH}" >> ~/.bashrc
111 | echo "Configuration of jump-host environment completed!"
112 | # End
113 |
--------------------------------------------------------------------------------
/src/Dockerfile:
--------------------------------------------------------------------------------
1 | # Springboot Service : 03-29-2018
2 | #
3 | # po-rest-service
4 | #
5 |
6 | FROM centos:latest
7 | MAINTAINER Ganesh Radhakrishnan ganrad01@gmail.com
8 |
9 | # Builder version
10 | ENV BUILDER_VERSION 1.0
11 | LABEL io.k8s.description="Base image for running a Java Spring Boot application" \
12 | io.k8s.display-name="Purchase Order (RESTFul) Service Spring Boot Application 1.0" \
13 | io.openshift.expose-services="8080:http" \
14 | io.openshift.tags="Java,Springboot"
15 |
16 | # Install required util packages
17 | RUN yum -y update; \
18 | yum install ca-certificates -y; \
19 | yum install sudo -y; \
20 | yum clean all -y
21 |
22 | # Install OpenJDK 1.8, create required directories.
23 | RUN yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel && \
24 | yum clean all -y && \
25 | mkdir -p /home/apps
26 |
27 | # Change working directory
28 | WORKDIR /home/apps
29 |
30 | # For Spring Boot, there should only be 1 fat jar
31 | ADD ./target/po-rest-service-1.0.jar /home/apps/po-rest-service-1.0.jar
32 |
33 | # Run the po-rest-service application
34 | CMD java -jar ./po-rest-service-1.0.jar
35 |
--------------------------------------------------------------------------------
/src/main/java/ocp/s2i/springboot/rest/Application.java:
--------------------------------------------------------------------------------
1 | package ocp.s2i.springboot.rest;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/java/ocp/s2i/springboot/rest/config/PropertiesConfiguration.java:
--------------------------------------------------------------------------------
1 | package ocp.s2i.springboot.rest.config;
2 |
3 | // import java.util.List;
4 | // import java.util.ArrayList;
5 | // import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
6 | // import org.springframework.core.io.Resource;
7 | // import org.springframework.core.io.FileSystemResource;
8 | import org.springframework.context.annotation.*;
9 | import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
10 |
11 | @Configuration
12 | @PropertySource("file:/etc/vol-secrets/username.properties")
13 | @PropertySource("file:/etc/vol-secrets/password.properties")
14 | @PropertySource("file:/etc/config/mysqldb.properties")
15 | public class PropertiesConfiguration {
16 |
17 |
18 | /** @Bean
19 | public PropertyPlaceholderConfigurer properties() {
20 | final PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
21 | // ppc.setIgnoreUnresolvablePlaceholders(true);
22 | ppc.setIgnoreResourceNotFound(true);
23 |
24 | final List resourceLst = new ArrayList();
25 |
26 | // resourceLst.add(new ClassPathResource("myapp_base.properties"));
27 | resourceLst.add(new FileSystemResource("/etc/vol-secrets/username.properties"));
28 | resourceLst.add(new FileSystemResource("/etc/vol-secrets/password.properties"));
29 | // resourceLst.add(new ClassPathResource("myapp_test.properties"));
30 | // resourceLst.add(new ClassPathResource("myapp_developer_overrides.properties")); // for Developer debugging.
31 |
32 | ppc.setLocations(resourceLst.toArray(new Resource[]{}));
33 |
34 | return ppc;
35 | } */
36 |
37 | @Bean
38 | public static PropertySourcesPlaceholderConfigurer propertyConfig() {
39 | return new PropertySourcesPlaceholderConfigurer();
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/ocp/s2i/springboot/rest/model/PORepository.java:
--------------------------------------------------------------------------------
1 | package ocp.s2i.springboot.rest.model;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.data.repository.PagingAndSortingRepository;
6 | import org.springframework.data.repository.query.Param;
7 | import org.springframework.data.rest.core.annotation.RepositoryRestResource;
8 |
9 | @RepositoryRestResource(collectionResourceRel = "orders", path = "orders")
10 | public interface PORepository extends PagingAndSortingRepository {
11 |
12 | List getByItem(@Param("item") String item);
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/main/java/ocp/s2i/springboot/rest/model/PurchaseOrder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2005-2016 Red Hat, Inc.
3 | *
4 | * Red Hat licenses this file to you under the Apache License, version
5 | * 2.0 (the "License"); you may not use this file except in compliance
6 | * with the License. You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | */
16 | package ocp.s2i.springboot.rest.model;
17 |
18 | import javax.persistence.Entity;
19 | import javax.persistence.GeneratedValue;
20 | import javax.persistence.GenerationType;
21 | import javax.persistence.Id;
22 |
23 | @Entity
24 | public class PurchaseOrder {
25 |
26 | @Id
27 | @GeneratedValue(strategy = GenerationType.AUTO)
28 | private Long id;
29 | private String item;
30 | private Float price;
31 | private Integer quantity;
32 | private String description;
33 | private String cname; // Customer name
34 | private String dcode; // Discount code
35 | private String origin;
36 |
37 | public Long getId() {
38 | return id;
39 | }
40 |
41 | public void setId(Long id) {
42 | this.id = id;
43 | }
44 |
45 | public String getItem() {
46 | return item;
47 | }
48 |
49 | public void setItem(String item) {
50 | this.item = item;
51 | }
52 |
53 | public Float getPrice() {
54 | return price;
55 | }
56 |
57 | public void setPrice(Float price) {
58 | this.price = price;
59 | }
60 |
61 | public Integer getQuantity() {
62 | return quantity;
63 | }
64 | public void setQuantity(Integer quantity) {
65 | this.quantity = quantity;
66 | }
67 |
68 | public String getDescription() {
69 | return description;
70 | }
71 |
72 | public void setDescription(String description) {
73 | this.description = description;
74 | }
75 |
76 | public String getCname() {
77 | return cname;
78 | }
79 |
80 | public void setCname(String cname) {
81 | this.cname = cname;
82 | }
83 |
84 | public String getDcode() {
85 | return dcode;
86 | }
87 |
88 | public void setDcode(String dcode) {
89 | this.dcode = dcode;
90 | }
91 |
92 | public String getOrigin() {
93 | return origin;
94 | }
95 |
96 | public void setOrigin(String origin) {
97 | this.origin = origin;
98 | }
99 |
100 | // Uncomment this method for retrieving order total !!
101 | /**
102 | public Float getDiscountAmount() {
103 | return ( (this.price * this.quantity) * ( Float.parseFloat(this.dcode) / 100 ) );
104 | }
105 |
106 | public Float getOrderTotal() {
107 | return ( (this.price * this.quantity) - getDiscountAmount() );
108 | }
109 | */
110 |
111 | public String toString() {
112 | StringBuffer sb = new StringBuffer();
113 | sb.append(
114 | "ID=" + getId() + ", " +
115 | "Item=" + getItem() + ", " +
116 | "Customer=" + getCname() + ", " +
117 | "Quantity=" + getQuantity() + ", " +
118 | "Origin=" + getOrigin());
119 | return(sb.toString());
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.jpa.hibernate.ddl-auto=none
2 | spring.datasource.url=jdbc:mysql://__svc.name.k8s.namespace__.svc.cluster.local:${MYSQL_SERVICE_PORT}/${mysql.dbname}
3 | spring.datasource.username=${mysql.user}
4 | spring.datasource.password=${mysql.password}
5 | spring.jpa.show-sql=true
6 |
--------------------------------------------------------------------------------
/src/main/resources/data.sql:
--------------------------------------------------------------------------------
1 | INSERT INTO purchase_order (item, price, quantity, description, cname, dcode) VALUES ("Breakfast Blend", 24.50, 2, "Breakfast blend coffee", "Customer one", "10");
2 | INSERT INTO purchase_order (item, price, quantity, description, cname, dcode) VALUES ("Colombia", 25.50, 2, "Drink anytime coffee", "Customer two", "8");
3 |
--------------------------------------------------------------------------------
/src/main/resources/schema.sql:
--------------------------------------------------------------------------------
1 | drop table if exists purchase_order;
2 |
3 | create table purchase_order (
4 | id integer NOT NULL AUTO_INCREMENT,
5 | item varchar(50) NOT NULL,
6 | price float,
7 | quantity integer,
8 | description varchar(30),
9 | cname varchar(30) NOT NULL,
10 | dcode varchar(10),
11 | origin varchar(15) NOT NULL DEFAULT 'Web',
12 | primary key (id)
13 | );
14 |
--------------------------------------------------------------------------------
/test-scripts/delete-order.sh:
--------------------------------------------------------------------------------
1 | curl -i -X DELETE http://52.168.95.200/orders/1
2 |
--------------------------------------------------------------------------------
/test-scripts/get-order.sh:
--------------------------------------------------------------------------------
1 | curl -i -X GET http://52.168.95.200/orders/1
2 |
--------------------------------------------------------------------------------
/test-scripts/get-orders.sh:
--------------------------------------------------------------------------------
1 | curl -i -X GET http://52.168.95.200/orders
2 |
--------------------------------------------------------------------------------
/test-scripts/post-order.sh:
--------------------------------------------------------------------------------
1 | curl -i -X POST -H "Content-Type:application/json" -d "{ \"item\" : \"Ethiopia Blend\", \"price\" : 28.75, \"quantity\" : 80, \"description\" : \"Medium Roast Ethiopian\", \"cname\" : \"Acme Corporation\", \"dcode\" : \"8%\", \"origin\" : \"SAP\"}" http://52.168.95.200/orders
2 |
--------------------------------------------------------------------------------
/test-scripts/search-by-item.sh:
--------------------------------------------------------------------------------
1 | curl -i http://52.168.95.200/orders/search/getByItem?item=Ethiopia%20Blend
2 |
--------------------------------------------------------------------------------
/test-scripts/update-order.sh:
--------------------------------------------------------------------------------
1 | curl -i -X PATCH -H "Content-Type:application/json" -d "{ \"price\" : 26.75, \"quantity\" : 60, \"dcode\" : \"6%\"}" http://52.168.95.200/orders/1
2 |
--------------------------------------------------------------------------------