Skip to content

Commit 523805a

Browse files
committed
edits
1 parent 8943ca6 commit 523805a

File tree

1 file changed

+53
-55
lines changed

1 file changed

+53
-55
lines changed

articles/spring-apps/enterprise/how-to-enterprise-application-configuration-service.md

Lines changed: 53 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Use Application Configuration Service for Tanzu with the Azure Spring Apps Enterprise plan
2+
title: Use Application Configuration Service for Tanzu
33
titleSuffix: Azure Spring Apps Enterprise plan
44
description: Learn how to use Application Configuration Service for Tanzu with the Azure Spring Apps Enterprise plan.
55
author: KarlErickson
@@ -51,19 +51,19 @@ You can choose the version of Application Configuration Service when you create
5151

5252
Application Configuration Service supports Azure DevOps, GitHub, GitLab, and Bitbucket for storing your configuration files.
5353

54-
To manage the service settings, open the **Settings** section. Configure the following three key aspects:
54+
To manage the service settings, open the **Settings** section. In this section, you can configure the following key aspects:
5555

5656
- **Generation**: Upgrade the service generation.
5757
- **Refresh Interval**: Adjust the frequency at which the service checks for updates from Git repositories.
58-
- **Repositories**: Add new entries, or modify existing ones. This function allows you to control which repositories the service monitors use to pull data.
58+
- **Repositories**: Add new entries, or modify existing ones. This function enables you to control which repositories the service monitors use to pull data.
5959

6060
:::image type="content" source="media/how-to-enterprise-application-configuration-service/configuration-service-settings.png" alt-text="Screenshot of the Azure portal that shows the Application Configuration Service page with the Settings tab highlighted." lightbox="media/how-to-enterprise-application-configuration-service/configuration-service-settings.png":::
6161

