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/functions-container-apps-hosting.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Azure Container Apps hosting of Azure Functions
3
3
description: Learn about how you can use Azure Container Apps to host containerized function apps in Azure Functions.
4
-
ms.date: 05/04/2023
4
+
ms.date: 07/30/2023
5
5
ms.topic: conceptual
6
6
ms.custom: references_regions, build-2023
7
7
# Customer intent: As a cloud developer, I want to learn more about hosting my function apps in Linux containers by using Azure Container Apps.
@@ -59,12 +59,12 @@ Keep in mind the following considerations when deploying your function app conta
59
59
+ Australia East
60
60
+ Central US
61
61
+ East US
62
-
+ East Us 2
62
+
+ East US 2
63
63
+ North Europe
64
64
+ South Central US
65
65
+ UK South
66
66
+ West Europe
67
-
+ West US3
67
+
+ West US 3
68
68
+ When your container is hosted in a [Consumption + Dedicated plan structure](../container-apps/plans.md#consumption-dedicated), only the default Consumption plan is currently supported. Dedicated plans in this structure aren't yet supported for Functions. When running functions on Container Apps, you're charged only for the Container Apps usage. For more information, see the [Azure Container Apps pricing page](https://azure.microsoft.com/pricing/details/container-apps/).
69
69
+ While all triggers can be used, only the following triggers can dynamically scale (from zero instances) when running on Container Apps:
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-core-tools-reference.md
+45-8Lines changed: 45 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Azure Functions Core Tools reference
3
3
description: Reference documentation that supports the Azure Functions Core Tools (func.exe).
4
4
ms.topic: reference
5
-
ms.date: 07/13/2021
5
+
ms.date: 07/30/2023
6
6
---
7
7
8
8
# Azure Functions Core Tools reference
@@ -15,6 +15,7 @@ Core Tools commands are organized into the following contexts, each providing a
15
15
| ----- | ----- |
16
16
|[`func`](#func-init)| Commands used to create and run functions on your local computer. |
17
17
|[`func azure`](#func-azure-functionapp-fetch-app-settings)| Commands for working with Azure resources, including publishing. |
18
+
|[`func azurecontainerapps`](#func-azurecontainerapps-deploy)| Deploy containerized function app to Azure Container Apps. |
18
19
|[`func durable`](#func-durable-delete-task-hub)| Commands for working with [Durable Functions](./durable/durable-functions-overview.md). |
19
20
|[`func extensions`](#func-extensions-install)| Commands for installing and managing extensions. |
20
21
|[`func kubernetes`](#func-kubernetes-deploy)| Commands for working with Kubernetes and Azure Functions. |
@@ -163,7 +164,7 @@ func host start
163
164
|**`--timeout`**| The timeout for the Functions host to start, in seconds. Default: 20 seconds.|
164
165
|**`--useHttps`**| Bind to `https://localhost:{port}` rather than to `http://localhost:{port}`. By default, this option creates a trusted certificate on your computer.|
165
166
166
-
In version 1.x, you can also use the [`func run` command](#func-run) to run a specific function and pass test data to it.
167
+
In version 1.x, you can also use the [`func run`](#func-run) command to run a specific function and pass test data to it.
167
168
168
169
---
169
170
@@ -209,7 +210,7 @@ To learn more, see [Enable streaming logs](functions-run-local.md#enable-streami
209
210
Deploys a Functions project to an existing function app resource in Azure.
210
211
211
212
```command
212
-
func azure functionapp publish <FunctionAppName>
213
+
func azure functionapp publish <APP_NAME>
213
214
```
214
215
215
216
For more information, see [Deploy project files](functions-run-local.md#project-file-deployment).
@@ -220,20 +221,25 @@ The following publish options apply, based on version:
|**`--access-token`**| Let's you use a specific access token when performing authenticated azure actions. |
225
+
|**`--access-token-stdin `**| Reads a specific access token from a standard input. Use this when reading the token directly from a previous command such as [`az account get-access-token`](/cli/azure/account#az-account-get-access-token). |
223
226
|**`--additional-packages`**| List of packages to install when building native dependencies. For example: `python3-dev libevent-dev`. |
224
227
|**`--build`**, **`-b`**| Performs build action when deploying to a Linux function app. Accepts: `remote` and `local`. |
225
228
|**`--build-native-deps`**| Skips generating the `.wheels` folder when publishing Python function apps. |
226
229
|**`--csx`**| Publish a C# script (.csx) project. |
230
+
|**`--dotnet-cli-params`**| When publishing compiled C# (.csproj) functions, the core tools calls `dotnet build --output bin/publish`. Any parameters passed to this are appended to the command line. |
227
231
|**`--force`**| Ignore prepublishing verification in certain scenarios. |
228
-
|**`--dotnet-cli-params`**| When publishing compiled C# (.csproj) functions, the core tools calls `dotnet build --output bin/publish`. Any parameters passed to this will be appended to the command line. |
229
232
|**`--list-ignored-files`**| Displays a list of files that are ignored during publishing, which is based on the `.funcignore` file. |
230
233
|**`--list-included-files`**| Displays a list of files that are published, which is based on the `.funcignore` file. |
234
+
|**`--management-url`**| Sets the management URL for your cloud. Use this when running in a sovereign cloud. |
231
235
|**`--no-build`**| Project isn't built during publishing. For Python, `pip install` isn't performed. |
232
236
|**`--nozip`**| Turns the default `Run-From-Package` mode off. |
233
237
|**`--overwrite-settings -y`**| Suppress the prompt to overwrite app settings when `--publish-local-settings -i` is used.|
234
238
|**`--publish-local-settings -i`**| Publish settings in local.settings.json to Azure, prompting to overwrite if the setting already exists. If you're using a [local storage emulator](functions-develop-local.md#local-storage-emulator), first change the app setting to an [actual storage connection](functions-run-local.md#get-your-storage-connection-strings). |
235
239
|**`--publish-settings-only`**, **`-o`**| Only publish settings and skip the content. Default is prompt. |
236
240
|**`--slot`**| Optional name of a specific slot to which to publish. |
241
+
|**`--subscription`**| Sets the default subscription to use. |
242
+
237
243
238
244
# [v1.x](#tab/v1)
239
245
@@ -252,6 +258,39 @@ Gets the connection string for the specified Azure Storage account.
Deploys a containerized function app to an Azure Container Apps environment. Both the storage account used by the function app and the environment must already exist. For more information, see [Azure Container Apps hosting of Azure Functions](functions-container-apps-hosting.md).
|**`--access-token`**| Let's you use a specific access token when performing authenticated azure actions. |
275
+
|**`--access-token-stdin `**| Reads a specific access token from a standard input. Use this when reading the token directly from a previous command such as [`az account get-access-token`](/cli/azure/account#az-account-get-access-token). |
276
+
|**`--environment`**| The name of an existing Container Apps environment.|
277
+
|**`--image-build`**| When set to `true`, skips the local Docker build. |
278
+
|**`--image-name`**| The image name of an existing container in a container registry. The image name includes the tag name. |
279
+
|**`--location `**| Region for the deployment. Ideally, this is the same region as the environment and storage account resources. |
280
+
|**`--management-url`**| Sets the management URL for your cloud. Use this when running in sovereign cloud. |
281
+
|**`--name`**| The name used for the function app deployment in the Container Apps environment. This same name is also used when managing the function app in the portal. The name should be unique in the environment. |
282
+
|**`--registry`**| When set, a Docker build is run and the image is pushed to the registry set in `--registry`. You can't use `--registry` with `--image-name`. For Docker Hub, also use `--registry-username`.|
283
+
|**`--registry-password`**| The password or token used to retrieve the image from a private registry.|
284
+
|**`--registry-username`**| The username used to retrieve the image from a private registry.|
285
+
|**`--resource-group`**| The resource group in which to create the functions-related resources.|
286
+
|**`--storage-account`**| The connection string for the storage account to be used by the function app.|
287
+
|**`--subscription`**| Sets the default subscription to use. |
288
+
|**`--worker-runtime`**| Sets the runtime language of the function app. This parameter is only used with `--image-name` and `--image-build`, otherwise the language is determined during the local build. Supported values are: `dotnet`, `dotnetIsolated`, `node`, `python`, `powershell`, and `custom` (for customer handlers). |
289
+
290
+
291
+
> [!IMPORTANT]
292
+
> Storage connection strings and other service credentials are important secrets. Make sure to securely store any script files using `func azurecontainerapps deploy` and don't store them in any publicly accessible source control.
293
+
255
294
## func deploy
256
295
257
296
The `func deploy` command is deprecated. Instead use [`func kubernetes deploy`](#func-kubernetes-deploy).
@@ -475,7 +514,7 @@ Deploys a Functions project as a custom docker container to a Kubernetes cluster
475
514
func kubernetes deploy
476
515
```
477
516
478
-
This command builds your project as a custom container and publishes it to a Kubernetes cluster. Custom containers must have a Dockerfile. To create an app with a Dockerfile, use the `--dockerfile` option with the [`func init` command](#func-init).
517
+
This command builds your project as a custom container and publishes it to a Kubernetes cluster. Custom containers must have a Dockerfile. To create an app with a Dockerfile, use the `--dockerfile` option with the [`func init`](#func-init) command.
479
518
480
519
The following Kubernetes deployment options are available:
481
520
@@ -502,9 +541,7 @@ The following Kubernetes deployment options are available:
502
541
|**`--service-type`**| Sets the type of Kubernetes Service. Supported values are: `ClusterIP`, `NodePort`, and `LoadBalancer` (default). |
503
542
|**`--use-config-map`**| Use a `ConfigMap` object (v1) instead of a `Secret` object (v1) to configure [function app settings](functions-how-to-use-azure-function-app-settings.md#settings). The map name is set using `--config-map-name`.|
504
543
505
-
Core Tools uses the local Docker CLI to build and publish the image.
506
-
507
-
Make sure your Docker is already installed locally. Run the `docker login` command to connect to your account.
544
+
Core Tools uses the local Docker CLI to build and publish the image. Make sure your Docker is already installed locally. Run the `docker login` command to connect to your account.
508
545
509
546
To learn more, see [Deploying a function app to Kubernetes](functions-kubernetes-keda.md#deploying-a-function-app-to-kubernetes).
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-how-to-custom-container.md
+30-14Lines changed: 30 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,22 @@
1
1
---
2
2
title: Working with Azure Functions in containers
3
3
description: Learn how to work with function apps running in Linux containers.
4
-
ms.date: 06/14/2023
4
+
ms.date: 07/30/2023
5
5
ms.topic: how-to
6
6
ms.custom: build-2023
7
7
zone_pivot_groups: functions-container-hosting
8
8
---
9
9
10
10
# Working with containers and Azure Functions
11
11
12
-
This article demonstrates the support that Azure Functions provides for working with function apps running in Linux containers. Choose the hosting environment for your containerized function app at the top of the article.
12
+
:::zone pivot="container-apps"
13
+
This article demonstrates the support that Azure Functions provides for working with containerized function apps running in an Azure Container Apps environment. Support for hosting function app containers in Container Apps is currently in preview. For more information, see [Azure Container Apps hosting of Azure Functions](functions-container-apps-hosting.md).
14
+
::: zone-end
15
+
:::zone pivot="azure-functions,azure-arc"
16
+
This article demonstrates the support that Azure Functions provides for working with function apps running in Linux containers.
17
+
::: zone-end
18
+
19
+
Choose the hosting environment for your containerized function app at the top of the article.
13
20
14
21
If you want to jump right in, the following article shows you how to create your first function running in a Linux container and deploy the image from a container registry to a supported Azure hosting service:
15
22
@@ -115,13 +122,15 @@ az functionapp config container set --image <IMAGE_NAME> --registry-password <SE
115
122
116
123
In this example, `<IMAGE_NAME>` is the full name of the new image with version. Private registries require you to supply a username and password. Store these credentials securely.
117
124
118
-
:::zone pivot="azure-functions"
125
+
:::zone pivot="azure-functions"
119
126
You should also consider [enabling continuous deployment](#enable-continuous-deployment-to-azure).
120
-
::: zone-end
121
-
:::zone pivot="azure-functions,container-apps"
127
+
::: zone-end
128
+
:::zone pivot="azure-functions,container-apps"
122
129
## Azure portal create using containers
123
130
124
-
When you create a function app in the [Azure portal](https://portal.azure.com), you can also create a deployment of the function app from an existing container image. The following steps create and deploy a function app from an [existing container image](#creating-your-function-app-in-a-container).
131
+
When you create a function app in the [Azure portal](https://portal.azure.com), you can choose to deploy the function app from an image in a container registry. To learn how to create a containerized function app in a container registry, see[Creating your function app in a container](#creating-your-function-app-in-a-container).
132
+
133
+
The following steps create and deploy an existing containerized function app from a container registry.
125
134
126
135
1. From the Azure portal menu or the **Home** page, select **Create a resource**.
127
136
@@ -133,23 +142,30 @@ When you create a function app in the [Azure portal](https://portal.azure.com),
133
142
| ------------ | ---------------- | ----------- |
134
143
|**Subscription**| Your subscription | The subscription in which you create your function app. |
135
144
|**[Resource Group](../azure-resource-manager/management/overview.md)**|*myResourceGroup*| Name for the new resource group in which you create your function app. You should create a resource group because there are [known limitations when creating new function apps in an existing resource group](functions-scale.md#limitations-for-creating-new-function-apps-in-an-existing-resource-group).|
136
-
|**Function App name**|Globally unique name | Name that identifies your new function app. Valid characters are `a-z` (case insensitive), `0-9`, and `-`. |
145
+
|**Function App name**|Unique name<sup>*</sup>| Name that identifies your new function app. Valid characters are `a-z` (case insensitive), `0-9`, and `-`. |
137
146
|**Do you want to deploy code or container image?**| Container image | Deploy a containerized function app from a registry. To create a function app in registry, see [Create a function app in a local container](functions-create-container-registry.md). |
138
-
|**Region**| Preferred region | Select a [region](https://azure.microsoft.com/regions/) that's near you or near other services that your functions can access. |
139
-
::: zone-end
140
-
:::zone pivot="azure-functions"
147
+
|**Region**| Preferred region | Select a [region](https://azure.microsoft.com/regions/) that's near you or near other services that your functions can access. |
148
+
149
+
::: zone-end
150
+
:::zone pivot="azure-functions"
151
+
<sup>*</sup>App name must be globally unique amongst all Azure Functions hosted apps.
152
+
141
153
4. In **[Hosting options and plans](functions-scale.md)**, choose **Functions Premium**.
142
154
143
-
:::image type="content" source="media/functions-how-to-custom-container/function-app-create-container-functions-premium.png" alt-text="Screenshot of the Basics tab in the Azure portal when creating a function app for hosting a container in a Functions Premium plan.":::
155
+
:::image type="content" source="media/functions-how-to-custom-container/function-app-create-container-functions-premium.png" alt-text="Screenshot of the Basics tab in the Azure portal when creating a function app for hosting a container in a Functions Premium plan.":::
144
156
145
157
This creates a function app hosted by Azure Functions in the [Premium plan](functions-premium-plan.md), which supports dynamic scaling. You can also choose to run in an **App Service plan**, but in this kind of dedicated plan you must manage the [scaling of your function app](functions-scale.md).
146
-
::: zone-end
147
-
:::zone pivot="container-apps"
158
+
::: zone-end
159
+
:::zone pivot="container-apps"
160
+
<sup>*</sup>App name must be unique within the Azure Container Apps environment. Not all regions are supported in the preview. For more information, see [Considerations for Container Apps hosting](functions-container-apps-hosting.md#considerations-for-container-apps-hosting).
161
+
148
162
4. In **[Hosting options and plans](functions-scale.md)**, choose **Azure Container Apps Environment plan**.
149
163
150
164
:::image type="content" source="media/functions-how-to-custom-container/function-app-create-container-apps-hosting.png" alt-text="Portal create Basics tab for a containerized function app hosted in Azure Container Apps.":::
151
165
152
-
This creates a new **Azure Container Apps Environment** resource to host your function app container. By default, the environment is created in a Consumption plan without zone redundancy, to minimize costs. You can also choose an existing Container Apps environment. For more information, see [Azure Container Apps hosting of Azure Functions](functions-container-apps-hosting.md).
166
+
This creates a new **Azure Container Apps Environment** resource to host your function app container. For more information, see [Azure Container Apps hosting of Azure Functions](functions-container-apps-hosting.md).
167
+
168
+
By default, the environment is created in a Consumption plan without zone redundancy, to minimize costs. You can also choose an existing Container Apps environment. To learn about environments, see [Azure Container Apps environments](../container-apps/environment.md).
153
169
::: zone-end
154
170
:::zone pivot="azure-functions,container-apps"
155
171
5. Accept the default options of creating a new storage account on the **Storage** tab and a new Application Insight instance on the **Monitoring** tab. You can also choose to use an existing storage account or Application Insights instance.
0 commit comments