Skip to content

Commit ceb3c0e

Browse files
authored
Merge pull request #299625 from MicrosoftDocs/main
5/9/2025 PM Publish
2 parents af77e0a + ad3205e commit ceb3c0e

27 files changed

+567
-369
lines changed

articles/application-gateway/high-traffic-support.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ Make sure to check your subnet size and available IP address count in your subne
4242

4343
:::image type="content" source="./media/application-gateway-covid-guidelines/v2-autoscaling-max-instances-inline.png" alt-text="V2 autoscaling configuration" lightbox="./media/application-gateway-covid-guidelines/v2-autoscaling-max-instances-exp.png":::
4444

45+
> [!NOTE]
46+
> If your traffic requirement needs more than 125 instances, you can use Azure Traffic Manager or Azure Front Door in front of your Application Gateway. For more information, please see [Connect Azure Front Door Premium to an Azure Application Gateway with Private Link](../frontdoor/how-to-enable-private-link-application-gateway.md) and [Use Azure App Gateway with Azure Traffic Manager](../traffic-manager/traffic-manager-use-with-application-gateway.md)
47+
4548
### Set your minimum instance count based on your average Compute Unit usage
4649

4750
For Application Gateway v2 SKU, autoscaling takes three to five minutes to scale out and provision additional set of instances ready to take traffic. Until then, if there are short spikes in traffic, your existing gateway instances might get under stress and this may cause unexpected latency or loss of traffic.

articles/azure-compute-fleet/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
href: quickstart-create-portal.md
77
- name: Create with ARM template
88
href: quickstart-create-rest-api.md
9+
- name: Create using Azure CLI
10+
href: quickstart-create-azure-cli.md
911
expand: true
1012
- name: Allocation strategies
1113
href: allocation-strategies.md
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
---
2+
title: Create an Azure Compute Fleet using Azure CLI
3+
description: Learn how to create an Azure Compute Fleet using Azure CLI.
4+
author: ykh015
5+
ms.author: yakhande
6+
ms.topic: how-to
7+
ms.service: azure-compute-fleet
8+
ms.date: 05/09/2025
9+
ms.reviewer: jushiman
10+
ms.custom: devx-track-azurecli
11+
---
12+
13+
# Create an Azure Compute Fleet using Azure CLI
14+
15+
This article steps through using the Azure CLI to create and deploy a Compute Fleet resource
16+
17+
Make sure that you've installed the latest [Azure CLI](/cli/azure/install-az-cli2) and are logged in to an Azure account with [az login](/cli/azure/reference-index).
18+
19+
## Launch Azure Cloud Shell
20+
21+
The Azure Cloud Shell is a free interactive shell that you can use to run the steps in this article. It has common Azure tools preinstalled and configured to use with your account.
22+
23+
To open the Cloud Shell, select **Open Cloud Shell** from the upper right corner of a code block. You can also launch Cloud Shell in a separate browser tab by going to [https://shell.azure.com/cli](https://shell.azure.com/cli). Select **Copy** to copy the blocks of code, paste it into the Cloud Shell, and press enter to run it.
24+
25+
## Prerequisites
26+
27+
- 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+
- Before using Compute Fleet, complete the feature registration and configure role-based access controls (RBAC).
29+
30+
## Feature registration
31+
32+
Register the Azure Compute Fleet resource provider with your subscription using Azure CLI. Registration can take up to 30 minutes to successfully show as registered.
33+
34+
```azurecli-interactive
35+
az provider register --namespace 'Microsoft.AzureFleet'
36+
```
37+
38+
## Define environment variables
39+
40+
Define environment variables as follows.
41+
42+
```bash
43+
export RANDOM_ID="$(openssl rand -hex 3)"
44+
export MY_RESOURCE_GROUP_NAME="myFleetResourceGroup$RANDOM_ID"
45+
export REGION=EastUS
46+
export MY_FLEET_NAME="myFleet$RANDOM_ID"
47+
export MY_USERNAME=azureuser
48+
export MY_VNET_NAME="myVNet$RANDOM_ID"
49+
export NETWORK_PREFIX="$(($RANDOM % 254 + 1))"
50+
export MY_VNET_PREFIX="10.$NETWORK_PREFIX.0.0/16"
51+
export MY_VM_SN_NAME="myVMSN$RANDOM_ID"
52+
export MY_VM_SN_PREFIX="10.$NETWORK_PREFIX.0.0/24"
53+
```
54+
55+
## Create a resource group
56+
57+
A resource group is a logical container into which Azure resources are deployed and managed. All resources must be placed in a resource group. The following command creates a resource group with the previously defined `$MY_RESOURCE_GROUP_NAME` and `$REGION` parameters.
58+
59+
```azurecli-interactive
60+
az group create --name $MY_RESOURCE_GROUP_NAME --location $REGION
61+
```
62+
63+
## Create virtual network and subnet
64+
65+
Now you'll create a virtual network using the previously defined `$MY_VNET_PREFIX`, `$MY_VM_SN_NAME`, and `$MY_VM_SN_PREFIX` parameters.
66+
67+
```azurecli-interactive
68+
az network vnet create --name $MY_VNET_NAME --resource-group $MY_RESOURCE_GROUP_NAME --location $REGION --address-prefix $MY_VNET_PREFIX --subnet-name $MY_VM_SN_NAME --subnet-prefix $MY_VM_SN_PREFIX
69+
```
70+
71+
The following command gets the subnet ARM ID.
72+
73+
```azurecli-interactive
74+
export MY_SUBNET_ID="$(az network vnet subnet show \
75+
--resource-group $MY_RESOURCE_GROUP_NAME \
76+
--vnet-name $MY_VNET_NAME \
77+
--name $MY_VM_SN_NAME \
78+
--query id --output tsv)"
79+
```
80+
81+
## Set up the admin password
82+
83+
Set up a password that meets the [password requirements for Azure VMs](https://learn.microsoft.com/azure/virtual-machines/windows/faq#what-are-the-password-requirements-when-creating-a-vm-).
84+
85+
```bash
86+
export ADMIN_PASSWORD="Azure compliant password"
87+
```
88+
89+
## Create a Compute Fleet
90+
91+
Set up the compute profile which is applied to the underlying VMs.
92+
93+
```bash
94+
export COMPUTE_PROFILE="{ 'baseVirtualMachineProfile': { 'storageProfile': { 'imageReference': { 'publisher':'canonical', 'offer':'0001-com-ubuntu-server-focal', 'sku': '20_04-lts-gen2', 'version': 'latest' } }, 'osProfile': { 'computerNamePrefix': 'vm', 'adminUsername': '$MY_USERNAME', 'adminPassword': '$ADMIN_PASSWORD'}, 'networkProfile': { 'networkInterfaceConfigurations': [{ 'name': 'nic', 'primary': 'true', 'enableIPForwarding': 'true', 'ipConfigurations': [{ 'name': 'ipc', 'subnet': { 'id': '$MY_SUBNET_ID' } }] }], 'networkApiVersion': '2020-11-01'} } }"
95+
```
96+
97+
```azurecli-interactive
98+
az compute-fleet create --name $MY_FLEET_NAME --resource-group $MY_RESOURCE_GROUP_NAME --location $REGION \
99+
--spot-priority-profile "{ 'capacity': 5 }" \
100+
--regular-priority-profile "{ 'capacity': 5 }" \
101+
--compute-profile "$COMPUTE_PROFILE" \
102+
--vm-sizes-profile "[{ 'name': 'Standard_F1s' }]"
103+
```
104+
105+
## Clean up resources (optional)
106+
107+
To avoid Azure charges, you should clean up unneeded resources. When you no longer need your Compute Fleet and other resources, delete the resource group and all its resources with [az group delete](/cli/azure/group). The `--no-wait` parameter returns control to the prompt without waiting for the operation to complete. The `--yes` parameter confirms that you wish to delete the resources without another prompt to do so.
108+
109+
## Next steps
110+
> [!div class="nextstepaction"]
111+
> [Learn how to modify a Compute Fleet.](modify-fleet.md)

articles/azure-functions/durable/durable-functions-mssql-container-apps-hosting.md

Lines changed: 16 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ ms.topic: how-to
55
ms.date: 05/06/2025
66
---
77

8-
# Host a Durable Functions app in Azure Container Apps (preview)
8+
# Host a Durable Functions app in Azure Container Apps (.NET isolated)
99

10-
While Durable Functions supports several [storage providers](./durable-functions-storage-providers.md) or *backends*, autoscaling apps hosted in Azure Container Apps is only available with the Microsoft SQL (MSSQL) backend. If another backend is used, you need to [manually set up scaling](../functions-container-apps-hosting.md#event-driven-scaling).
10+
Azure Functions provides integrated support for developing, deploying, and managing containerized Function Apps on Azure Container Apps. Use Azure Container Apps for your Functions apps when you need to run in the same environment as other microservices, APIs, websites, workflows, or any container hosted programs. Learn more about [running Azure Functions in Container Apps](../../container-apps/functions-overview.md).
11+
12+
> [!NOTE]
13+
> While Durable Functions supports several [storage providers](./durable-functions-storage-providers.md) or *backends*, autoscaling apps hosted in Azure Container Apps is only available with the [Microsoft SQL (MSSQL) backend](../../container-apps/functions-overview.md#event-driven-scaling). If another backend is used, you have to set minimum replica count to greater than zero.
1114
1215
In this article, you learn how to:
1316

@@ -78,7 +81,7 @@ Build the Docker image. Find the complete list of supported base images for Azur
7881
7982
1. When prompted, log in with your username and password. A "Login Succeeded" message confirms that you're signed in.
8083
81-
1. Navigate to the `LocalFunctionProj` project folder.
84+
1. Navigate to your project root directory.
8285
8386
1. Run the following command to build the image, replacing `<DOCKER_ID>` with your Docker Hub account ID:
8487
@@ -87,7 +90,7 @@ Build the Docker image. Find the complete list of supported base images for Azur
8790
imageName=IMAGE_NAME>
8891
imageVersion=v1.0.0
8992
90-
docker build --platform linux --tag $dockerId/$imageName:$imageVersion .
93+
docker build --tag $dockerId/$imageName:$imageVersion .
9194
```
9295
9396
> [!NOTE]
@@ -108,7 +111,6 @@ Create the Azure resources necessary for running Durable Functions on a containe
108111
- **Azure Container App environment:** Environment hosting the container app.
109112
- **Azure Container App:** Image containing the Durable Functions app is deployed to this app.
110113
- **Azure Storage Account:** Required by the function app to store app-related data, such as application code.
111-
- **A virtual network:** Required by the Azure Container App environment.
112114
113115
### Initial set up
114116
@@ -117,7 +119,7 @@ Create the Azure resources necessary for running Durable Functions on a containe
117119
```azurecli
118120
az login
119121
120-
az account set -subscription | -s <subscription_name>
122+
az account set -s <subscription_name>
121123
```
122124
123125
1. Run the required commands to set up the Azure Container Apps CLI extension:
@@ -153,34 +155,6 @@ A [workload profile](../functions-container-apps-hosting.md#hosting-and-workload
153155
az group create --name $resourceGroup --location $location
154156
```
155157
156-
1. Create a virtual network, which is required for a container app environment.
157-
158-
```azurecli
159-
az network vnet create --resource-group $resourceGroup --name $vnet --location $location --address-prefix 10.0.0.0/16
160-
```
161-
162-
1. Create a subnet for the environment deployment.
163-
164-
```azurecli
165-
az network vnet subnet create \
166-
--resource-group $resourceGroup \
167-
--vnet-name $vnet \
168-
--name infrastructure-subnet \
169-
--address-prefixes 10.0.0.0/23
170-
```
171-
172-
1. Run the following query to get the subnet ID.
173-
174-
```azurecli
175-
subnetId=$(az network vnet subnet show --resource-group $resourceGroup --vnet-name $vnet --name infrastructure-subnet --query "id" -o tsv | tr -d '[:space:]')
176-
```
177-
178-
1. Delegate the subnet to `Microsoft.App/environments`.
179-
180-
```azurecli
181-
az network vnet subnet update --resource-group $resourceGroup --vnet-name $vnet --name infrastructure-subnet --delegations Microsoft.App/environments
182-
```
183-
184158
1. Create the container app environment.
185159
186160
```azurecli
@@ -189,7 +163,6 @@ A [workload profile](../functions-container-apps-hosting.md#hosting-and-workload
189163
--resource-group $resourceGroup \
190164
--name $containerAppEnv \
191165
--location $location \
192-
--infrastructure-subnet-resource-id $subnetId
193166
```
194167
195168
1. Create a container app based on the Durable Functions image.
@@ -200,14 +173,11 @@ A [workload profile](../functions-container-apps-hosting.md#hosting-and-workload
200173
--environment $containerAppEnv \
201174
--image $dockerId/$imageName:$imageVersion \
202175
--ingress external \
203-
--allow-insecure \
204-
--target-port 80 \
205-
--transport auto \
206176
--kind functionapp \
207177
--query properties.outputs.fqdn
208178
```
209179
210-
1. Make note of the app URL, which should look similar to `https://<APP_NAME>.victoriouswave-3866c33e.<REGION>.azurecontainerapps.io`.
180+
1. Make note of the app URL, which should look similar to `https://<APP_NAME>.<ENVIRONMENT_IDENTIFIER>.<REGION>.azurecontainerapps.io`.
211181
212182
### Create databases
213183
@@ -264,22 +234,22 @@ In this section, you set up **user-assigned managed identity** for Azure Storage
264234
clientId=$(az identity show --name $identity --resource-group $resourceGroup --query 'clientId' --output tsv)
265235
```
266236
267-
1. Assign the role `Storage Blob Data Owner` role for access to the storage account.
237+
1. Assign the role **Storage Blob Data Owner** role for access to the storage account.
268238
269239
```azurecli
270240
echo "Assign Storage Blob Data Owner role to identity"
271241
az role assignment create --assignee "$clientId" --role "Storage Blob Data Owner" --scope "$scope"
272242
```
273243
274244
### Set up app settings
275-
276-
Authenticating to the MSSQL database using managed identity isn't supported when hosting a Durable Functions app in Azure Container Apps. For now, this guide authenticates using connection strings.
245+
> [!NOTE]
246+
> Authenticating to the MSSQL database using managed identity isn't supported when hosting a Durable Functions app in Azure Container Apps. For now, this guide authenticates using connection strings.
277247
278248
1. From the SQL database resource in the Azure portal, navigate to **Settings** > **Connection strings** to find the connection string.
279249
280250
:::image type="content" source="./media/quickstart-mssql/mssql-azure-db-connection-string.png" alt-text="Screenshot showing database connection string.":::
281251
282-
The connection string should be a format similar to:
252+
The connection string should have a format similar to:
283253
284254
```bash
285255
dbserver=<SQL_SERVER_NAME>
@@ -297,11 +267,9 @@ Authenticating to the MSSQL database using managed identity isn't supported when
297267
1. Store the SQL database's connection string as a [secret](../../container-apps/manage-secrets.md) called *sqldbconnection* in the container app.
298268
299269
```azurecli
300-
az containerapp create \
270+
az containerapp secret set \
301271
--resource-group $resourceGroup \
302272
--name $functionApp \
303-
--environment $containerAppEnv \
304-
--image $dockerId/$imageName:$imageVersion \
305273
--secrets sqldbconnection=$connStr
306274
```
307275
@@ -323,7 +291,7 @@ Authenticating to the MSSQL database using managed identity isn't supported when
323291
1. Use an HTTP test tool to send a `POST` request to the HTTP trigger endpoint, which should be similar to:
324292
325293
```
326-
https://<APP NAME>.victoriouswave-3866c33e.<REGION>.azurecontainerapps.io/api/DurableFunctionsOrchestrationCSharp1_HttpStart
294+
https://<APP NAME>.<ENVIRONMENT_IDENTIFIER>.<REGION>.azurecontainerapps.io/api/DurableFunctionsOrchestrationCSharp1_HttpStart
327295
```
328296
329297
The response is the HTTP function's initial result letting you know that the Durable Functions orchestration started successfully. While the response includes a few useful URLs, it doesn't yet display the orchestration's end result.
@@ -348,6 +316,6 @@ Authenticating to the MSSQL database using managed identity isn't supported when
348316
## Next steps
349317
350318
Learn more about:
351-
- [Azure Container Apps hosting of Azure Functions](../functions-container-apps-hosting.md).
319+
- [Azure Container Apps hosting of Azure Functions](../../container-apps/functions-overview.md).
352320
- [MSSQL storage provider](https://microsoft.github.io/durabletask-mssql/) architecture, configuration, and workload behavior.
353321
- The Azure-managed storage backend, [Durable Task Scheduler](./durable-task-scheduler/durable-task-scheduler.md).

0 commit comments

Comments
 (0)