Connection between AWS and Azure using SIte-to-Site VPN
Create Secret to be used for pull image from Azure ACR
kubectl create secret docker-registry devopsmelacr132827a7-auth --docker-server=https://akscontainerregistry2405.azurecr.io --docker-username=akscontainerregistry2405 --docker-password=iXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXp -n demo
Create Secret for tls cerficates to be used in Ingress Rule
kubectl create secret tls ingress-secret --key mykey.key --cert STAR_singhritesh85_com.crt -n demo
Follow below steps to make your Azure DevOps Agent ready.
Install git2
Create a user demo and provide sudo privileges from sudoers file.
Install Java-17
Install Maven
Install Docker
Install self hosted agent pool (You can create self hosted agent pool either at Organisation level or at project level)
Copy kubeconfig from Terraform-Server to Azure DevOps Self-Hosted Agent and Install kubectl and helm
Install trivy for Docker Image Scan
Create three service connections as shown in the screenshot below
To Send Notification on Group Email ID go project Settings or Organisation Settings (For Global Notification) then got to Notifications and New Subscription and create a new Subscription with custom Email ID
Adding below lines to pom.xml for storing Artifacts to Azure Artifactory
Add endpoint, username and password of MySQL RDS to the file login.jsp and userRegistration.jsp as shown in the screenshot below
Prometheus and Grafana Configuration
Using Terraform Script Prometheus and Grafana has been installed and Prometheus is kept as a source for Grafana.
Dashboard has been imported using the ID 3119 as shown in the screenshot below
You can access the application as shown below
Reference:-
https://ashok198510.hashnode.dev/cloud-native-two-tier-application-deployment-with-eks-tomcat-and-rds-in-aws
https://github.com/Ashoksana/aws-rds-java
https://medium.com/@abiolamajekodunmi2011/implementing-secure-and-observant-3-tier-deployments-on-aws-using-terraform-eks-jenkins-ea2572d239e1