Skip to content

Commit a240b03

Browse files
committed
edits
1 parent 95bfde9 commit a240b03

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

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

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: KarlErickson
66
ms.author: xiading
77
ms.service: spring-apps
88
ms.topic: how-to
9-
ms.date: 02/09/2022
9+
ms.date: 03/27/2024
1010
ms.custom: devx-track-java, devx-track-extended-java, engagement-fy23, devx-track-azurecli
1111
---
1212

@@ -65,13 +65,13 @@ The **Refresh Interval** specifies the frequency (in seconds) for checking updat
6565

6666
The following table describes the properties for each repository entry:
6767

68-
| Property | Required? | Description |
69-
|---------------|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
70-
| `Name` | Yes | A unique name to label each Git repository. |
71-
| `Patterns` | Yes | Patterns to search in Git repositories. For each pattern, use a format such as *{application}* or *{application}/{profile}* rather than *{application}-{profile}.yml*. Separate the patterns with commas. For more information, see the [Pattern](#pattern) section of this article. |
72-
| `URI` | Yes | A Git URI (for example, `https://github.com/Azure-Samples/piggymetrics-config` or `[email protected]:Azure-Samples/piggymetrics-config`) |
73-
| `Label` | Yes | The branch name to search in the Git repository. |
74-
| `Search path` | No | Optional search paths, separated by commas, for searching subdirectories of the Git repository. |
68+
| Property | Required? | Description |
69+
|---------------|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
70+
| `Name` | Yes | A unique name to label each Git repository. |
71+
| `Patterns` | Yes | The pattern type to search in Git repositories. For each pattern, use a format such as *{application}* or *{application}/{profile}* rather than *{application}-{profile}.yml*. Separate the patterns with commas. For more information, see the [Pattern](#pattern) section of this article. |
72+
| `URI` | Yes | A Git URI (for example, `https://github.com/Azure-Samples/piggymetrics-config` or `[email protected]:Azure-Samples/piggymetrics-config`) |
73+
| `Label` | Yes | The branch name to search in the Git repository. |
74+
| `Search path` | No | Optional search paths, separated by commas, for searching subdirectories of the Git repository. |
7575

7676
### Pattern
7777

@@ -377,26 +377,23 @@ az spring application-configuration-service delete \
377377

378378
## Examine configuration file in ConfigMap
379379

380-
The following section shows you how to examine the content of configuration file pulled by Application Configuration Service from upstream Git repositories in related Kubernetes ConfigMap (understand more in [Refresh strategies](#refresh-strategies)).
380+
The following section shows you how to examine the content of the configuration file pulled by Application Configuration Service from upstream Git repositories in related Kubernetes ConfigMap. For more information, see the [Refresh strategies](#refresh-strategies) section in this article.
381381

382382
### Assign an Azure role
383-
First you must have the Azure roles `Azure Spring Apps Application Configuration Service Config File Pattern Reader Role` assigned to you.
384383

385-
#### [Azure portal](#tab/azure-Portal)
386-
387-
Use the following steps to assign an Azure role using the Azure portal:
384+
Use the following steps to have the `Azure Spring Apps Application Configuration Service Config File Pattern Reader Role` assigned to you.
388385

389-
1. Open the [Azure portal](https://portal.azure.com).
386+
#### [Azure portal](#tab/azure-Portal)
390387

391-
1. Open your Azure Spring Apps service instance.
388+
1. Open the [Azure portal](https://portal.azure.com) and go to your Azure Spring Apps service instance.
392389

393390
1. In the navigation pane, select **Access Control (IAM)**.
394391

395-
1. On the **Access Control (IAM)** page, select **Add** and then select **Add role assignment**.
392+
1. On the **Access Control (IAM)** page, select **Add**, and then select **Add role assignment**.
396393

397394
:::image type="content" source="media/how-to-enterprise-application-configuration-service/add-role-assignment.png" alt-text="Screenshot of the Azure portal that shows the Access Control (IAM) page for an Azure Spring Apps instance with the Add role assignment option highlighted." lightbox="media/how-to-enterprise-application-configuration-service/add-role-assignment.png":::
398395

399-
1. On the **Add role assignment** page, in the **Name** list, search for and select the target role and then select **Next**.
396+
1. On the **Add role assignment** page, in the **Name** list, search for and select the target role, and then select **Next**.
400397

401398
:::image type="content" source="media/how-to-enterprise-application-configuration-service\application-configuration-service-config-pattern-file-reader-role.png" alt-text="Screenshot of the Azure portal that shows the Add role assignment page for an Azure Spring Apps instance with the Azure Spring Apps Application Configuration Service Config File Pattern Reader Role name highlighted." lightbox="media/how-to-enterprise-application-configuration-service\application-configuration-service-config-pattern-file-reader-role.png":::
402399

@@ -406,20 +403,18 @@ Use the following steps to assign an Azure role using the Azure portal:
406403

407404
#### [Azure CLI](#tab/azure-CLI)
408405

409-
Use the following command to assign an Azure role:
410-
411-
```azurecli
412-
az role assignment create \
413-
--role "Azure Spring Apps Application Configuration Service Config File Pattern Reader Role" \
414-
--scope "<service-instance-resource-id>" \
415-
--assignee "<your-identity>"
416-
```
406+
```azurecli
407+
az role assignment create \
408+
--role "Azure Spring Apps Application Configuration Service Config File Pattern Reader Role" \
409+
--scope "<service-instance-resource-id>" \
410+
--assignee "<your-identity>"
411+
```
417412

418413
---
419414

420415
### Examine configuration file with Azure CLI
421416

422-
Use the following command to view the content of configuration file by [Pattern](#pattern):
417+
Use the following command to view the content of the configuration file by [Pattern](#pattern):
423418

424419
```azurecli
425420
az spring application-configuration-service config show \
@@ -428,7 +423,8 @@ az spring application-configuration-service config show \
428423
--config-file-pattern <pattern>
429424
```
430425

431-
And here is an example output of this command:
426+
The command returns an output similar to the following example:
427+
432428
```json
433429
{
434430
"configurationFiles": {
@@ -440,18 +436,22 @@ And here is an example output of this command:
440436
}
441437
```
442438

443-
You can also use this command with `--export-path {/path/to/target/folder}` parameter to export the configuration file to the specified folder. It supports both relative path and absolute path. If not specified, it will take the path of current directory.
439+
You can also use this command with `--export-path {/path/to/target/folder}` parameter to export the configuration file to the specified folder. It supports both the relative path and the absolute path. If not specified, it takes the path of the current directory.
444440

445441
## Examine configuration file in the app
446-
After you bind the app to the Application Configuration Service and set the [Pattern](#pattern) for the app deployment according to [Use Application Configuration Service with applications](#use-application-configuration-service-with-applications) section, the ConfigMap containing the configuration file for the pattern should be mounted to the application container. You can check the configuration files in each instance of that app deployment with following steps:
447442

448-
1. Connect to one of the instances according to [Connect to an app instance for troubleshooting](./how-to-connect-to-app-instance-for-troubleshooting.md).
449-
2. Use the command `echo $AZURE_SPRING_APPS_CONFIG_FILE_PATH` to find the folders containing the configuration files, it will show a list of locations separated by comma. Following is an example, yours may vary.
450-
- ```output
443+
After you bind the app to the Application Configuration Service and set the [Pattern](#pattern) for the app deployment as described in the [Use Application Configuration Service with applications](#use-application-configuration-service-with-applications) section, the ConfigMap containing the configuration file for the pattern should be mounted to the application container. Use the following steps to check the configuration files in each instance of the app deployment:
444+
445+
1. Connect to one of the application instances. For more information, see [Connect to an app instance for troubleshooting](./how-to-connect-to-app-instance-for-troubleshooting.md).
446+
447+
1. Use the `echo $AZURE_SPRING_APPS_CONFIG_FILE_PATH` command to find the folders containing the configuration files. A list of locations shows up separated by comma, as shown in the following example:
448+
449+
```output
451450
$ echo $AZURE_SPRING_APPS_CONFIG_FILE_PATH
452451
/etc/azure-spring-cloud/configmap/acs-default-payment-default-e9d46,/etc/azure-spring-cloud/configmap/acs-default-catalog-default-616f4
453-
```
454-
3. Then check the content of the configuration file with commands like `cat`.
452+
```
453+
454+
1. Check the content of the configuration file using commands such as `cat`.
455455

456456
## Check logs
457457

@@ -548,8 +548,8 @@ If the latest changes aren't reflected in the applications, check the following
548548
- Confirm that the branch of the desired config file changes is updated.
549549
- Confirm that the pattern configured in the Application Configuration Service matches the updated config files.
550550
- Confirm that the application is bound to the Application Configuration Service.
551-
- Confirm that the `ConfigMap` containing the configuration file for the [Pattern](#pattern) used by the application is updated according to [Examine configuration file in ConfigMap](#examine-configuration-file-in-configmap) section. If it isn't updated, raise a ticket.
552-
- Confirm that the `ConfigMap` is mounted to the application as a file according to [Examine configuration file in the app](#examine-configuration-file-in-the-app) section. If the file isn't updated, wait for the Kubernetes refresh interval (1 minute), or force a refresh by restarting the application.
551+
- Confirm that the `ConfigMap` containing the configuration file for the [Pattern](#pattern) used by the application is updated according to the [Examine configuration file in ConfigMap](#examine-configuration-file-in-configmap) section. If it isn't updated, raise a ticket.
552+
- Confirm that the `ConfigMap` is mounted to the application as a file according to the [Examine configuration file in the app](#examine-configuration-file-in-the-app) section. If the file isn't updated, wait for the Kubernetes refresh interval (1 minute), or force a refresh by restarting the application.
553553
554554
After checking these items, the applications should be able to read the updated configurations. If the applications still aren't updated, raise a ticket.
555555

0 commit comments

Comments
 (0)