Quickstart: Set up Spring Cloud Config Server for Azure Spring Apps


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

Config Server is a centralized configuration service for distributed systems. It uses a pluggable repository layer that currently supports local storage, Git, and Subversion. In this quickstart, you set up the Config Server to get data from a Git repository.


Config Server procedures

Set up your Config Server with the location of the git repository for the project by running the following command. Replace <service instance name> with the name of the service you created earlier. The default value for service instance name that you set in the preceding quickstart doesn't work with this command.

az spring config-server git set -n <service instance name> --uri https://github.com/Azure-Samples/Azure-Spring-Cloud-Samples --search-paths steeltoe-sample/config

This command tells Config Server to find the configuration data in the steeltoe-sample/config folder of the sample app repository. Since the name of the app that will get the configuration data is planet-weather-provider, the file that will be used is planet-weather-provider.yml.


Config Server procedures

The following procedure sets up the Config Server using the Azure portal to deploy the PetClinic sample.

  1. Go to the service Overview page and select Config Server.

  2. In the Default repository section, set URI to https://github.com/azure-samples/spring-petclinic-microservices-config.

  3. Select Validate.

    Screenshot of Azure portal showing Config Server page.

  4. When validation is complete, select Apply to save your changes.

    Screenshot of Azure portal showing Config Server page with Apply button highlighted.

Updating the configuration can take a few minutes. You should get a notification when the configuration is complete.


For information on using a private repository for Config Server, see Configure a managed Spring Cloud Config Server in Azure Spring Apps.

Troubleshooting of Azure Spring Apps Config Server

The following procedure explains how to troubleshoot Config Server settings.

  1. In the Azure portal, go to the service Overview page and select Logs.

  2. In the Queries pane under Show the application logs that contain the "error" or "exception" terms, select Run.

    Screenshot of Azure portal showing Azure Spring Apps query.

    The following error in the logs indicates that the Spring Apps service can't locate properties from Config Server: java.lang.illegalStateException

  3. Go to the service Overview page.

  4. Select Diagnose and solve problems.

  5. Under Availability and Performance, select Troubleshoot.

    Screenshot of Azure portal showing Diagnose and solve problems page.

    Azure portal displays the Availability and Performance page, which provides various information about Config Server health status.

Clean up resources

If you plan to continue working with subsequent quickstarts and tutorials, you might want to leave these resources in place. When you no longer need it, delete the resource group, which deletes the resources in the resource group. To delete the resource group, enter the following commands in the Azure CLI:

echo "Enter the Resource Group name:" &&
read resourceGroupName &&
az group delete --name $resourceGroupName &&
echo "Press [ENTER] to continue ..."

Next steps