You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This article shows you how to configure a managed Spring Cloud Config Server in Azure Spring Apps service.
22
22
23
-
Spring Cloud Config Server provides server and client-side support for an externalized configuration in a distributed system. The Config Server instance provides a central place to manage external properties for applications across all environments. For more information, see the [Spring Cloud Config Server reference](https://spring.io/projects/spring-cloud-config).
23
+
Spring Cloud Config Server provides server and client-side support for an externalized configuration in a distributed system. The Config Server instance provides a central place to manage external properties for applications across all environments. For more information, see the [Spring Cloud Config documentation](https://spring.io/projects/spring-cloud-config).
24
24
25
25
## Prerequisites
26
26
27
27
- An Azure subscription. If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
28
-
- An already provisioned and running Azure Spring Apps service of basic or standard tier. To set up and launch an Azure Spring Apps service, see [Quickstart: Launch a Java Spring application by using the Azure CLI](./quickstart.md). Spring Cloud Config Server isn't applicable to enterprise tier.
28
+
- An already provisioned and running Azure Spring Apps service of basic or standard tier. To set up and launch an Azure Spring Apps service, see [Quickstart: Deploy your first application to Azure Spring Apps](./quickstart.md). Spring Cloud Config Server isn't applicable to enterprise tier.
29
29
30
30
## Restriction
31
31
@@ -52,61 +52,61 @@ Azure Spring Apps supports Azure DevOps, GitHub, GitLab, and Bitbucket for stori
52
52
Additionally, some configurable properties are available only for certain types. The following subsections list the properties for each repository type.
53
53
54
54
> [!NOTE]
55
-
> Config Server takes `master` (on Git) as the default label if you don't specify one. However, GitHub has recently changed the default branch from `master` to `main`. To avoid Azure Spring Apps Config Server failure, be sure to pay attention to the default label when setting up Config Server with GitHub, especially for newly-created repositories.
55
+
> Config Server takes *master* (on Git) as the default label if you don't specify one. However, GitHub has recently changed the default branch from *master* to *main*. To avoid Azure Spring Apps Config Server failure, be sure to pay attention to the default label when setting up Config Server with GitHub, especially for newly-created repositories.
56
56
57
57
### Public repository
58
58
59
-
When you use a public repository, your configurable properties are more limited.
59
+
When you use a public repository, your configurable properties are more limited than with a private repository.
60
60
61
-
All configurable properties that are used to set up the public Git repository are listed in the following table:
61
+
The following table lists the configurable properties that you can use to set up a public Git repository.
62
62
63
63
> [!NOTE]
64
64
> Using a hyphen (-) to separate words is the only naming convention that's currently supported. For example, you can use *default-label*, but not *defaultLabel*.
|`uri`| Yes | The URI of the Git repository that's used as the Config Server back end begins with *http://*, *https://*, *git@*, or *ssh://*. |
69
-
|`default-label`| No | The default label of the Git repository, should be the *branch name*, *tag name*, or *commit-id* of the repository. |
68
+
|`uri`| Yes | The URI of the Git repository that's used as the Config Server back end. Should begin with `http://`, `https://`, `git@`, or `ssh://`. |
69
+
|`default-label`| No | The default label of the Git repository. Should be the branch name, tag name, or commit ID of the repository. |
70
70
|`search-paths`| No | An array of strings that are used to search subdirectories of the Git repository. |
71
71
72
72
### Private repository with SSH authentication
73
73
74
-
All configurable properties used to set up private Git repository with SSH are listed in the following table:
74
+
The following table lists the configurable properties that you can use to set up a private Git repository with SSH.
75
75
76
76
> [!NOTE]
77
77
> Using a hyphen (-) to separate words is the only naming convention that's currently supported. For example, you can use *default-label*, but not *defaultLabel*.
|`uri`| Yes | The URI of the Git repository used as the Config Server back end, should be started with *http://*, *https://*, *git@*, or *ssh://*. |
82
-
|`default-label`| No | The default label of the Git repository, should be the *branch name*, *tag name*, or *commit-id* of the repository. |
81
+
|`uri`| Yes | The URI of the Git repository used as the Config Server back end. Should begin with `http://`, `https://`, `git@`, or `ssh://`. |
82
+
|`default-label`| No | The default label of the Git repository. Should be the branch name, tag name, or commit ID of the repository. |
83
83
|`search-paths`| No | An array of strings used to search subdirectories of the Git repository. |
84
-
|`private-key`| No | The SSH private key to access the Git repository, required when the URI starts with *git@* or *ssh://*. |
85
-
|`host-key`| No | The host key of the Git repository server shouldn't include the algorithm prefix as covered by `host-key-algorithm`. |
86
-
|`host-key-algorithm`| No | The host key algorithm should be *ssh-dss*, *ssh-rsa*, *ecdsa-sha2-nistp256*, *ecdsa-sha2-nistp384*, or *ecdsa-sha2-nistp521*. *Required* only if `host-key` exists. |
84
+
|`private-key`| No | The SSH private key to access the Git repository. Required when the URI starts with `git@` or `ssh://`. |
85
+
|`host-key`| No | The host key of the Git repository server. Shouldn't include the algorithm prefix as covered by `host-key-algorithm`. |
86
+
|`host-key-algorithm`| No | The host key algorithm. Should be *ssh-dss*, *ssh-rsa*, *ecdsa-sha2-nistp256*, *ecdsa-sha2-nistp384*, or *ecdsa-sha2-nistp521*. Required only if `host-key` exists. |
87
87
|`strict-host-key-checking`| No | Indicates whether the Config Server instance will fail to start when using the private `host-key`. Should be *true* (default value) or *false*. |
88
88
89
89
> [!NOTE]
90
90
> Config Server doesn't support SHA-2 signatures yet. Until support is added, use SHA-1 signatures or basic auth instead.
91
91
92
92
### Private repository with basic authentication
93
93
94
-
All configurable properties used to set up a private Git repository with basic authentication are listed below.
94
+
The following table lists the configurable properties that you can use to set up a private Git repository with basic authentication.
95
95
96
96
> [!NOTE]
97
97
> Using a hyphen (-) to separate words is the only naming convention that's currently supported. For example, use *default-label*, not *defaultLabel*.
|`uri`| Yes | The URI of the Git repository that's used as the Config Server back end should be started with *http://*, *https://*, *git@*, or *ssh://*. |
102
-
|`default-label`| No | The default label of the Git repository, should be the *branch name*, *tag name*, or *commit-id* of the repository. |
101
+
| `uri` | Yes | The URI of the Git repository that's used as the Config Server back end. Should begin with `http://`, `https://`, `git@`, or `ssh://`.
102
+
|`default-label`| No | The default label of the Git repository. Should be the *branch name*, *tag name*, or *commit-id* of the repository. |
103
103
|`search-paths`| No | An array of strings used to search subdirectories of the Git repository. |
104
-
|`username`| No | The username that's used to access the Git repository server, required when the Git repository server supports `Http Basic Authentication`. |
105
-
|`password`| No | The password or personal access token used to access the Git repository server, required when the Git repository server supports `Http Basic Authentication`. |
104
+
|`username`| No | The username that's used to access the Git repository server. Required when the Git repository server supports HTTP basic authentication. |
105
+
|`password`| No | The password or personal access token used to access the Git repository server. Required when the Git repository server supports HTTP basic authentication. |
106
106
107
107
> [!NOTE]
108
-
> Many `Git` repository servers support the use of tokens rather than passwords for HTTP Basic Authentication. Some repositories allow tokens to persist indefinitely. However, some Git repository servers, including Azure DevOps Server, force tokens to expire in a few hours. Repositories that cause tokens to expire shouldn't use token-based authentication with Azure Spring Apps.
109
-
> GitHub has removed support for password authentication, so you'll need to use a personal access token instead of password authentication for GitHub. For more information, see [Token authentication](https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/).
108
+
> Many `Git` repository servers support the use of tokens rather than passwords for HTTP basic authentication. Some repositories allow tokens to persist indefinitely. However, some Git repository servers, including Azure DevOps Server, force tokens to expire in a few hours. Repositories that cause tokens to expire shouldn't use token-based authentication with Azure Spring Apps.
109
+
> GitHub has removed support for password authentication, so you'll need to use a personal access token instead of password authentication for GitHub. For more information, see [Token authentication requirements for Git operations](https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/).
110
110
111
111
### Other Git repositories
112
112
@@ -130,7 +130,7 @@ All configurable properties used to set up Git repositories with a pattern are l
130
130
|`repos."host-key-algorithm"`| No | The host key algorithm should be *ssh-dss*, *ssh-rsa*, *ecdsa-sha2-nistp256*, *ecdsa-sha2-nistp384*, or *ecdsa-sha2-nistp521*. Required only if `host-key` exists. |
131
131
|`repos."strict-host-key-checking"`| No | Indicates whether the Config Server instance will fail to start when using the private `host-key`. Should be *true* (default value) or *false*. |
132
132
133
-
The following table shows some examples for the **Additional repositories** section. For more information, see [Pattern Matching and Multiple Repositories](https://cloud.spring.io/spring-cloud-config/reference/html/#_pattern_matching_and_multiple_repositories)in the Spring documentation.
133
+
The following table shows some examples for the **Additional repositories** section. For more information, see the [Pattern Matching and Multiple Repositories section](https://cloud.spring.io/spring-cloud-config/reference/html/#_pattern_matching_and_multiple_repositories)of the Spring documentation.
@@ -176,7 +176,7 @@ Updating the configuration can take a few minutes. You should get a notification
176
176
177
177
> [!CAUTION]
178
178
> Some Git repository servers use a *personal-token* or an *access-token*, such as a password, for **Basic Authentication**. You can use that kind of token as a password in Azure Spring Apps because it will never expire. But for other Git repository servers, such as Bitbucket and Azure DevOps Server, the *access-token* expires in one or two hours. As a result, this approach isn't viable when you use those repository servers with Azure Spring Apps.
179
-
> GitHub has removed support for password authentication, so you'll need to use a personal access token instead of password authentication for GitHub. For more information, see [Token authentication](https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/).
179
+
> GitHub has removed support for password authentication, so you'll need to use a personal access token instead of password authentication for GitHub. For more information, see [Token authentication requirements for Git operations](https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/).
180
180
181
181
-**SSH**: In the **Default repository** section, in the **Uri** box, paste the repository URI, and then select the setting under **Authentication** to open the **Edit Authentication** pane. In the **Edit Authentication** pane, in the **Authentication type** drop-down list, select **SSH**, and then enter your **Private key**. Optionally, specify your **Host key** and **Host key algorithm**. Include your public key in your Config Server repository. Select **OK**, and then select **Apply** to finish setting up your Config Server instance.
182
182
@@ -218,8 +218,6 @@ Use the following steps to get your repo URL and credentials.
218
218
219
219
1. In the Azure Repos portal for your project, select the **Clone** button:
220
220
221
-
:::image type="content" source="media/how-to-config-server/clone-button.png" lightbox="media/how-to-config-server/clone-button.png" alt-text="Screenshot of the Clone button on the Azure Repos portal for your project.":::
222
-
223
221
1. Copy the clone URL from the textbox. This URL will typically be in the following form:
224
222
225
223
```text
@@ -261,7 +259,9 @@ Select **Reset** on the **Config Server** tab to erase your existing settings. D
261
259
262
260
## Config Server refresh
263
261
264
-
When properties are changed, services consuming those properties must be notified before changes can be made. The default solution for Spring Cloud Config is to manually trigger the [refresh event](https://spring.io/guides/gs/centralized-configuration/), which may not be feasible if there are lots of app instances. Instead, you can automatically refresh values from the config server by letting the config client poll for changes based on a refresh internal, as follows:
262
+
When properties are changed, services consuming those properties must be notified before changes can be made. The default solution for Spring Cloud Config is to manually trigger the refresh event, which may not be feasible if there are many app instances. For more information, see [Centralized Configuration](https://spring.io/guides/gs/centralized-configuration/)
263
+
264
+
Instead, you can automatically refresh values from the config server by letting the config client poll for changes based on a refresh internal, as follows:
265
265
266
266
1. Register a scheduled task to refresh the context in a given interval.
0 commit comments