This project provides an automated and reliable way to deploy a Java application to Azure Kubernetes Service (AKS). It makes use of a combination of Terraform, Ansible, Jenkins, Prometheus, and Grafana to create a secure and efficient pipeline. The Jenkins server is created on an Azure Virtual Machine using Terraform and Ansible. The AKS cluster is created with Terraform, and Jenkins pipelines are used to build, test, and deploy the application. Prometheus and Grafana are used for monitoring and analyzing the performance of the application. This project provides a reliable and automated way to deploy the application to the AKS cluster.
To run this project, you will need to install
cd k8sDeployment
az login
terraform init
Terraform apply
Verify the health of the cluster
kubectl get nodes
kubect get pods
kubectl get all -n monitoring
cd ../JenkinsDeployment/DeployVM
terraform init
Terraform apply
- Notice : you will the public ip as output
- pass the public ip into Ansible/hosts file
cd ../Ansible
ansible-playbook Deploy_Jenkins.yml
kubectl get svc prometheus-grafana -n monitoring
-
pass the public_ip:8080 into your browser
-
- Notice that the password will appear when executing step 3 of Jenkins configuration using Ansible.
-
After configuring Jenkins, adding credentials, and installing some helpful plugins, you should be able to execute Jenkins pipelines provided in the Jenkins file.
- Jenkins
- Terrafrom
- Ansible
- Kubernetes
- Azure
- Docker
- Grafana
- Prometheus
- Maven
Bendra Abdelali