Skip to content

Commit 87d3cb2

Browse files
committed
PR review
1 parent c264f0f commit 87d3cb2

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

articles/azure-app-configuration/quickstart-container-apps.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Quickstart: Connect a container app to App Configuration"
2+
title: "Quickstart: Use Azure App Configuration in Azure Container Apps"
33
description: Learn how to connect a containerized application to Azure App Configuration, using Service Connector.
44
services: azure-app-configuration
55
author: maud-lv
@@ -10,16 +10,16 @@ ms.author: malev
1010

1111
---
1212

13-
# Connect an ASP.NET Core app to App Configuration using Service Connector
13+
# Quickstart: Use Azure App Configuration in Azure Container Apps
1414

15-
In this quickstart, learn how to connect a container app to Azure App Configuration using Service Connector. This quickstart leverages the ASP.NET application created in [Quickstart: Create an ASP.NET Core app with App Configuration](./quickstart-aspnet-core-app.md). Complete this quickstart before you continue.
15+
In this quickstart, you will use Azure App Configuration in an ASP.NET Core app running in Azure Container Apps. This way, you can centralize the storage and management of your Container Apps configuration. This quickstart leverages the ASP.NET Core app created in [Quickstart: Create an ASP.NET Core app with App Configuration](./quickstart-aspnet-core-app.md). You will containerize the app and deploy it to Azure Container Apps. Complete the quickstart before you continue.
1616

1717
> [!TIP]
1818
> While following this quickstart, preferably register all new resources within a single resource group, so that you can regroup them all in a single place and delete them faster later on if you don't need them anymore.
1919
2020
## Prerequisites
2121

22-
- This quickstart assumes that you've completed the quickstart [Create an ASP.NET Core app with App Configuration](./quickstart-aspnet-core-app.md).
22+
- The App Configuration store and the ASP.NET Core App that you created in the [Quickstart: Create an ASP.NET Core app with App Configuration](./quickstart-aspnet-core-app.md).
2323
- [Docker Desktop](https://www.docker.com/products/docker-desktop)
2424
- The [Azure CLI](/cli/azure/install-azure-cli)
2525

@@ -41,7 +41,7 @@ To create the container app and container apps environment using the Azure CLI,
4141

4242
## Connect Azure Container Apps to Azure App Configuration
4343

44-
In the next step, connect the container app to Azure App Configuration using [Service Connector](../service-connector/overview.md). Service Connector helps you connect several Azure services together in a few steps without having to manage the configuration of the network settings and connection information yourself.
44+
In the next step, you will add the connection string of your App Configuration store to the secret of your Container App and add an environment variable to your container to reference the secret. You use the [Service Connector](../service-connector/overview.md) to do this in a few steps without managing the connection information yourself.
4545

4646
#### [Portal](#tab/azure-portal)
4747

@@ -58,6 +58,8 @@ Connect the container app to Azure App Configuration following the [Service Conn
5858
- expand the **Advanced** menu, edit the environment variable name "AZURE_APPCONFIGURATION_CONNECTIONSTRING" by changing it to "ConnectionStrings__AppConfig" and select **Done**
5959
- Use default values for everything else.
6060

61+
Once done, an environment variable named **ConnectionStrings__AppConfig** will be added to the container of your Container App. Its value is a reference of the Container App secret, the connection string of your App Configuration store. The _ConnectionStrings__AppConfig_ is the environment variable your app built from the quickstart will look for.
62+
6163
#### [Azure CLI](#tab/azure-cli)
6264

6365
Run the Azure CLI command `az containerapp connection connection create` to create a service connection from the container app, using a connection string.
@@ -87,7 +89,7 @@ Connect the container app to Azure App Configuration following the [Service Conn
8789

8890
1. Run the [dotnet publish](/dotnet/core/tools/dotnet-publish) command to build the app in release mode and create the assets in the *published* folder.
8991

90-
```csharp
92+
```dotnet
9193
dotnet publish -c Release -o published
9294
```
9395
@@ -131,16 +133,16 @@ Push the Docker image to the ACR created earlier.
131133
132134
1. Run the [az acr login](/cli/azure/acr#az-acr-login) command to log in to the registry.
133135
134-
```docker
136+
```azurecli
135137
az acr login --name myregistry
136138
```
137139
138140
The command returns `Login Succeeded` once login is successful.
139141
140-
1. 1. Use [docker tag](https://docs.docker.com/engine/reference/commandline/tag/) to tag the image with the ACR name
142+
1. Use [docker tag](https://docs.docker.com/engine/reference/commandline/tag/) to tag the image with the ACR name
141143
142144
```docker
143-
docker tag aspnetapp myregistry.azurecr.io/aspnetapp:vfeb06
145+
docker tag aspnetapp myregistry.azurecr.io/aspnetapp:v1
144146
```
145147
146148
> [!TIP]
@@ -150,7 +152,7 @@ Push the Docker image to the ACR created earlier.
150152
151153
Method:
152154
153-
```bash
155+
```docker
154156
docker push <login-server>/<image-name>:<tag>
155157
```
156158
@@ -169,21 +171,16 @@ Update the existing container app by importing the docker image you created and
169171
1. Open your Azure Container Apps instance.
170172
1. In the left menu, under **Application**, select **Containers**.
171173
1. Select **Edit and deploy**.
172-
1. Under **Container image**, select the existing container image.
173-
1. Use the following configuration:
174+
1. Under **Container image**, select the name of the existing container image.
175+
1. Update the following settings:
174176
175177
| Setting | Suggested value | Description |
176178
|-----------------------|---------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
177-
| Name | *MyContainerImage* | The name of the existing container image is displayed. Optionally edit it. |
178179
| Image source | *Azure Container Registry* | Select Azure Container Registry as your image source. |
179180
| Authentication | *Admin Credentials* | Connect with the admin user credentials enabled in the Azure Container Registry. |
180181
| Registry | *myregistry.azurecr.io* | Select the Azure Container Registry you created earlier. |
181182
| Image | *aspnetapp* | Select the docker image you created and pushed to ACR earlier. |
182183
| Image tag | *v1* | Select your image tag from the list. |
183-
| OS type | *Linux* | Linux is automatically suggested. |
184-
| Command override | Leave empty | Optional. Leave this field empty. |
185-
| CPU and memory | 0.25 CPU cores, 0.5 Gi memory | CPU and memory selected by default. |
186-
| Environment variables | Name: ConnectionStrings__AppConfig; Source: Reference a secret; Value connectionstrings--appconfig-abcd | By default, Container Apps suggests the "ConnectionStrings__AppConfig" environment variable and references the secret value for your App Configuration store. |
187184
188185
1. Select **Save** and then **Create** to deploy the update to Azure Container App.
189186

0 commit comments

Comments
 (0)