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
# Configure a managed Spring Cloud Config Server in Azure Spring Apps
13
14
14
15
> [!NOTE]
15
16
> Azure Spring Apps is the new name for the Azure Spring Cloud service. Although the service has a new name, you'll see the old name in some places for a while as we work to update assets such as screenshots, videos, and diagrams.
**This article applies to:**✔️ Standard consumption and dedicated (Preview) ✔️ Basic/Standard ✔️ Enterprise
20
21
21
-
This article shows you how to use Spring Cloud Config Server with the Azure Spring Apps Enterprise plan.
22
+
This article shows you how to configure a managed Spring Cloud Config Server in Azure Spring Apps service.
22
23
23
24
Spring Cloud Config Server provides server and client-side support for an externalized configuration in a distributed system. The Spring Cloud 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
25
26
+
::: zone pivot="sc-standard"
27
+
> [!NOTE]
28
+
> To use config server in the Standard consumption and dedicated plan, you must enable it first. For more information, see [Enable and disable Spring Cloud Config Server in Azure Spring Apps](../consumption-dedicated/quickstart-standard-consumption-config-server.md).
29
+
::: zone-end
30
+
25
31
## Prerequisites
26
32
27
33
- 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 instance using the Enterprise plan. To set up and launch an Azure Spring Apps service, see [Quickstart: Build and deploy apps to Azure Spring Apps using the Enterprise plan](../enterprise/quickstart.md?pivots=sc-enterprise&toc=/azure/spring-apps/enterprise/toc.json&bc=/azure/spring-apps/enterprise/breadcrumb/toc.json).
34
+
::: zone pivot="sc-standard"
35
+
- An already provisioned and running Azure Spring Apps service instance using the Basic or Standard plan. To set up and launch an Azure Spring Apps service, see [Quickstart: Deploy your first application to Azure Spring Apps](../enterprise/quickstart.md?pivots=sc-standard&toc=/azure/spring-apps/basic-standard/toc.json&bc=/azure/spring-apps/basic-standard/breadcrumb/toc.json).
36
+
::: zone-end
37
+
::: zone pivot="sc-enterprise"
38
+
- An already provisioned and running Azure Spring Apps service instance. To set up and launch an Azure Spring Apps service, see [Quickstart: Build and deploy apps to Azure Spring Apps using the Enterprise plan](../enterprise/quickstart.md?pivots=sc-enterprise&toc=/azure/spring-apps/enterprise/toc.json&bc=/azure/spring-apps/enterprise/breadcrumb/toc.json).
39
+
::: zone-end
29
40
-[Git](https://git-scm.com/downloads).
30
41
31
42
## Restriction
@@ -139,7 +150,12 @@ The following table shows some examples of patterns for configuring your service
139
150
|*test-config-server-app-1/dev*| The pattern and repository URI matches a Spring boot application named `test-config-server-app-1` with a dev profile. |
140
151
|*test-config-server-app-2/prod*| The pattern and repository URI matches a Spring boot application named `test-config-server-app-2` with a prod profile. |
141
152
142
-
:::image type="content" source="media/how-to-config-server/additional-repositories.png" lightbox="media/how-to-config-server/additional-repositories.png" alt-text="Screenshot of Azure portal showing the Config Server page with the Patterns column of the Additional repositories table highlighted.":::
153
+
::: zone pivot="sc-standard"
154
+
:::image type="content" source="../basic-standard/media/how-to-config-server/additional-repositories.png" lightbox="media/how-to-config-server/additional-repositories.png" alt-text="Screenshot of Azure portal showing the Config Server page with the Patterns column of the Additional repositories table highlighted.":::
155
+
::: zone-end
156
+
::: zone pivot="sc-enterprise"
157
+
:::image type="content" source="media/how-to-enterprise-config-server/additional-repositories.png" lightbox="media/how-to-enterprise-config-server/additional-repositories.png" alt-text="Screenshot of Azure portal showing the Config Server page with the Patterns column of the Additional repositories table highlighted.":::
158
+
::: zone-end
143
159
144
160
## Configure Git repository against Config Server
145
161
@@ -155,11 +171,21 @@ Now that your configuration files are saved in a repository, use the following s
155
171
156
172
1. Select **Validate**.
157
173
158
-
:::image type="content" source="media/how-to-config-server/portal-config.png" lightbox="media/how-to-config-server/portal-config.png" alt-text="Screenshot of Azure portal showing the Config Server page.":::
174
+
::: zone pivot="sc-standard"
175
+
:::image type="content" source="../basic-standard/media/how-to-config-server/portal-config.png" lightbox="media/how-to-config-server/portal-config.png" alt-text="Screenshot of Azure portal showing the Config Server page.":::
176
+
::: zone-end
177
+
::: zone pivot="sc-enterprise"
178
+
:::image type="content" source="media/how-to-enterprise-config-server/portal-config.png" lightbox="media/how-to-enterprise-config-server/portal-config.png" alt-text="Screenshot of Azure portal showing the Config Server page.":::
179
+
::: zone-end
159
180
160
181
1. When validation is complete, select **Apply** to save your changes.
161
182
162
-
:::image type="content" source="media/how-to-config-server/validate-complete.png" lightbox="media/how-to-config-server/validate-complete.png" alt-text="Screenshot of Azure portal showing Config Server page with Apply button highlighted.":::
183
+
::: zone pivot="sc-standard"
184
+
:::image type="content" source="../basic-standard/media/how-to-config-server/validate-complete.png" lightbox="media/how-to-config-server/validate-complete.png" alt-text="Screenshot of Azure portal showing Config Server page with Apply button highlighted.":::
185
+
::: zone-end
186
+
::: zone pivot="sc-enterprise"
187
+
:::image type="content" source="media/how-to-enterprise-config-server/validate-complete.png" lightbox="media/how-to-enterprise-config-server/validate-complete.png" alt-text="Screenshot of Azure portal showing Config Server page with Apply button highlighted.":::
188
+
::: zone-end
163
189
164
190
Updating the configuration can take a few minutes. You should get a notification when the configuration is complete.
165
191
@@ -177,7 +203,7 @@ Use the steps in this section to enter repository information for a public or pr
177
203
178
204
-**Basic Authentication**: 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 **Authentication type** drop-down list, select **HTTP Basic**, and then enter your username and password/token to grant access to Azure Spring Apps. Select **OK**, and then select **Apply** to finish setting up your Config Server instance.
179
205
180
-
:::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.":::
206
+
:::image type="content" source="../basic-standard/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.":::
181
207
182
208
> [!NOTE]
183
209
> 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. If you use such a token, remember to update it before it expires.
@@ -186,7 +212,7 @@ Use the steps in this section to enter repository information for a public or pr
186
212
187
213
-**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.
188
214
189
-
:::image type="content" source="media/how-to-config-server/ssh-auth.png" lightbox="media/how-to-config-server/ssh-auth.png" alt-text="Screenshot of the Default repository section showing authentication settings for SSH authentication.":::
215
+
:::image type="content" source="../basic-standard/media/how-to-config-server/ssh-auth.png" lightbox="media/how-to-config-server/ssh-auth.png" alt-text="Screenshot of the Default repository section showing authentication settings for SSH authentication.":::
190
216
191
217
#### Extra repositories
192
218
@@ -209,7 +235,12 @@ spring:
209
235
210
236
Select the **Import settings** button, and then select the YAML file from your project directory. Select **Import**.
211
237
212
-
:::image type="content" source="media/how-to-config-server/import-settings.png" lightbox="media/how-to-config-server/import-settings.png" alt-text="Screenshot of the Config Server Import settings pane.":::
238
+
::: zone pivot="sc-standard"
239
+
:::image type="content" source="../basic-standard/media/how-to-config-server/import-settings.png" lightbox="media/how-to-config-server/import-settings.png" alt-text="Screenshot of the Config Server Import settings pane.":::
240
+
::: zone-end
241
+
::: zone pivot="sc-enterprise"
242
+
:::image type="content" source="media/how-to-enterprise-config-server/import-settings.png" lightbox="media/how-to-enterprise-config-server/import-settings.png" alt-text="Screenshot of the Config Server Import settings pane.":::
243
+
::: zone-end
213
244
214
245
Your **Notifications** displays an `async` operation. Config Server should report success after 1-2 minutes. The information from your YAML file displays in the Azure portal. Select **Apply** to finish the import.
215
246
@@ -256,8 +287,9 @@ Use the following steps to get your repo URL and credentials.
256
287
- For **Password**, specify the password that you saved in the previous section.
257
288
- Select **OK**, and then wait for the operation to complete.
258
289
259
-
:::image type="content" source="media/how-to-config-server/config-server-azure-repos.png" lightbox="media/how-to-config-server/config-server-azure-repos.png" alt-text="Screenshot of repository configuration settings.":::
290
+
:::image type="content" source="../basic-standard/media/how-to-config-server/config-server-azure-repos.png" lightbox="media/how-to-config-server/config-server-azure-repos.png" alt-text="Screenshot of repository configuration settings.":::
260
291
292
+
::: zone pivot="sc-enterprise"
261
293
### **Bind** **an app** to Spring Cloud Config Server
262
294
263
295
Use the following command to bind an app to Spring Cloud Config Server, enabling the app to pull configurations from Config Server.
@@ -290,7 +322,8 @@ az spring app create \
290
322
291
323
You can also bind your application to the Spring Cloud Config Server from the Azure portal, as shown in the following screenshot:
292
324
293
-
:::image type="content" source="./media/how-to-enterprise-config-server/spring-cloud-config-server-bind-app-when-creation.png" alt-text="Screenshot of the Azure portal that shows the Create App page with the Bind dropdown highlighted.":::
325
+
:::image type="content" source="media/how-to-enterprise-config-server/spring-cloud-config-server-bind-app-when-creation.png" alt-text="Screenshot of the Azure portal that shows the Create App page with the Bind dropdown highlighted.":::
326
+
::: zone-end
294
327
295
328
## Delete your configuration
296
329
@@ -360,6 +393,7 @@ Instead, you can automatically refresh values from Config Server by letting the
360
393
361
394
For more information, see the [config-client-polling](https://github.com/Azure-Samples/azure-spring-apps-samples/tree/main/config-client-polling) sample.
362
395
396
+
::: zone pivot="sc-enterprise"
363
397
## Enable/disable Spring Cloud Config Server after service creation
364
398
365
399
You can enable and disable Spring Cloud Config Server after service creation using the Azure portal or Azure CLI. Before disabling Spring Cloud Config Server, you're required to unbind all of your apps from it.
@@ -388,8 +422,8 @@ az spring config-server delete \
0 commit comments