62-
If your current service generation is **Gen1**, you can upgrade to **Gen2** for better performance. For more information, see the [Upgrade from Gen1 to Gen2](#upgrade-from-gen1-to-gen2) section in this article.
62+
If your current service generation is **Gen1**, you can upgrade to **Gen2** for better performance. For more information, see the [Upgrade from Gen1 to Gen2](#upgrade-from-gen1-to-gen2) section.
6363

64-
The **Refresh Interval** specifies the frequency (in seconds) for checking updates in the repository. The minimum value is *0*, which disables automatic refresh. For optimal performance, set this interval at a minimum of 60 seconds.
64+
The **Refresh Interval** specifies the frequency (in seconds) for checking updates in the repository. The minimum value is *0*, which disables automatic refresh. For optimal performance, set this interval to a minimum value of 60 seconds.
6565

66-
The following table describes the properties for each repository entry.
66+
The following table describes the properties for each repository entry:
6767

6868
| Property | Required? | Description |
6969
|---------------|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
@@ -78,7 +78,7 @@ The following table describes the properties for each repository entry.
7878
Configuration is pulled from Git backends using what you define in a pattern. A pattern is a combination of *{application}/{profile}* as described in the following guidelines.
7979

8080
- *{application}* - The name of an application whose configuration you're retrieving. The value `application` is considered the default application and includes configuration information shared across multiple applications. Any other value refers to a specific application and includes properties for both the specific application and shared properties for the default application.
81-
- *{profile}* - Optional. The name of a profile whose properties you could retrieve. An empty value, or the value `default`, includes properties that are shared across profiles. Non-default values include properties for the specified profile and properties for the default profile.
81+
- *{profile}* - Optional. The name of a profile whose properties you can retrieve. An empty value, or the value `default`, includes properties that are shared across profiles. Non-default values include properties for the specified profile and properties for the default profile.
8282

8383
### Authentication
8484

@@ -142,7 +142,7 @@ Use the following steps to upgrade from Gen1 to Gen2:
142142

143143
1. Select **Validate** to validate access to the target URI. After validation completes successfully, select **Apply** to update the configuration settings.
144144

145-
:::image type="content" source="media/how-to-enterprise-application-configuration-service/configuration-server-upgrade-gen2-settings.png" alt-text="Screenshot of the Azure portal that shows the Application Configuration Service page with the Settings tab showing and the Validate button highlighted." lightbox="media/how-to-enterprise-application-configuration-service/configuration-server-upgrade-gen2-settings.png":::
145+
:::image type="content" source="media/how-to-enterprise-application-configuration-service/configuration-server-upgrade-gen2-settings.png" alt-text="Screenshot of the Azure portal that shows the Application Configuration Service page and the Settings tab with the Validate button highlighted." lightbox="media/how-to-enterprise-application-configuration-service/configuration-server-upgrade-gen2-settings.png":::
146146

147147
## Polyglot support
148148

@@ -152,58 +152,58 @@ The Application Configuration Service also supports polyglot apps like dotNET, G
152152

153153
## Refresh strategies
154154

155-
When you modify and commit your configurations in a Git repository, several steps are involved before these changes are reflected in your applications, as mentioned in the following diagram:
155+
When you modify and commit your configurations in a Git repository, several steps are involved before these changes are reflected in your applications. This process, though automated, involves the following distinct stages and components, each with its own timing and behavior:
156156

157-
:::image type="content" source="media/how-to-enterprise-application-configuration-service/acs-refresh-lifecycle.png" alt-text="Diagram that shows the lifecycle of the refresh process of Application Configuration Service." lightbox="media/how-to-enterprise-application-configuration-service/acs-refresh-lifecycle.png":::
157+
- Polling by Application Configuration Service: The Application Configuration Service regularly polls the backend Git repositories to detect any changes. This polling occurs at a set frequency, defined by the refresh interval. When a change is detected, Application Configuration Service updates the Kubernetes `ConfigMap`.
158+
- ConfigMap update and interaction with kubelet cache: In Azure Spring Apps, this `ConfigMap` is mounted as a data volume to the relevant application. However, there's a natural delay in this process due to the frequency at which the kubelet refreshes its cache to recognize changes in `ConfigMap`.
159+
- Application reads updated configuration: Your application running in the Azure Spring Apps environment can access the updated configuration values. The existing beans in the Spring Context aren't automatically refreshed to use the updated configurations.
158160

159-
This process, though automated, involves the following distinct stages and components, each with its own timing and behavior.
161+
These stages are summarized in the following diagram:
160162

161-
- **Polling by Application Configuration Service**: The Application Configuration Service regularly polls the backend Git repositories to detect any changes. This polling occurs at a set frequency, defined by the refresh interval. When a change is detected, Application Configuration Service updates the Kubernetes `ConfigMap`.
162-
- **ConfigMap Update and Interaction with Kubelet Cache**: In Azure Spring Apps, this `ConfigMap` is mounted as a data volume to the relevant application. However, there's a natural delay in this process due to the frequency at which the Kubelet refreshes its cache to recognize changes in `ConfigMap`.
163-
- **Application Reads Updated Configuration**: Application running in the Azure Spring Apps environment can access the updated configuration values. The existing beans in the Spring Context aren't refreshed to use the updated configurations automatically.
163+
:::image type="content" source="media/how-to-enterprise-application-configuration-service/acs-refresh-lifecycle.png" alt-text="Diagram that shows the lifecycle of the refresh process of Application Configuration Service." lightbox="media/how-to-enterprise-application-configuration-service/acs-refresh-lifecycle.png":::
164164

165165
You can adjust the polling refresh interval of the Application Configuration Service to align with your specific needs. To apply the updated configurations in your application, a restart or refresh action is necessary.
166166

167-
In Spring applications, properties are hold or referenced as the beans within the Spring Context. To load new configurations, use the following methods:
167+
In Spring applications, properties are held or referenced as beans within the Spring Context. To load new configurations, consider using the following methods:
168168

169169
- Restart the application. Restarting the application always loads the new configuration.
170170

171171
- Call the `/actuator/refresh` endpoint exposed on the config client via the Spring Actuator.
172172

173-
To use this method, add the following dependency to your configuration client’s *pom.xml* file.
173+
To use this method, add the following dependency to your configuration client’s *pom.xml* file.
174174

175-
``` xml
176-
<dependency>
177-
<groupId>org.springframework.boot</groupId>
178-
<artifactId>spring-boot-starter-actuator</artifactId>
179-
</dependency>
180-
```
175+
```xml
176+
<dependency>
177+
<groupId>org.springframework.boot</groupId>
178+
<artifactId>spring-boot-starter-actuator</artifactId>
179+
</dependency>
180+
```
181181

182-
You can also enable the actuator endpoint by adding the following configurations:
182+
You can also enable the actuator endpoint by adding the following configuration:
183183

184-
```properties
185-
management.endpoints.web.exposure.include=refresh, bus-refresh, beans, env
186-
```
184+
```properties
185+
management.endpoints.web.exposure.include=refresh, bus-refresh, beans, env
186+
```
187187

188-
After you reload the property sources by calling the `/actuator/refresh` endpoint, the attributes bound with `@Value` in the beans having the annotation `@RefreshScope` are refreshed.
188+
After you reload the property sources by calling the `/actuator/refresh` endpoint, the attributes bound with `@Value` in the beans having the annotation `@RefreshScope` are refreshed.
189189

190-
``` java
191-
@Service
192-
@Getter @Setter
193-
@RefreshScope
194-
public class MyService {
195-
@Value
196-
private Boolean activated;
197-
}
198-
```
190+
```java
191+
@Service
192+
@Getter @Setter
193+
@RefreshScope
194+
public class MyService {
195+
@Value
196+
private Boolean activated;
197+
}
198+
```
199199

200-
Use curl with the application endpoint to refresh the new configuration.
200+
Use curl with the application endpoint to refresh the new configuration, as shown in the following example:
201201

202-
``` bash
203-
curl -X POST http://{app-endpoint}/actuator/refresh
204-
```
202+
```bash
203+
curl -X POST http://{app-endpoint}/actuator/refresh
204+
```
205205

206-
- Use `FileSystemWatcher` to watch the file change and refresh the context on demand. `FileSystemWatcher` is a class shipped with `spring-boot-devtools` that watches specific directories for file changes, or you can use another utility with similar function. The previous option requires users to initiate the refresh actively, while the latter can monitor for file changes and automatically invoke the refresh upon detecting updates. The file path, as mentioned in the [Polyglot support](#polyglot-support) section, can be retrieved using the environment variable `AZURE_SPRING_APPS_CONFIG_FILE_PATH`.
206+
- Use `FileSystemWatcher` to watch the file change and refresh the context on demand. `FileSystemWatcher` is a class shipped with `spring-boot-devtools` that watches specific directories for file changes, or you can use another utility with similar function. The previous option requires users to initiate the refresh actively, while the latter can monitor for file changes and automatically invoke the refresh upon detecting updates. You can retrieve the file path by using the environment variable `AZURE_SPRING_APPS_CONFIG_FILE_PATH`, as mentioned in the [Polyglot support](#polyglot-support) section.
207207

208208
## Configure Application Configuration Service settings
209209

@@ -290,7 +290,7 @@ Use the following steps to use Application Configuration Service with applicatio
290290

291291
1. In the navigation pane, select **Configuration** and then select **General settings**.
292292

293-
1. In the **Config file patterns** dropdown, choose one or more patterns from the list. For more information, see the [Pattern](#pattern) section in this article.
293+
1. In the **Config file patterns** dropdown, choose one or more patterns from the list. For more information, see the [Pattern](#pattern) section.
294294

295295
:::image type="content" source="media/how-to-enterprise-application-configuration-service/configuration-service-pattern.png" alt-text="Screenshot of the Azure portal that shows the App Configuration page with the General settings tab and api-gateway options highlighted." lightbox="media/how-to-enterprise-application-configuration-service/configuration-service-pattern.png":::
296296

@@ -426,23 +426,21 @@ To check the logs of `application-configuration-service` and `flux-source-contro
426426
:::image type="content" source="media/how-to-enterprise-application-configuration-service/query-logs-flux-source-controller.png" alt-text="Screenshot of the Azure portal that shows the query result of logs for flux-source-controller." lightbox="media/how-to-enterprise-application-configuration-service/query-logs-flux-source-controller.png":::
427427
428428
> [!NOTE]
429-
> There could be a few minutes delay before the logs are available in Log Analytics.
429+
> There might could be a few minutes delay before the logs are available in Log Analytics.
430430
431431
## Troubleshoot known issues
432432
433-
If the latest changes don't reflect on the applications, check the following items based on the [Refresh Strategies](#refresh-strategies) section:
433+
If the latest changes aren't reflected in the applications, check the following items based on the [Refresh strategies](#refresh-strategies) section:
434434
435-
- Check if Git repo is updated correctly and the application is bound to the Application Configuration Service:
436-
- The branch of the desired config file changes is updated.
437-
- The pattern configured in the Application Configuration Service matches the updated config files.
438-
- The application is bound to the Application Configuration Service.
439-
- Check whether the `ConfigMap` is updated:
440-
- `ConfigMap` of the app should be updated. If it isn't updated, raise a ticket.
441-
- Check whether the `ConfigMap` is mounted to the application as a file:
442-
- Use `web shell` to check the mounted file. If the file isn't updated, wait for the K8S refresh interval (1 minute). Or, you can force a refresh by restarting the application.
435+
- Confirm that the Git repo is updated correctly by checking the following items:
436+
- Confirm that the branch of the desired config file changes is updated.
437+
- Confirm that the pattern configured in the Application Configuration Service matches the updated config files.
438+
- Confirm that the application is bound to the Application Configuration Service.
439+
- Confirm that the `ConfigMap` of the app is updated. If it isn't updated, raise a ticket.
440+
- Confirm that the `ConfigMap` is mounted to the application as a file by using `web shell`. If the file isn't updated, wait for the Kubernetes refresh interval (1 minute), or force a refresh by restarting the application.
443441
444-
Now, the updated configurations should reflect on the applications. If it isn't updated, raise a ticket.
442+
After checking these items, the applications should be able to read the updated configurations. If the applications still aren't updated, raise a ticket.
445443
446-
## Next steps
444+
## Related content
447445
448-
- [Azure Spring Apps](index.yml)
446+
[Azure Spring Apps](index.yml)

0 commit comments

Comments
 (0)