Skip to content

Commit 0a634cb

Browse files
authored
Merge pull request #209741 from ggailey777/ramya
[Functions][Arc] PS7 support + storage dependency changes
2 parents 7963538 + 6639dcb commit 0a634cb

File tree

3 files changed

+94
-27
lines changed

3 files changed

+94
-27
lines changed

articles/azure-functions/create-first-function-arc-cli.md

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: 'Quickstart: Create a function app on Azure Arc'
33
description: Get started with Azure Functions on Azure Arc by deploying your first function app.
44
ms.topic: quickstart
5-
ms.date: 05/10/2021
5+
ms.date: 09/02/2022
66
ms.custom: mode-other, devx-track-azurecli
77
ms.devlang: azurecli
88
---
@@ -22,21 +22,28 @@ On your local computer:
2222

2323
# [C\#](#tab/csharp)
2424

25-
+ [.NET Core 3.1 SDK](https://dotnet.microsoft.com/download)
26-
+ [Azure Functions Core Tools](functions-run-local.md#v2) version 3.0.3245.
27-
+ [Azure CLI](/cli/azure/install-azure-cli) version 2.4 or later.
25+
+ [.NET 6.0 SDK](https://dotnet.microsoft.com/download)
26+
+ [Azure Functions Core Tools version 4.x](functions-run-local.md?tabs=v4%2Ccsharp#install-the-azure-functions-core-tools)
27+
+ [Azure CLI](/cli/azure/install-azure-cli) version 2.4 or later
2828

2929
# [JavaScript](#tab/nodejs)
3030

3131
+ [Node.js](https://nodejs.org/) version 12. Node.js version 10 is also supported.
32-
+ [Azure Functions Core Tools](functions-run-local.md#v2) version 3.0.3245.
33-
+ [Azure CLI](/cli/azure/install-azure-cli) version 2.4 or later.
32+
+ [Azure Functions Core Tools version 4.x.](functions-run-local.md?tabs=v4%2Cnode#install-the-azure-functions-core-tools).
33+
+ [Azure CLI](/cli/azure/install-azure-cli) version 2.4 or later
3434

3535
# [Python](#tab/python)
3636

3737
+ [Python versions that are supported by Azure Functions](supported-languages.md#languages-by-runtime-version)
38-
+ [Azure Functions Core Tools](functions-run-local.md#v2) version 3.0.3245.
39-
+ [Azure CLI](/cli/azure/install-azure-cli) version 2.4 or later.
38+
+ [Azure Functions Core Tools version 4.x.](functions-run-local.md?tabs=v4%2Cpython#install-the-azure-functions-core-tools)
39+
+ [Azure CLI](/cli/azure/install-azure-cli) version 2.4 or later
40+
41+
# [PowerShell](#tab/powershell)
42+
43+
+ [PowerShell 7](/powershell/scripting/install/installing-powershell-core-on-windows)
44+
+ [Azure Functions Core Tools version 4.x.](functions-run-local.md?tabs=v4%2Cpowershell#install-the-azure-functions-core-tools)
45+
+ [Azure CLI](/cli/azure/install-azure-cli) version 2.4 or later
46+
+ PowerShell 7 requires version 1.2.5 of the connectedk8s Azure CLI extension, or a later version. It also requires version 0.1.3 of the appservice-kube Azure CLI extension, or a later version. Make sure you install the correct version of both of these extensions as you complete this quickstart article.
4047

4148
---
4249

@@ -84,6 +91,13 @@ In Azure Functions, a function project is the unit of deployment and execution f
8491
```console
8592
func init LocalFunctionProj --python
8693
```
94+
95+
# [PowerShell](#tab/powershell)
96+
97+
98+
```console
99+
func init LocalFunctionProj --powershell
100+
```
87101

88102
---
89103

@@ -108,7 +122,7 @@ In Azure Functions, a function project is the unit of deployment and execution f
108122

109123
Before you can deploy your function code to your new App Service Kubernetes environment, you need to create two more resources:
110124

111-
- A [Storage account](../storage/common/storage-account-create.md), which is currently required by tooling and isn't part of the environment.
125+
- A [Storage account](../storage/common/storage-account-create.md). While this article creates a storage account, in some cases a storage account may not be required. For more information, see [Azure Arc-enabled clusters](storage-considerations.md#azure-arc-enabled-clusters) in the storage considerations article.
112126
- A function app, which provides the context for executing your function code. The function app runs in the App Service Kubernetes environment and maps to your local function project. A function app lets you group functions as a logical unit for easier management, deployment, and sharing of resources.
113127

114128
> [!NOTE]
@@ -123,7 +137,7 @@ az storage account create --name <STORAGE_NAME> --location westeurope --resource
123137
```
124138

125139
> [!NOTE]
126-
> A storage account is currently required by Azure Functions tooling.
140+
> In some cases, a storage account may not be required. For more information, see [Azure Arc-enabled clusters](storage-considerations.md#azure-arc-enabled-clusters) in the storage considerations article.
127141
128142
In the previous example, replace `<STORAGE_NAME>` with a name that is appropriate to you and unique in Azure Storage. Names must contain three to 24 characters numbers and lowercase letters only. `Standard_LRS` specifies a general-purpose account, which is [supported by Functions](storage-considerations.md#storage-account-requirements). The `--location` value is a standard Azure region.
129143

@@ -133,25 +147,32 @@ Run the [az functionapp create](/cli/azure/functionapp#az-functionapp-create) co
133147

134148
# [C\#](#tab/csharp)
135149
```azurecli
136-
az functionapp create --resource-group MyResourceGroup --name <APP_NAME> --custom-location <CUSTOM_LOCATION_ID> --storage-account <STORAGE_NAME> --functions-version 3 --runtime dotnet
150+
az functionapp create --resource-group MyResourceGroup --name <APP_NAME> --custom-location <CUSTOM_LOCATION_ID> --storage-account <STORAGE_NAME> --functions-version 4 --runtime dotnet
137151
```
138152

139153
# [JavaScript](#tab/nodejs)
140154
```azurecli
141-
az functionapp create --resource-group MyResourceGroup --name <APP_NAME> --custom-location <CUSTOM_LOCATION_ID> --storage-account <STORAGE_NAME> --functions-version 3 --runtime node --runtime-version 12
155+
az functionapp create --resource-group MyResourceGroup --name <APP_NAME> --custom-location <CUSTOM_LOCATION_ID> --storage-account <STORAGE_NAME> --functions-version 4 --runtime node --runtime-version 12
142156
```
143157

144158
# [Python](#tab/python)
145159
```azurecli
146-
az functionapp create --resource-group MyResourceGroup --name <APP_NAME> --custom-location <CUSTOM_LOCATION_ID> --storage-account <STORAGE_NAME> --functions-version 3 --runtime python --runtime-version 3.8
160+
az functionapp create --resource-group MyResourceGroup --name <APP_NAME> --custom-location <CUSTOM_LOCATION_ID> --storage-account <STORAGE_NAME> --functions-version 4 --runtime python --runtime-version 3.8
147161
```
162+
163+
# [PowerShell](#tab/powershell)
164+
165+
```azurecli
166+
az functionapp create --resource-group myResourceGroup --name <APP_NAME> --custom-location <CUSTOM_LOCATION_ID> --storage-account <STORAGE_NAME> --functions-version 4 --runtime powershell --runtime-version 7.0
167+
```
168+
148169
---
149170

150171
In this example, replace `<CUSTOM_LOCATION_ID>` with the ID of the custom location you determined for the App Service Kubernetes environment. Also, replace `<STORAGE_NAME>` with the name of the account you used in the previous step, and replace `<APP_NAME>` with a globally unique name appropriate to you.
151172

152173
[!INCLUDE [functions-publish-project-cli](../../includes/functions-publish-project-cli.md)]
153174

154-
Because it can take some time for a full deployment to complete on an Azure Arc-enabled Kubernetes cluster, you may want to re-run the following command to verify your published functions:
175+
Because it can take some time for a full deployment to complete on an Azure Arc-enabled Kubernetes cluster, you may want to rerun the following command to verify your published functions:
155176

156177
```command
157178
func azure functionapp list-functions
@@ -178,4 +199,9 @@ Now that you have your function app running in a container an Azure Arc-enabled
178199
> [!div class="nextstepaction"]
179200
> [Connect to an Azure Storage queue](functions-add-output-binding-storage-queue-cli.md?pivots=programming-language-python)
180201
202+
# [PowerShell](#tab/powershell)
203+
204+
> [!div class="nextstepaction"]
205+
> [Connect to an Azure Storage queue](functions-add-output-binding-storage-queue-cli.md?pivots=programming-language-powershell)
206+
181207
---

articles/azure-functions/create-first-function-arc-custom-container.md

Lines changed: 42 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,39 @@ On your local computer:
2020

2121
# [C\#](#tab/csharp)
2222

23-
+ [.NET Core 3.1 SDK](https://dotnet.microsoft.com/download)
24-
+ [Azure Functions Core Tools](functions-run-local.md#v2) version 3.0.3245.
25-
+ [Azure CLI](/cli/azure/install-azure-cli) version 2.4 or later.
23+
+ [.NET 6.0 SDK](https://dotnet.microsoft.com/download)
24+
+ [Azure Functions Core Tools version 4.x](functions-run-local.md?tabs=v4%2Ccsharp#install-the-azure-functions-core-tools)
25+
+ [Azure CLI](/cli/azure/install-azure-cli) version 2.4 or later
2626
+ [Docker](https://docs.docker.com/install/)
2727
+ [Docker ID](https://hub.docker.com/signup)
2828

2929
# [JavaScript](#tab/nodejs)
3030

31-
+ [Node.js](https://nodejs.org/) version 12. Node.js version 10 is also supported.
32-
+ [Azure Functions Core Tools](functions-run-local.md#v2) version 3.0.3245.
33-
+ [Azure CLI](/cli/azure/install-azure-cli) version 2.4 or later.
31+
+ [Node.js](https://nodejs.org/) version 12 (Node.js version 10 is also supported)
32+
+ [Azure Functions Core Tools version 4.x](functions-run-local.md?tabs=v4%2Cnode#install-the-azure-functions-core-tools)
33+
+ [Azure CLI](/cli/azure/install-azure-cli) version 2.4 or later
3434
+ [Docker](https://docs.docker.com/install/)
3535
+ [Docker ID](https://hub.docker.com/signup)
3636

3737
# [Python](#tab/python)
3838

3939
+ [Python versions that are supported by Azure Functions](supported-languages.md#languages-by-runtime-version)
40-
+ [Azure Functions Core Tools](functions-run-local.md#v2) version 3.0.3245.
41-
+ [Azure CLI](/cli/azure/install-azure-cli) version 2.4 or later.
40+
+ [Azure Functions Core Tools version 4.x](functions-run-local.md?tabs=v4%2Cpython#install-the-azure-functions-core-tools)
41+
+ [Azure CLI](/cli/azure/install-azure-cli) version 2.4 or later
4242
+ [Docker](https://docs.docker.com/install/)
4343
+ [Docker ID](https://hub.docker.com/signup)
4444

45+
# [PowerShell](#tab/powershell)
46+
47+
+ [PowerShell 7](/powershell/scripting/install/installing-powershell-core-on-windows)
48+
+ [Azure Functions Core Tools version 4.x](functions-run-local.md?tabs=v4%2Cpowershell#install-the-azure-functions-core-tools)
49+
+ [Azure CLI](/cli/azure/install-azure-cli) version 2.4 or later
50+
+ [Docker](https://docs.docker.com/install/)
51+
+ [Docker ID](https://hub.docker.com/signup)
52+
+ PowerShell 7 requires recent versions of two Azure CLI extensions. Make sure you install the correct versions of the following extensions as you complete this quickstart article:
53+
+ `connectedk8s` version 1.2.5, or a later version
54+
+ `appservice-kube` version 0.1.3 or a later version
55+
4556
---
4657

4758
[!INCLUDE [functions-arc-create-environment](../../includes/functions-arc-create-environment.md)]
@@ -88,6 +99,13 @@ In Azure Functions, a function project is the context for one or more individual
8899
```console
89100
func init LocalFunctionProj --python --docker
90101
```
102+
# [PowerShell](#tab/powershell)
103+
104+
105+
```console
106+
func init LocalFunctionProj --powershell --docker
107+
```
108+
91109
---
92110

93111
The `--docker` option generates a `Dockerfile` for the project, which defines a suitable custom container for use with Azure Functions and the selected runtime.
@@ -158,7 +176,7 @@ Docker Hub is a container registry that hosts images and provides image and cont
158176

159177
Before you can deploy your container to your new App Service Kubernetes environment, you need to create two more resources:
160178

161-
- A [Storage account](../storage/common/storage-account-create.md), which is currently required by tooling and isn't part of the environment.
179+
- A [Storage account](../storage/common/storage-account-create.md). While this article creates a storage account, in some cases a storage account may not be required. For more information, see [Azure Arc-enabled clusters](storage-considerations.md#azure-arc-enabled-clusters) in the storage considerations article.
162180
- A function app, which provides the context for running your container. The function app runs in the App Service Kubernetes environment and maps to your local function project. A function app lets you group functions as a logical unit for easier management, deployment, and sharing of resources.
163181

164182
> [!NOTE]
@@ -173,7 +191,7 @@ az storage account create --name <STORAGE_NAME> --location westeurope --resource
173191
```
174192

175193
> [!NOTE]
176-
> A storage account is currently required by Azure Functions tooling.
194+
> In some cases, a storage account may not be required. For more information, see [Azure Arc-enabled clusters](storage-considerations.md#azure-arc-enabled-clusters) in the storage considerations article.
177195
178196
In the previous example, replace `<STORAGE_NAME>` with a name that is appropriate to you and unique in Azure Storage. Names must contain three to 24 characters numbers and lowercase letters only. `Standard_LRS` specifies a general-purpose account, which is [supported by Functions](storage-considerations.md#storage-account-requirements). The `--location` value is a standard Azure region.
179197

@@ -183,18 +201,24 @@ Run the [az functionapp create](/cli/azure/functionapp#az-functionapp-create) co
183201

184202
# [C\#](#tab/csharp)
185203
```azurecli
186-
az functionapp create --resource-group MyResourceGroup --name <APP_NAME> --custom-location <CUSTOM_LOCATION_ID> --storage-account <STORAGE_NAME> --functions-version 3 --runtime dotnet --deployment-container-image-name <DOCKER_ID>/azurefunctionsimage:v1.0.0
204+
az functionapp create --resource-group MyResourceGroup --name <APP_NAME> --custom-location <CUSTOM_LOCATION_ID> --storage-account <STORAGE_NAME> --functions-version 4 --runtime dotnet --deployment-container-image-name <DOCKER_ID>/azurefunctionsimage:v1.0.0
187205
```
188206

189207
# [JavaScript](#tab/nodejs)
190208
```azurecli
191-
az functionapp create --resource-group MyResourceGroup --name <APP_NAME> --custom-location <CUSTOM_LOCATION_ID> --storage-account <STORAGE_NAME> --functions-version 3 --runtime node --runtime-version 12 --deployment-container-image-name <DOCKER_ID>/azurefunctionsimage:v1.0.0
209+
az functionapp create --resource-group MyResourceGroup --name <APP_NAME> --custom-location <CUSTOM_LOCATION_ID> --storage-account <STORAGE_NAME> --functions-version 4 --runtime node --runtime-version 12 --deployment-container-image-name <DOCKER_ID>/azurefunctionsimage:v1.0.0
192210
```
193211

194212
# [Python](#tab/python)
195213
```azurecli
196-
az functionapp create --resource-group MyResourceGroup --name <APP_NAME> --custom-location <CUSTOM_LOCATION_ID> --storage-account <STORAGE_NAME> --functions-version 3 --runtime python --runtime-version 3.8 --deployment-container-image-name <DOCKER_ID>/azurefunctionsimage:v1.0.0
214+
az functionapp create --resource-group MyResourceGroup --name <APP_NAME> --custom-location <CUSTOM_LOCATION_ID> --storage-account <STORAGE_NAME> --functions-version 4 --runtime python --runtime-version 3.8 --deployment-container-image-name <DOCKER_ID>/azurefunctionsimage:v1.0.0
215+
```
216+
# [PowerShell](#tab/powershell)
217+
218+
```azurecli
219+
az functionapp create --resource-group myResourceGroup --name <APP_NAME> --custom-location <CUSTOM_LOCATION_ID> --storage-account <STORAGE_NAME> --functions-version 4 --runtime powershell --runtime-version 7.0
197220
```
221+
198222
---
199223

200224
In this example, replace `<CUSTOM_LOCATION_ID>` with the ID of the custom location you determined for the App Service Kubernetes environment. Also, replace `<STORAGE_NAME>` with the name of the account you used in the previous step, `<APP_NAME>` with a globally unique name appropriate to you, and `<DOCKER_ID>` with your Docker Hub ID.
@@ -237,4 +261,9 @@ Now that you have your function app running in a container an Azure Arc-enabled
237261
> [!div class="nextstepaction"]
238262
> [Connect to an Azure Storage queue](functions-add-output-binding-storage-queue-cli.md?pivots=programming-language-python)
239263
264+
# [PowerShell](#tab/powershell)
265+
266+
> [!div class="nextstepaction"]
267+
> [Connect to an Azure Storage queue](functions-add-output-binding-storage-queue-cli.md?pivots=programming-language-powershell)
268+
240269
---

articles/azure-functions/storage-considerations.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,18 @@ You can explicitly set a specific host ID for your function app in the applicati
9393

9494
When the collision occurs between slots, you may need to mark this setting as a slot setting. To learn how to create app settings, see [Work with application settings](functions-how-to-use-azure-function-app-settings.md#settings).
9595

96+
## Azure Arc-enabled clusters
97+
98+
When your function app is deployed to an Azure Arc-enabled Kubernetes cluster, a storage account may not be required by your function app. In this case, a storage account is only required by Functions when your function app uses a trigger that requires storage. The following table indicates which triggers may require a storage account and which don't.
99+
100+
| Not required | May require storage |
101+
| --- | --- |
102+
| • [Azure Cosmos DB](functions-bindings-cosmosdb-v2.md)<br/>• [HTTP](functions-bindings-http-webhook.md)<br/>• [Kafka](functions-bindings-kafka.md)<br/>• [RabbitMQ](functions-bindings-rabbitmq.md)<br/>• [Service Bus](functions-bindings-service-bus.md) | • [Azure SQL](functions-bindings-azure-sql.md)<br/>• [Blob storage](functions-bindings-storage-blob.md)<br/>• [Event Grid](functions-bindings-event-grid.md)<br/>• [Event Hubs](functions-bindings-event-hubs.md)<br/>• [IoT Hub](functions-bindings-event-iot.md)<br/>• [Queue storage](functions-bindings-storage-queue.md)<br/>• [SendGrid](functions-bindings-sendgrid.md)<br/>• [SignalR](functions-bindings-signalr-service.md)<br/>• [Table storage](functions-bindings-storage-table.md)<br/>• [Timer](functions-bindings-timer.md)<br/>• [Twilio](functions-bindings-twilio.md)
103+
104+
To create a function app on an Azure Arc-enabled Kubernetes cluster without storage, you must use the Azure CLI command [az functionapp create](/cli/azure/functionapp#az-functionapp-create). The version of the Azure CLI must include version 0.1.7 or a later version of the [appservice-kube extension](/cli/azure/appservice/kube). Use the `az --version` command to verify that the extension is installed and is the correct version.
105+
106+
Creating your function app resources using methods other than the Azure CLI requires an existing storage account. If you plan to use any triggers that require a storage account, you should create the account before you create the function app.
107+
96108
## Create an app without Azure Files
97109

98110
Azure Files is set up by default for Premium and non-Linux Consumption plans to serve as a shared file system in high-scale scenarios. The file system is used by the platform for some features such as log streaming, but it primarily ensures consistency of the deployed function payload. When an app is [deployed using an external package URL](./run-functions-from-deployment-package.md), the app content is served from a separate read-only file system. This means that you can create your function app without Azure Files. If you create your function app with Azure Files, a writeable file system is still provided. However, this file system may not be available for all function app instances.

0 commit comments

Comments
 (0)