Skip to content

Commit 68af396

Browse files
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into rs-portal
2 parents 1dba529 + de9c839 commit 68af396

File tree

211 files changed

+1318
-826
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+1318
-826
lines changed
17.8 KB
Loading
30.1 KB
Loading
-7.41 KB
Loading

articles/app-service/provision-resource-bicep.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ ms.author: msangapu
66
ms.topic: article
77
ms.custom: devx-track-bicep
88
ms.date: 11/18/2022
9+
zone_pivot_groups: app-service-bicep
910
---
1011

1112
# Create App Service app using Bicep
@@ -22,6 +23,8 @@ To effectively create resources with Bicep, you'll need to set up a Bicep [devel
2223

2324
## Review the template
2425

26+
::: zone pivot="app-service-bicep-linux"
27+
2528
The template used in this quickstart is shown below. It deploys an App Service plan and an App Service app on Linux and a sample Node.js "Hello World" app from the [Azure Samples](https://github.com/Azure-Samples) repo.
2629

2730
```bicep
@@ -113,6 +116,82 @@ To deploy a different language stack, update `linuxFxVersion` with appropriate v
113116

114117
---
115118

119+
::: zone-end
120+
121+
::: zone pivot="app-service-bicep-windows-container"
122+
123+
The template used in this quickstart is shown below. It deploys an App Service plan and an App Service app on Windows and a sample .NET "Hello World" app from the [Azure Samples](https://github.com/Azure-Samples) repo.
124+
125+
```bicep
126+
param webAppName string = uniqueString(resourceGroup().id) // generate unique name for web app
127+
param location string = resourceGroup().location // location for all resources
128+
param sku string = 'P1V3' // The SKU of App Service Plan
129+
param dockerContainerImage string = 'mcr.microsoft.com/dotnet/framework/samples:aspnetapp' // sample .NET app
130+
var appServicePlanName = toLower('ASP-${webAppName}') // generate unique name for App Service Plan
131+
132+
resource appServicePlan 'Microsoft.Web/serverfarms@2021-02-01' = {
133+
name: appServicePlanName
134+
location: location
135+
sku: {
136+
name: sku
137+
}
138+
properties: {
139+
hyperV: true
140+
}
141+
}
142+
143+
resource webApp 'Microsoft.Web/sites@2024-04-01' = {
144+
name: webAppName
145+
location: location
146+
kind:'app,container,windows'
147+
properties: {
148+
serverFarmId: appServicePlan.id
149+
siteConfig: {
150+
windowsFxVersion: 'DOCKER|${dockerContainerImage}'
151+
appCommandLine: ''
152+
alwaysOn: true
153+
minTlsVersion: '1.3'
154+
}
155+
httpsOnly: true
156+
}
157+
}
158+
159+
```
160+
161+
Two Azure resources are defined in the template:
162+
163+
* [**Microsoft.Web/serverfarms**](/azure/templates/microsoft.web/serverfarms): create an App Service plan.
164+
* [**Microsoft.Web/sites**](/azure/templates/microsoft.web/sites): create an App Service app.
165+
166+
This template contains several parameters that are predefined for your convenience. See the table below for parameter defaults and their descriptions:
167+
168+
| Parameters | Type | Default value | Description |
169+
|------------|---------|------------------------------|-------------|
170+
| webAppName | string | "webApp-**[`<uniqueString>`](../azure-resource-manager/templates/template-functions-string.md#uniquestring)**" | App name |
171+
| location | string | "[[resourceGroup().location](../azure-resource-manager/templates/template-functions-resource.md#resourcegroup)]" | App region |
172+
| sku | string | "P1V3" | Instance size |
173+
| appServicePlanName | string | "toLower('ASP-${webAppName}')" | App Service Plan name |
174+
| dockerContainerImage | string | "mcr.microsoft.com/dotnet/framework/samples:aspnetapp" | container image sample |
175+
176+
---
177+
178+
## Deploy the template
179+
180+
Copy and paste the template to your preferred editor/IDE and save the file to your local working directory.
181+
182+
Azure CLI is used here to deploy the template. You can also use the Azure portal, Azure PowerShell, and REST API. To learn other deployment methods, see [Bicep Deployment Commands](../azure-resource-manager/bicep/deploy-cli.md).
183+
184+
The following code creates a resource group, an App Service plan, and a web app. A default resource group, App Service plan, and location have been set for you. Replace `<app-name>` with a globally unique app name (valid characters are `a-z`, `0-9`, and `-`).
185+
186+
Open up a terminal where the Azure CLI is installed and run the code below to create a .NET app.
187+
188+
```azurecli-interactive
189+
az group create --name myResourceGroup --location "southcentralus" &&
190+
az deployment group create --resource-group myResourceGroup --template-file <path-to-template>
191+
```
192+
193+
::: zone-end
194+
116195
## Validate the deployment
117196

118197
Browse to `http://<app_name>.azurewebsites.net/` and verify it's been created.

articles/azure-functions/functions-bindings-azure-mysql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ This set of articles explains how to work with [Azure Database for MySQL](/azure
2323
|---------|---------|
2424
| Read data from a database | [Input binding](./functions-bindings-azure-mysql-input.md) |
2525
| Save data to a database |[Output binding](./functions-bindings-azure-mysql-output.md) |
26+
| Trigger a function when a change is detected on a MySQL Table | [Trigger binding](./functions-bindings-azure-mysql-trigger.md) |
2627

2728
::: zone pivot="programming-language-csharp"
2829

@@ -171,5 +172,4 @@ In addition to the samples for C#, Java, JavaScript, PowerShell, and Python avai
171172

172173
- [Read data from a database (Input binding)](./functions-bindings-azure-mysql-input.md)
173174
- [Save data to a database (Output binding)](./functions-bindings-azure-mysql-output.md)
174-
- [Trigger Binding](./functions-bindings-azure-mysql-trigger.md)
175-
175+
- [Trigger a function when a change is detected on a table (Trigger binding)](./functions-bindings-azure-mysql-trigger.md)

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

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Azure Container Apps hosting of Azure Functions
33
description: Learn about how you can use Azure Functions on Azure Container Apps to host and manage containerized function apps in Azure.
4-
ms.date: 12/25/2024
4+
ms.date: 01/05/2025
55
ms.topic: conceptual
66
ms.custom: build-2024, linux-related-content
77
# Customer intent: As a cloud developer, I want to learn more about hosting my function apps in Linux containers managed by Azure Container Apps.
@@ -58,11 +58,40 @@ Azure Functions currently supports the following methods of deploying a containe
5858
+ [GitHub Actions](https://github.com/Azure/azure-functions-on-container-apps/tree/main/samples/GitHubActions)
5959
+ [Visual Studio Code](https://github.com/Azure/azure-functions-on-container-apps/tree/main/samples/VSCode%20Sample)
6060

61+
You can continuously deploy your containerized apps from source code using either [Azure Pipelines](functions-how-to-azure-devops.md?pivots=v1#deploy-a-container) or [GitHub Actions](https://github.com/Azure/azure-functions-on-container-apps/tree/main/samples/GitHubActions). The continuous deployment feature of Functions isn't currently supported when deploying to Container Apps.
62+
63+
## Managed identity authorization
64+
65+
For the best security, you should connect to remote services using Microsoft Entra authentication and managed identity authorization. You can use managed identities for these connections:
66+
67+
+ [Default storage account (`AzureWebJobsStorage`)](./functions-reference.md#connections)
68+
+ [Azure Container Registry](functions-deploy-container-apps.md?tabs=acr#create-and-configure-a-function-app-on-azure-with-the-image)
69+
70+
When running in Container Apps, you can use Microsoft Entra ID with managed identities for all binding extensions that support managed identities. Currently, only these binding extensions support event-driven scaling when using managed identity authentication:
71+
72+
+ Azure Event Hubs
73+
+ Azure Queue Storage
74+
+ Azure Service Bus
75+
76+
For other bindings, use fixed replicas when using managed identity authentication. For more information, see the [Functions developer guide](./functions-reference.md#connections).
77+
6178
## Virtual network integration
6279

6380
When you host your function apps in a Container Apps environment, your functions are able to take advantage of both internally and externally accessible virtual networks. To learn more about environment networks, see [Networking in Azure Container Apps environment](../container-apps/networking.md).
6481

65-
## Configure scale rules
82+
## Event-driven scaling
83+
84+
All Functions triggers can be used in your containerized function app. However, only these triggers can dynamically scale (from zero instances) based on received events when running in a Container Apps environment:
85+
86+
+ Azure Event Grid
87+
+ Azure Event Hubs
88+
+ Azure Blob Storage (event-based)
89+
+ Azure Queue Storage
90+
+ Azure Service Bus
91+
+ Durable Functions (MSSQL storage provider)
92+
+ HTTP
93+
+ Kafka
94+
+ Timer
6695

6796
Azure Functions on Container Apps is designed to configure the scale parameters and rules as per the event target. You don't need to worry about configuring the KEDA scaled objects. You can still set minimum and maximum replica count when creating or modifying your function app. The following Azure CLI command sets the minimum and maximum replica count when creating a new function app in a Container Apps environment from an Azure Container Registry:
6897

@@ -86,33 +115,31 @@ A managed resource group gets removed automatically after all function app conta
86115

87116
If you run into any issues with these managed resource groups, you should contact support.
88117

118+
## Application logging
119+
120+
You can monitor your containerized function app hosted in Container Apps using Azure Monitor Application Insights in the same way you do with apps hosted by Azure Functions. For more information, see [Monitor Azure Functions](./monitor-functions.md).
121+
122+
For bindings that support event-driven scaling, scale events are logged as `FunctionsScalerInfo` and `FunctionsScalerError` events in your Log Analytics workspace. For more information, see [Application Logging in Azure Container Apps](../container-apps/logging.md).
123+
89124
## Considerations for Container Apps hosting
90125

91126
Keep in mind the following considerations when deploying your function app containers to Container Apps:
92127

93-
+ While all triggers can be used, only the following triggers can dynamically scale (from zero instances) when running in a Container Apps environment:
94-
+ Azure Event Grid
95-
+ Azure Event Hubs
96-
+ Azure Blob storage (event-based)
97-
+ Azure Queue Storage
98-
+ Azure Service Bus
99-
+ Durable Functions (MSSQL storage provider)
100-
+ HTTP
101-
+ Kafka
102-
+ Timer
103128
+ These limitations apply to Kafka triggers:
104129
+ The protocol value of `ssl` isn't supported when hosted on Container Apps. Use a [different protocol value](functions-bindings-kafka-trigger.md?pivots=programming-language-csharp#attributes).
105-
+ For a Kafka trigger to dynamically scale when connected to Event Hubs, the `username` property must resolve to an application setting that contains the actual username value. When the default `$ConnectionString` value is used, the Kafka trigger won't be able to cause the app to scale dynamically.
130+
+ For a Kafka trigger to dynamically scale when connected to Event Hubs, the `username` property must resolve to an application setting that contains the actual username value. When the default `$ConnectionString` value is used, the Kafka trigger isn't able to cause the app to scale dynamically.
106131
+ For the built-in Container Apps [policy definitions](../container-apps/policy-reference.md#policy-definitions), currently only environment-level policies apply to Azure Functions containers.
107132
+ You can use managed identities for these connections:
108133
+ [Deployment from an Azure Container Registry](functions-deploy-container-apps.md?tabs=acr#create-and-configure-a-function-app-on-azure-with-the-image)
109134
+ [Triggers and bindings](functions-reference.md#configure-an-identity-based-connection)
110135
+ [Required host storage connection](functions-identity-based-connections-tutorial.md)
136+
+ By default, a containerized function app monitors port 80 for incoming requests. If your app must use a different port, use the [`WEBSITES_PORT` application setting](../app-service/reference-app-settings.md#custom-containers) to change this default port.
137+
+ You aren't currently able to use built-in continuous deployment features when hosting on Container Apps. You must instead deploy from source code using either [Azure Pipelines](functions-how-to-azure-devops.md?pivots=v1#deploy-a-container) or [GitHub Actions](https://github.com/Azure/azure-functions-on-container-apps/tree/main/samples/GitHubActions).
111138
+ You currently can't move a Container Apps hosted function app deployment between resource groups or between subscriptions. Instead, you would have to recreate the existing containerized app deployment in a new resource group, subscription, or region.
112139
+ When using Container Apps, you don't have direct access to the lower-level Kubernetes APIs.
113140
+ The `containerapp` extension conflicts with the `appservice-kube` extension in Azure CLI. If you have previously published apps to Azure Arc, run `az extension list` and make sure that `appservice-kube` isn't installed. If it is, you can remove it by running `az extension remove -n appservice-kube`.
114141

115-
## Next steps
142+
## Related articles
116143

117144
+ [Hosting and scale](./functions-scale.md)
118145
+ [Create your first containerized functions on Container Apps](./functions-deploy-container-apps.md)

0 commit comments

Comments
 (0)