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

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

Azure Spring Cloud 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.

    Navigate to Config Server

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

    Validating Config Server

  5. Updating the configuration can take a few minutes.

    Updating Config Server

  6. 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.

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

  2. Select Queries and Show the application logs that contain the "error" or "exception" terms".

  3. Select Run.

  4. If you find the error java.lang.illegalStateException in logs, this indicates that spring cloud service cannot locate properties from config server.

    ASC portal run query

  5. Go to the service Overview page.

  6. Select Diagnose and solve problems.

  7. Select Config Server detector.

    ASC portal diagnose problems

  8. Select Config Server Health Check.

    ASC portal genie

  9. Select Config Server Status to see more details from the detector.

    ASC portal health status

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: