Code Monkey home page Code Monkey logo

deploy-a-java-application-to-a-kubernetes-cluster-on-azure-using-jenkins's Introduction

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.


Prerequisites

To run this project, you will need to install

Usage

1- Create a Kubernetes cluster with Terraform

 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

2- Create Jenkins Server

 cd ../JenkinsDeployment/DeployVM
 terraform init
 Terraform apply 
  • Notice : you will the public ip as output

3- Configure Jenkins Server Using Ansible

  • pass the public ip into Ansible/hosts file
 cd ../Ansible
 ansible-playbook  Deploy_Jenkins.yml

Acces Grafana

  kubectl get svc prometheus-grafana -n monitoring
  • copy the external ip and past it into browser to use grafana Dashboard

  • user:admin password: admin

  • grafana

4- Acces Jenkins and Run the pipeline

  • 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

-5- check if new Images is pushed to Docker Hub

  • docker hub

Built With

  • Jenkins
  • Terrafrom
  • Ansible
  • Kubernetes
  • Azure
  • Docker
  • Grafana
  • Prometheus
  • Maven

Authors

Bendra Abdelali

deploy-a-java-application-to-a-kubernetes-cluster-on-azure-using-jenkins's People

Contributors

1jenkins avatar bendraabdelali avatar

Stargazers

 avatar

Watchers

 avatar

deploy-a-java-application-to-a-kubernetes-cluster-on-azure-using-jenkins's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.