Migrate an Azure Spring Apps Basic or Standard tier instance to Enterprise tier
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 applies to: ✔️ Basic/Standard tier ✔️ Enterprise tier
This article shows you how to migrate an existing application in Basic or Standard tier to Enterprise tier. When you migrate from Basic or Standard tier to Enterprise tier, VMware Tanzu components will replace the open-source software (OSS) Spring Cloud components to provide more feature support.
This article will use the Pet Clinic sample apps as examples of how to migrate.
Prerequisites
-
The Azure Spring Apps Enterprise tier extension (3.0.0 or later). Use the following command to remove previous versions and install the latest Enterprise tier extension. If you previously installed the
spring-cloud
extension, uninstall it to avoid configuration and version mismatches.az extension remove --name spring az extension add --name spring az extension remove --name spring-cloud
Provision a service instance
In Enterprise Tier, VMware Tanzu components will replace the OSS Spring Cloud components to provide more feature support. Tanzu components are enabled on demand according to your needs. You can select the components you need before creating the service instance.
Note
To use Tanzu Components, you must enable them when you provision your Azure Spring Apps service instance. You can't enable them after provisioning at this time.
Use the following steps to provision an Azure Spring Apps service instance:
Open the Azure portal.
In the top search box, search for Azure Spring Apps.
Select Azure Spring Apps from the results, then select Create.
Select Change next to the Pricing option, then select Enterprise.
Select the Terms checkbox to agree to the legal terms and privacy statements of the Enterprise tier offering in the Azure Marketplace.
To configure VMware Tanzu components, select Next: VMware Tanzu settings.
Note
All Tanzu components are enabled by default. Carefully consider which Tanzu components you want to use or enable during the provisioning phase. After provisioning the Azure Spring Apps instance, you can't enable or disable Tanzu components.
Select the Application Insights section, then select Enable Application Insights. You can also enable Application Insights after you provision the Azure Spring Apps instance.
- Choose an existing Application Insights instance or create a new Application Insights instance.
- Enter a Sampling Rate in the range of 0-100, or use the default value 10.
Note
You'll pay for the usage of Application Insights when integrated with Azure Spring Apps. For more information about Application Insights pricing, see Application Insights billing.
Select Review and create and wait for validation to complete, then select Create to start provisioning the service instance.
It takes about 5 minutes to finish the resource provisioning.
Create and configure apps
The app creation steps are the same as Standard Tier.
To set the CLI defaults, use the following commands. Be sure to replace the placeholders with your own values.
az account set --subscription=<your-subscription-id> az configure --defaults group=<your-resource-group-name> spring-cloud=<your-service-name>
To create the two core applications for PetClinic,
api-gateway
andcustomers-service
, use the following commands:az spring-cloud app create --name api-gateway --instance-count 1 --memory 2Gi --assign-endpoint az spring-cloud app create --name customers-service --instance-count 1 --memory 2Gi
Use Application Configuration Service for external configuration
For externalized configuration in a distributed system, managed Spring Cloud Config Server is only available in Basic and Standard tiers. In Enterprise tier, Application Configuration Service for Tanzu (ACS) provides similar functions for your apps. The following table describes some differences in usage between the OSS config server and ACS.
Component | Support tiers | Enabled | Bind to app | Profile |
---|---|---|---|---|
Spring Cloud Config Server | Basic/Standard | Always enabled. | Auto bound | Configured in app's source code. |
Application Configuration Service for Tanzu | Enterprise | Enable on demand. | Manual bind | Provided as config-file-pattern in an Azure Spring Apps deployment. |
Unlike the client-server mode in the OSS config server, ACS manages configuration by using the Kubernetes-native ConfigMap
, which is populated from properties defined in backend Git repositories. ACS can't get the active profile configured in the app's source code to match the right configuration, so the explicit configuration config-file-pattern
should be specified at the Azure Spring Apps deployment level.
Configure Application Configuration Service for Tanzu settings
Follow these steps to use Application Configuration Service for Tanzu as a centralized configuration service.
Select Application Configuration Service.
Select Overview to view the running state and resources allocated to Application Configuration Service for Tanzu.
Select Settings, then add a new entry in the Repositories section with the following information:
- Name:
default
- Patterns:
api-gateway,customers-service
- URI:
https://github.com/Azure-Samples/spring-petclinic-microservices-config
- Label:
master
- Name:
Select Validate to validate access to the target URI.
After validation completes successfully, select Apply to update the configuration settings.
Bind application to Application Configuration Service for Tanzu
When you use Application Configuration Service for Tanzu with a Git backend, you must bind the app to Application Configuration Service for Tanzu. After binding the app, you'll need to configure which pattern will be used by the app. Follow these steps to bind and configure the pattern for the app.
To bind apps to Application Configuration Service for VMware Tanzu®, follow these steps.
Select Application Configuration Service.
Select App binding, then select Bind app.
Choose one app in the dropdown, then select Apply to bind the application to Application Configuration Service for Tanzu.
The list under App name will show the apps bound with Application Configuration Service for Tanzu.
For more information, see Use Application Configuration Service for Tanzu.
Using Service Registry for Tanzu
Service Registry is one of the proprietary VMware Tanzu components. It provides your apps with an implementation of the Service Discovery pattern, one of the key concepts of a microservice-based architecture. In Enterprise tier, Service Registry for Tanzu provides service registry and discover support for your apps. Managed Spring Cloud Eureka is only available in Basic and Standard tiers and isn't available in Enterprise tier.
Component | Standard Tier | Enterprise Tier |
---|---|---|
Service Registry | OSS eureka Auto bound (always injection) Always provisioned |
Service Registry for Tanzu Needs manual binding to app Enable on demand |
Bind an application to Tanzu Service Registry
To bind apps to Application Configuration Service for VMware Tanzu®, follow these steps.
In the Azure portal, Select Service Registry.
Select App binding, then select Bind app.
Choose one app in the dropdown, and then select Apply to bind the application to Tanzu Service Registry.
The list under App name shows the apps bound with Tanzu Service Registry.
Note
When you change the bind/unbind status, you must restart or redeploy the app to make the change take effect.
For more information, see Use Tanzu Service Registry.
Build and deploy applications
In Enterprise tier, Tanzu Build Service is used to build apps. It provides more features like polyglot apps to deploy from artifacts such as source code and zip files.
To use Tanzu Build Service, you need to specify a resource for build task and builder to use. You can also specify the --build-env
parameter to set build environments.
If the app binds with ACS, you need specify an extra argument —config-file-pattern
.
The following sections show how to build and deploy applications.
Build the applications locally
To build locally, use the following steps:
Clone the sample app repository in your Azure account, change the directory, and build the project using the following commands:
git clone -b enterprise https://github.com/azure-samples/spring-petclinic-microservices cd spring-petclinic-microservices mvn clean package -DskipTests
Compiling the project can take several minutes. Once complete, you'll have individual JAR files for each service in its respective folder.
Deploy the JAR files built in the previous step using the following commands:
az spring-cloud app deploy \ --name api-gateway \ --artifact-path spring-petclinic-api-gateway/target/spring-petclinic-api-gateway-2.3.6.jar \ --config-file-patterns api-gateway az spring-cloud app deploy \ --name customers-service \ --artifact-path spring-petclinic-customers-service/target/spring-petclinic-customers-service-2.3.6.jar \ --config-file-patterns customers-service
Query the application status after deployment by using the following command:
az spring-cloud app list --output table
This command produces output similar to the following example:
Name Location ResourceGroup Public Url Production Deployment Provisioning State CPU Memory Running Instance Registered Instance Persistent Storage Bind Service Registry Bind Application Configuration Service -------------------- ---------- --------------- --------------------------------------------------------- ----------------------- -------------------- ----- -------- ------------------ --------------------- -------------------- ----------------------- ---------------------------------------- api-gateway eastus <resource group> https://<service_name>-api-gateway.asc-test.net default Succeeded 1 2Gi 1/1 1/1 - True True customers-service eastus <resource group> default Succeeded 1 2Gi 1/1 1/1 - True True
Use Application Insight
Azure Spring Apps Enterprise tier uses buildpack bindings to integrate Application Insights with the type ApplicationInsights
instead of In-Process Agent. For more information, see How to configure APM integration and CA certificates.
Standard Tier | Enterprise Tier |
---|---|
Application insight New Relic Dynatrace AppDynamics |
Application insight New Relic Dynatrace AppDynamics ElasticAPM |
To check or update the current settings in Application Insights, use the following steps:
Next steps
Feedback
Submit and view feedback for