Azure DevOps - CI/CD pipeline for container-based system

Azure provides a set of flexible services designed to enable companies to more rapidly and reliably build and deliver products using Containers and DevOps practices. These services simplify provisioning and managing infrastructure, deploying application code, automating software release processes, and monitoring your application and infrastructure performance.

In this post, we will learn how to modernize spring web application development by using containers and DevOps workflows. In this example, A Spring web app is built and deployed by Jenkins into an Azure Container Registry and Azure Kubernetes service. For a globally distributed database tier, Azure SQL Database is utilized. To monitor and troubleshoot application performance, Azure Monitor integrates with a Grafana instance and dashboard.

Today modern application development uses continuous integration (CI) and continuous deployment (CD), we can more expeditiously build, test, and deploy services. This modern approach lets us release applications and updates to our customers more expeditious and respond to transmuting business demands in a more agile manner.

Architecture


This scenario covers a DevOps pipeline for a Spring web application and database back end. The data permeates the scenario as follows:
  1. A developer makes changes to the Spring web application source code.
  2. Git is the distributed version control system.
  3. The code change is committed to a source control repository, such as BitBucket
  4. To commence the continuous integration (CI) process, a BitBucket webhook triggers a Jenkins project build.
  5. The Jenkins build job utilizes a dynamic build agent in Azure Kubernetes Service to perform a container build process.
  6. A container image is engendered from the code in source control and is then pushed to an Azure Container Registry.
  7. Through continuous deployment (CD), Jenkins deploys this updated container image to the Kubernetes cluster.
  8. The Spring web application uses Azure SQL as its back end. Both Azure SQL DB and Azure Kubernetes Service report metrics to Azure Monitor.
  9. A Grafana instance provides visual dashboards of the application performance predicated on the data from Azure Monitor.

Resources

  • Bitbucket is our Git repository management solution designed for professional teams. It gives us a central place to manage git repositories, collaborate on our source code and guide us through the development flow.
  • Jenkins is an open-source automation server that can integrate with Azure services to enable perpetual integration (CI) and continuous deployment (CD). In this scenario, Jenkins orchestrates the creation of new container images predicated on commits to source control, pushes those images to Azure Container Registry, then updates application instances in Azure Kubernetes Service.
  • Azure SQL Database is a plenarily managed platform as a service (PaaS) database engine that handles most of the database management functions such as upgrading, patching, backups, and monitoring without utilizer involution. Azure SQL Database is always running on the latest stable version of the SQL Server database engine and patched OS with 99.99% availability
  • AKS(Azure Kubernetes Service) is an open-source plenarily managed container orchestration service, that can be used to deploy, scale, and manage Docker containers and container-predicated applications in a cluster environment.
  • Azure Container Registry is a hosting platform for Docker images. It is a private registry where developers can store and manage private docker container images and other related artifacts. These images can then be pulled and run locally or used for container-based deployments to hosting platforms.
  • Azure Monitor avails us to track performance, maintain security, and identify trends. Metrics obtained by Monitor can be utilized by other resources and implements, such as Grafana.
  • Grafana is an open-source solution for running data analytics, pulling up metrics that make sense of the massive quantity of data & to monitor our apps with the avail of cool customizable dashboards.

More...

Comments

Popular posts from this blog

Learn Java 8 streams with an example - print odd/even numbers from Array and List

Java, Spring Boot Mini Project - Library Management System - Download

Java - Blowfish Encryption and decryption Example

Google Cloud Storage + Spring Boot - File Upload, Download, and Delete

Java - DES Encryption and Decryption example

ReactJS - Bootstrap - Buttons

Spring Boot 3 + Spring Security 6 + Thymeleaf - Registration and Login Example

File Upload, Download, And Delete - Azure Blob Storage + Spring Boot Example

Java - How to Count the Number of Occurrences of Substring in a String

Top 5 Java ORM tools - 2024