Quickstart: Set up Azure Spring Cloud Config Server
Azure Spring Cloud 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.
Prerequisites
- Complete the previous quickstart in this series: Provision Azure Spring Cloud service.
Azure Spring Cloud 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-cloud 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.
Azure Spring Cloud Config Server is centralized configuration service for distributed systems. It uses a pluggable repository layer that currently supports local storage, Git, and Subversion. Set up the Config Server to deploy microservice apps to Azure Spring Cloud.
Prerequisites
- Install JDK 8 or JDK 11
- Sign up for an Azure subscription
- (Optional) Install the Azure CLI version 2.0.67 or higher and install the Azure Spring Cloud extension with command:
az extension add --name spring-cloud - (Optional) Install the Azure Toolkit for IntelliJ and sign-in
Azure Spring Cloud Config Server procedures
The following procedure sets up the Config Server using the Azure portal to deploy the PetClinic sample.
Go to the service Overview page and select Config Server.
In the Default repository section, set URI to "https://github.com/azure-samples/spring-petclinic-microservices-config".
Select Validate.

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

Updating the configuration can take a few minutes.

You should get a notification when the configuration is complete.
Tip
If you are using a private repository for Config Server, please refer to our tutorial on setting up authentication.
Troubleshooting of Azure Spring Cloud Config Server
The following procedure explains how to troubleshoot config server settings.
In the Azure portal, go to the service Overview page and select Logs.
Select Queries and Show the application logs that contain the "error" or "exception" terms".
Select Run.
If you find the error java.lang.illegalStateException in logs, this indicates that spring cloud service cannot locate properties from config server.
Go to the service Overview page.
Select Diagnose and solve problems.
Select Config Server detector.
Select Config Server Health Check.
Select Config Server Status to see more details from the detector.
Next steps
In this quickstart, you created Azure resources that will continue to accrue charges if they remain in your subscription. If you don't intend to continue on to the next quickstart, see Clean up resources. Otherwise, advance to the next quickstart: