Quickstart: Deploy microservice applications to Azure Spring Apps

Note

The first 50 vCPU hours and 100 GB hours of memory are free each month. For more information, see Price Reduction - Azure Spring Apps does more, costs less! on the Apps on Azure Blog.

Note

Azure Spring Apps is the new name for the Azure Spring Cloud service. Although the service has a new name, you'll see the old name in some places for a while as we work to update assets such as screenshots, videos, and diagrams.

This article explains how to deploy microservice applications to Azure Spring Apps using the well-known sample app PetClinic.

The Pet Clinic sample demonstrates the microservice architecture pattern. The following diagram shows the architecture of the PetClinic application on the Azure Spring Apps Standard plan.

Diagram that shows the architecture of the PetClinic sample on the Azure Spring Apps standard plan.

The diagram shows the following architectural flows and relationships of the Pet Clinic sample:

  • Uses Azure Spring Apps to manage the Spring Boot apps. Each app uses HSQLDB as the persistent store.
  • Uses the managed components Spring Cloud Config Server and Eureka Service Registry on Azure Spring Apps. The Config Server reads the Git repository configuration.
  • Exposes the URL of API Gateway to load balance requests to service apps, and exposes the URL of the Admin Server to manage the applications.
  • Analyzes logs using the Log Analytics workspace.
  • Monitors performance with Application Insights.

Note

This article uses a simplified version of PetClinic, using an in-memory database that isn't production-ready to quickly deploy to Azure Spring Apps.

The deployed app admin-server exposes public access, which is a risk point. The production environment needs to secure the Spring Boot Admin application.

This article provides the following options for deploying to Azure Spring Apps:

  • The Azure portal + Maven plugin option is a more conventional way to create resources and deploy applications step by step. This option is suitable for Spring developers using Azure cloud services for the first time.
  • The Azure Developer CLI option is a more efficient way to automatically create resources and deploy applications through simple commands. The Azure Developer CLI uses a template to provision the Azure resources needed and to deploy the application code. This option is suitable for Spring developers who are familiar with Azure cloud services.

1. Prerequisites