Skip to content

Commit 43cf8a5

Browse files
addtional edits and fixes
1 parent 66c335e commit 43cf8a5

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

articles/spring-apps/how-to-config-server.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Spring Cloud Config Server provides server and client-side support for an extern
2929

3030
## Restriction
3131

32-
There are some restrictions when you use Config Server with a Git back end. Some properties are automatically injected into your application environment to access Config Server and Service Discovery. If you also configure those properties from your Config Server files, you might experience conflicts and unexpected behavior. The properties include:
32+
There are some restrictions when you use Config Server with a Git back end. The following properties are automatically injected into your application environment to access Config Server and Service Discovery. If you also configure those properties from your Config Server files, you might experience conflicts and unexpected behavior.
3333

3434
```yaml
3535
eureka.client.service-url.defaultZone
@@ -47,12 +47,12 @@ spring.jmx.enabled
4747
4848
## Create your Config Server files
4949

50-
Azure Spring Apps supports Azure DevOps, GitHub, GitLab, and Bitbucket for storing your Config Server files. When you've your repository ready, create the configuration files with the following instructions and store them there.
50+
Azure Spring Apps supports Azure DevOps, GitHub, GitLab, and Bitbucket for storing your Config Server files. When your repository is ready, this article describes how to create the configuration files and store them there.
5151

52-
Additionally, some configurable properties are available only for certain types. The following subsections list the properties for each repository type.
52+
Additionally, some configurable properties are available only for certain types. The following sections describe the properties for each repository type.
5353

5454
> [!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.
5656
5757
### Public repository
5858

@@ -105,7 +105,7 @@ The following table lists the configurable properties that you can use to set up
105105
| `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. |
106106

107107
> [!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.
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.
109109
> 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/).
110110
111111
### Other Git repositories
@@ -164,11 +164,11 @@ Updating the configuration can take a few minutes. You should get a notification
164164

165165
### Enter repository information directly to the Azure portal
166166

167-
You can enter repository information for the default repository and, optionally, for addtional repositories.
167+
You can enter repository information for the default repository and, optionally, for additional repositories.
168168

169169
#### Default repository
170170

171-
Follow the steps in this section to enter repository information for a public or private repository.
171+
Use the steps in this section to enter repository information for a public or private repository.
172172

173173
- **Public repository**: In the **Default repository** section, in the **Uri** box, paste the repository URI. Enter *config* for the **Label** setting. Ensure that the **Authentication** setting is *Public*, and then select **Apply**.
174174

@@ -178,8 +178,8 @@ Follow the steps in this section to enter repository information for a public or
178178

179179
:::image type="content" source="media/how-to-config-server/basic-auth.png" lightbox="media/how-to-config-server/basic-auth.png" alt-text="Screenshot of the Default repository section showing authentication settings for Basic authentication.":::
180180

181-
> [!CAUTION]
182-
> Some Git repository servers use a *personal-token* or an *access-token*, such as a password, for HTTP basic authentication. You can use these types of tokens as a password in Azure Spring Apps because they will never expire. However, 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 won't work when you use those repository servers with Azure Spring Apps.
181+
> [!NOTE]
182+
> 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.
183183
> 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/).
184184
185185
- **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.
@@ -192,7 +192,7 @@ If you want to configure your service with an optional additional repository, sp
192192

193193
### Enter repository information into a YAML file
194194

195-
If you've written a YAML file with your repository settings, you can import the file directly from your local machine to Azure Spring Apps. The following example shows a simple YAML file for a private repository with basic authentication:
195+
If you've written a YAML file with your repository settings, you can import the file directly from your local machine to Azure Spring Apps. The following example shows a simple YAML file for a private repository with basic authentication.
196196

197197
```yaml
198198
spring:
@@ -263,11 +263,11 @@ Select **Reset** on the **Config Server** tab to erase your existing settings. D
263263

264264
## Config Server refresh
265265

266-
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/)
266+
When properties are changed, services consuming those properties must be notified before changes can be made. The default solution for Spring Cloud Config Server 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/)
267267

268-
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:
268+
Instead, you can automatically refresh values from Config Server by letting the config client poll for changes based on a refresh internal. Use the following steps to automatically refresh values from Config Server.
269269

270-
1. Register a scheduled task to refresh the context in a given interval.
270+
1. Register a scheduled task to refresh the context in a given interval, as shown in the following example.
271271

272272
```java
273273
@ConditionalOnBean({RefreshEndpoint.class})
@@ -294,7 +294,7 @@ Instead, you can automatically refresh values from the config server by letting
294294
}
295295
```
296296

297-
1. Enable auto-refresh and set the appropriate refresh interval in your *application.yml* file. In this example, the client polls for config changes every 60 seconds, which is the minimum value you can set for a refresh interval.
297+
1. Enable auto-refresh and set the appropriate refresh interval in your *application.yml* file. In the following example, the client polls for config changes every 60 seconds, which is the minimum value you can set for a refresh interval.
298298

299299
By default, auto-refresh is set to *false* and the refresh-interval is set to *60 seconds*.
300300

@@ -312,7 +312,7 @@ Instead, you can automatically refresh values from the config server by letting
312312
- refresh
313313
```
314314
315-
1. Add @RefreshScope in your code. In this example, the variable `connectTimeout` is automatically refreshed every 60 seconds.
315+
1. Add @RefreshScope in your code. In the following example, the variable `connectTimeout` is automatically refreshed every 60 seconds.
316316

317317
```java
318318
@RestController
@@ -323,8 +323,7 @@ Instead, you can automatically refresh values from the config server by letting
323323
}
324324
```
325325

326-
> [!TIP]
327-
> For more information, see the [config-client-polling sample](https://github.com/Azure-Samples/Azure-Spring-Cloud-Samples/tree/master/config-client-polling).
326+
For more information, see the [config-client-polling sample](https://github.com/Azure-Samples/Azure-Spring-Cloud-Samples/tree/master/config-client-polling).
328327

329328
## Next steps
330329

0 commit comments

Comments
 (0)