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
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/durable-functions-mssql-container-apps-hosting.md
+21-23Lines changed: 21 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ This article shows how to host a Durable Functions app in Azure Container Apps.
28
28
In Visual Studio Code, [create a .NET isolated Durable Functions project](./quickstart-mssql.md) configured to use the MSSQL backend. Follow the article until the [Test locally](./quickstart-mssql.md#test-locally) section and make sure you can run the app locally before going to the next step.
29
29
30
30
### Add Docker related files
31
-
1. In the project root directory, add a _Dockerfile_ with the following content:
31
+
1. In the project root directory, add a *Dockerfile* with the following content:
32
32
```
33
33
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS installer-env
34
34
@@ -46,13 +46,13 @@ In Visual Studio Code, [create a .NET isolated Durable Functions project](./quic
1. Add a _.dockerignore_ file with the following content:
49
+
1. Add a *.dockerignore* file with the following content:
50
50
```
51
51
local.settings.json
52
52
```
53
53
54
54
## Build the container image
55
-
The Dockerfile in the project root describes the minimum required environment to run the function app in a container. The complete list of supported base images for Azure Functions is documented above as Host images in the pre-requisites section or can be found in the [Azure Functions Base by Microsoft | Docker Hub](https://hub.docker.com/_/microsoft-azure-functions-base)
55
+
The Dockerfile in the project root describes the minimum required environment to run the function app in a container. You can find the complete list of supported base images for Azure Functions documented as Host images in the prerequisites section or can be found in the [Azure Functions Base by Microsoft | Docker Hub](https://hub.docker.com/_/microsoft-azure-functions-base)
56
56
57
57
1. Start the Docker daemon.
58
58
@@ -75,24 +75,24 @@ The Dockerfile in the project root describes the minimum required environment to
75
75
docker push $dockerId/$imageName:$imageVersion
76
76
```
77
77
78
-
Depending on network speed, pushing the image the first time might take a few minutes (pushing subsequent changes is much faster). While you're waiting, proceed to the next section to create Azure resources in another terminal.
78
+
Depending on network speed, pushing the image the first time might take a few minutes (pushing subsequent changes is faster). While you're waiting, proceed to the next section to create Azure resources in another terminal.
79
79
80
80
## Create Azure resources
81
-
The following instructions will guide you through creating these Azure resources:
81
+
The following instructions guide you through creating these Azure resources:
82
82
- Azure resource group: For convenient cleanup later, all resources are created in this group.
83
83
- Azure Container App environment: Environment where container app is hosted.
84
84
- Azure Container App: Image containing the Durable Functions app is deployed to this app.
85
85
- Azure Storage Account: Required by the function app to store app related data such as application code.
86
86
- A virtual network: Required when running container apps.
87
87
88
-
### Initial set up
89
-
1. Login to your Azure subscription:
88
+
### Initial setup
89
+
1. Log in to your Azure subscription:
90
90
```azurecli
91
91
az login
92
92
az account set -subscription | -s <subscription_name>
93
93
```
94
94
95
-
1. Run the required commands to set up the Azure Container Apps CLI extension:
95
+
1. Run the required commands to setup the Azure Container Apps CLI extension:
96
96
```azurecli
97
97
az upgrade
98
98
@@ -104,7 +104,7 @@ az provider register --namespace Microsoft.OperationalInsights
104
104
```
105
105
106
106
### Create app related resources
107
-
A workload profile determines the amount of compute and memory resources available to the container apps deployed in an environment. The following creates a Consumption workload profile for scale-to-zero support and pay-per-use. Learn more about [workload profiles](../functions-container-apps-hosting.md#hosting-and-workload-profiles).
107
+
A workload profile determines the amount of compute and memory resources available to the container apps deployed in an environment. Create a Consumption workload profile for scale-to-zero support and pay-per-use. Learn more about [workload profiles](../functions-container-apps-hosting.md#hosting-and-workload-profiles).
108
108
109
109
```azurecli
110
110
location=<REGION>
@@ -167,14 +167,14 @@ You need to create an Azure Storage account for storing app related data:
Your Durable Functions also needs an Azure SQL Database as its storage backend. This is where state information is persisted as your orchestrations run. In the Azure portal, you can [create an Azure SQL database](/azure/azure-sql/database/single-database-create-quickstart). During creation:
171
-
- Enable Azure services and resources to access this server (under _Networking_)
172
-
- Set the value for _Database collation_ (under _Additional settings_) to `Latin1_General_100_BIN2_UTF8`.
170
+
Your Durable Functions also needs an Azure SQL Database as its storage backend. This backend is where state information is persisted as your orchestrations run. In the Azure portal, you can [create an Azure SQL database](/azure/azure-sql/database/single-database-create-quickstart). During creation:
171
+
- Enable Azure services and resources to access this server (under **Networking**)
172
+
- Set the value for **Database collation** (under **Additional settings**) to `Latin1_General_100_BIN2_UTF8`.
173
173
174
-
> [!NOTE] Enabling the **Allow Azure services and resources to access this server** setting is not a recommended security practice for production scenarios. Real applications should implement more secure approaches, such as stronger firewall restrictions or virtual network configurations.
174
+
> [!NOTE] Enabling the **Allow Azure services and resources to access this server** setting isn't a recommended security practice for production scenarios. Real applications should implement more secure approaches, such as stronger firewall restrictions or virtual network configurations.
175
175
176
176
### Configure identity-based authentication
177
-
Managed identities make your app more secure by eliminating secrets from your app, such as credentials in the connection strings. You can choose between [system-assigned and user-assigned managed identity](/entra/identity/managed-identities-azure-resources/overview). This article demonstrates setting up user-assigned managed identity, which is the recommended option as it is not tied to the app lifecycle.
177
+
Managed identities make your app more secure by eliminating secrets from your app, such as credentials in the connection strings. You can choose between [system-assigned and user-assigned managed identity](/entra/identity/managed-identities-azure-resources/overview). This article demonstrates setting up user-assigned managed identity, which is the recommended option as it isn't tied to the app lifecycle.
178
178
179
179
1. Create identity and assign it to the container app:
180
180
```azurecli
@@ -223,7 +223,7 @@ Managed identities make your app more secure by eliminating secrets from your ap
223
223
```
224
224
225
225
> [!NOTE]
226
-
> Authenticating to the MSSQL database using managed identity is not yet supported when hosting a Durable Functions app in Azure Container Apps. Only connection string is supported today.
226
+
> Authenticating to the MSSQL database using managed identity isn't yet supported when hosting a Durable Functions app in Azure Container Apps. Only connection string is supported today.
227
227
>
228
228
> If you forget the password from the previous database creation step, you can reset it on the SQL server resource:
@@ -266,7 +266,7 @@ Managed identities make your app more secure by eliminating secrets from your ap
266
266
267
267
The response is the HTTP function's initial result. It lets you know that the Durable Functions orchestration started successfully. It doesn't yet display the end result of the orchestration. The response includes a few useful URLs.
268
268
269
-
1. Copy the URL value for `statusQueryGetUri`, paste it in your browser's address bar, and execute the request. Alternatively, you can also continue to use the HTTP test tool to issue the GET request.
269
+
1. Copy the URL value for `statusQueryGetUri`, paste it in your browser's address bar, and execute the request. Alternatively, you can also continue to use the HTTP test tool to issue the `GET` request.
270
270
271
271
The request queries the orchestration instance for the status. You should see that the instance finished and that it includes the outputs or results of the Durable Functions app like in this example:
272
272
@@ -286,9 +286,7 @@ Managed identities make your app more secure by eliminating secrets from your ap
286
286
287
287
## Next steps
288
288
289
-
- Learn more about [Azure Container Apps hosting of Azure Functions](../functions-container-apps-hosting.md).
290
-
- See the [MSSQL storage provider documentation](https://microsoft.github.io/durabletask-mssql/) for more information about this backend's architecture, configuration, and workload behavior.
291
-
- Learn about the Azure-managed storage backend [Durable Task Scheduler](./durable-task-scheduler/durable-task-scheduler.md)
292
-
293
-
294
-
289
+
Learn more about:
290
+
- [Azure Container Apps hosting of Azure Functions](../functions-container-apps-hosting.md).
291
+
- [MSSQL storage provider](https://microsoft.github.io/durabletask-mssql/) architecture, configuration, and workload behavior.
292
+
- The Azure-managed storage backend, [Durable Task Scheduler](./durable-task-scheduler/durable-task-scheduler.md).
0 commit comments