Set up the Application Configuration Service for Azure Spring Apps Enterprise
Once you completed the initial update of your git repository hosting the server configuration, you need to set up the Application Configuration Service for your Azure Spring Apps Enterprise instance.
- Externalize configuration with Application Configuration Service.
- Use Application Configuration Service for Tanzu.
Step by step guidance
-
Switch to the Git Bash prompt and run the following commands to set the environment variables hosting your GitHub repository and GitHub credentials (replace the
<git-repository>
,<git-username>
, and<git-PAT>
placeholders with the URL of your GitHub repository, the name of your GitHub user account, and the newly generated PAT value, respectively).The URL of the GitHub repository should be in the format
https://github.com/<your-github-username>/spring-petclinic-microservices-config.git
, where the<your-github-username>
placeholder represents your GitHub user name.GIT_REPO=<git-repository> GIT_USERNAME=<git-username> GIT_PASSWORD=<git-PAT>
-
To set up the Application Configuration Service such that it points to your GitHub repository, from the Git Bash prompt, run the following command.
az spring application-configuration-service git repo add \ --resource-group $RESOURCE_GROUP \ --name spring-petclinic-config \ --service $SPRING_APPS_SERVICE \ --label main \ --patterns "api-gateway,customers-service,vets-service,visits-service,admin-server" \ --uri $GIT_REPO \ --password $GIT_PASSWORD \ --username $GIT_USERNAME
In case you are using a branch other than
main
in your config repo, you can change the branch name with thelabel
parameter.Wait for the operation to complete. This might take about 2 minutes.