Skip to content

Commit 83ec017

Browse files
authored
Merge pull request #213219 from ggailey777/quickie
Add site settings for linuxFxVersion
2 parents 03c1dc0 + eb631cf commit 83ec017

File tree

5 files changed

+176
-61
lines changed

5 files changed

+176
-61
lines changed

articles/azure-functions/functions-app-settings.md

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: App settings reference for Azure Functions
33
description: Reference documentation for the Azure Functions app settings or environment variables.
44
ms.topic: conceptual
5-
ms.date: 04/27/2022
5+
ms.date: 10/04/2022
66
---
77

88
# App settings reference for Azure Functions
@@ -265,7 +265,16 @@ The version of the Functions runtime that hosts your function app. A tilde (`~`)
265265

266266
|Key|Sample value|
267267
|---|------------|
268-
|FUNCTIONS\_EXTENSION\_VERSION|`~3`|
268+
|FUNCTIONS\_EXTENSION\_VERSION|`~4`|
269+
270+
The following major runtime version values are supported:
271+
272+
| Value | Runtime target | Comment |
273+
| ------ | -------- | --- |
274+
| `~4` | 4.x | Recommended |
275+
| `~3` | 3.x | Support ends December 13, 2022 |
276+
| `~2` | 2.x | No longer supported |
277+
| `~1` | 1.x | Supported |
269278

270279
## FUNCTIONS\_V2\_COMPATIBILITY\_MODE
271280

@@ -274,7 +283,7 @@ This setting enables your function app to run in a version 2.x compatible mode o
274283
>[!IMPORTANT]
275284
> This setting is intended only as a short-term workaround while you update your app to run correctly on version 3.x. This setting is supported as long as the [2.x runtime is supported](functions-versions.md). If you encounter issues that prevent your app from running on version 3.x without using this setting, please [report your issue](https://github.com/Azure/azure-functions-host/issues/new?template=Bug_report.md).
276285
277-
Requires that [FUNCTIONS\_EXTENSION\_VERSION](functions-app-settings.md#functions_extension_version) be set to `~3`.
286+
Requires that [FUNCTIONS\_EXTENSION\_VERSION](#functions_extension_version) be set to `~3`.
278287

279288
|Key|Sample value|
280289
|---|------------|
@@ -368,7 +377,7 @@ To learn more, see [`pip` documentation for `--index-url`](https://pip.pypa.io/e
368377

369378
## PIP\_EXTRA\_INDEX\_URL
370379

371-
The value for this setting indicates a extra index URL for custom packages for Python apps, to use in addition to the `--index-url`. Use this setting when you need to run a remote build using custom dependencies that are found in an extra package index. Should follow the same rules as --index-url.
380+
The value for this setting indicates an extra index URL for custom packages for Python apps, to use in addition to the `--index-url`. Use this setting when you need to run a remote build using custom dependencies that are found in an extra package index. Should follow the same rules as --index-url.
372381

373382
|Key|Sample value|
374383
|---|------------|
@@ -557,6 +566,47 @@ Indicates whether all outbound traffic from the app is routed through the virtua
557566
|---|------------|
558567
|WEBSITE\_VNET\_ROUTE\_ALL|`1`|
559568

569+
## App Service site settings
570+
571+
Some configurations must be maintained at the App Service level as site settings, such as language versions. These settings are usually set in the portal, by using REST APIs, or by using Azure CLI or Azure PowerShell. The following are site settings that could be required, depending on your runtime language, OS, and versions:
572+
573+
### linuxFxVersion
574+
575+
For function apps running on Linux, `linuxFxVersion` indicates the language and version for the language-specific worker process. This information is used, along with [`FUNCTIONS_EXTENSION_VERSION`](#functions_extension_version), to determine which specific Linux container image is installed to run your function app. This setting can be set to a pre-defined value or a custom image URI.
576+
577+
This value is set for you when you create your Linux function app. You may need to set it for ARM template and Bicep deployments and in certain upgrade scenarios.
578+
579+
#### Valid linuxFxVersion values
580+
581+
You can use the following Azure CLI command to see a table of current `linuxFxVersion` values, by supported Functions runtime version:
582+
583+
```azurecli-interactive
584+
az functionapp list-runtimes --os linux --query "[].{stack:join(' ', [runtime, version]), LinuxFxVersion:linux_fx_version, SupportedFunctionsVersions:to_string(supported_functions_versions[])}" --output table
585+
```
586+
587+
The previous command requires you to upgrade to version 2.40 of the Azure CLI.
588+
589+
#### Custom images
590+
591+
When you create and maintain your own custom linux container for your function app, the `linuxFxVersion` value is also in the format `DOCKER|<IMAGE_URI>`, as in the following example:
592+
593+
```
594+
linuxFxVersion = "DOCKER|contoso.com/azurefunctionsimage:v1.0.0"
595+
```
596+
For more information, see [Create a function on Linux using a custom container](functions-create-function-linux-custom-image.md).
597+
598+
[!INCLUDE [functions-linux-custom-container-note](../../includes/functions-linux-custom-container-note.md)]
599+
600+
### netFrameworkVersion
601+
602+
Sets the specific version of .NET for C# functions. For more information, see [Migrating from 3.x to 4.x](functions-versions.md#migrating-from-3x-to-4x).
603+
604+
### powerShellVersion
605+
606+
Sets the specific version of PowerShell on which your functions run. For more information, see [Changing the PowerShell version](functions-reference-powershell.md#changing-the-powershell-version).
607+
608+
When running locally, you instead use the [`FUNCTIONS_WORKER_RUNTIME_VERSION`](functions-reference-powershell.md#running-local-on-a-specific-version) setting in the local.settings.json file.
609+
560610
## Next steps
561611

562612
[Learn how to update app settings](functions-how-to-use-azure-function-app-settings.md#settings)

articles/azure-functions/functions-create-function-linux-custom-image.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Create Azure Functions on Linux using a custom image
33
description: Learn how to create Azure Functions running on a custom Linux image.
4-
ms.date: 09/28/2022
4+
ms.date: 10/04/2022
55
ms.topic: tutorial
66
ms.custom: "devx-track-csharp, mvc, devx-track-python, devx-track-azurepowershell, devx-track-azurecli, devdivchpfy22"
77
zone_pivot_groups: programming-languages-set-functions-full
@@ -47,6 +47,8 @@ In this tutorial, you learn how to:
4747

4848
You can follow this tutorial on any computer running Windows, macOS, or Linux.
4949

50+
[!INCLUDE [functions-linux-custom-container-note](../../includes/functions-linux-custom-container-note.md)]
51+
5052
[!INCLUDE [functions-requirements-cli](../../includes/functions-requirements-cli.md)]
5153

5254
<!---Requirements specific to Docker --->
@@ -289,7 +291,7 @@ func start
289291
```
290292
::: zone-end
291293

292-
After you see the `HttpExample` endpoint appear in the output, navigate to `http://localhost:7071/api/HttpExample?name=Functions`. The browser must display a "hello" message that echoes back `Functions`, the value supplied to the `name` query parameter.
294+
After you see the `HttpExample` endpoint written to the output, navigate to `http://localhost:7071/api/HttpExample?name=Functions`. The browser must display a "hello" message that echoes back `Functions`, the value supplied to the `name` query parameter.
293295

294296
Press **Ctrl**+**C** to stop the host.
295297

@@ -349,13 +351,13 @@ After verifying the function app in the container, press **Ctrl**+**C** to stop
349351

350352
Docker Hub is a container registry that hosts images and provides image and container services. To share your image, which includes deploying to Azure, you must push it to a registry.
351353

352-
1. If you haven't already signed in to Docker, do so with the [docker login](https://docs.docker.com/engine/reference/commandline/login/) command, replacing `<docker_id>` with your Docker Hub account ID. This command prompts you for your username and password. A "Login Succeeded" message confirms that you're signed in.
354+
1. If you haven't already signed in to Docker, do so with the [`docker login`](https://docs.docker.com/engine/reference/commandline/login/) command, replacing `<docker_id>` with your Docker Hub account ID. This command prompts you for your username and password. A "sign in Succeeded" message confirms that you're signed in.
353355

354356
```console
355357
docker login
356358
```
357359

358-
1. After you've signed in, push the image to Docker Hub by using the [docker push](https://docs.docker.com/engine/reference/commandline/push/) command, again replace the `<docker_id>` with your Docker Hub account ID.
360+
1. After you've signed in, push the image to Docker Hub by using the [`docker push`](https://docs.docker.com/engine/reference/commandline/push/) command, again replace the `<docker_id>` with your Docker Hub account ID.
359361

360362
```console
361363
docker push <docker_id>/azurefunctionsimage:v1.0.0
@@ -380,7 +382,7 @@ Use the following commands to create these items. Both Azure CLI and PowerShell
380382
az login
381383
```
382384

383-
The [az login](/cli/azure/reference-index#az-login) command signs you into your Azure account.
385+
The [`az login`](/cli/azure/reference-index#az-login) command signs you into your Azure account.
384386

385387
# [Azure PowerShell](#tab/azure-powershell)
386388
```azurepowershell
@@ -399,15 +401,15 @@ Use the following commands to create these items. Both Azure CLI and PowerShell
399401
az group create --name AzureFunctionsContainers-rg --location <REGION>
400402
```
401403
402-
The [az group create](/cli/azure/group#az-group-create) command creates a resource group. In the above command, replace `<REGION>` with a region near you, using an available region code returned from the [az account list-locations](/cli/azure/account#az-account-list-locations) command.
404+
The [`az group create`](/cli/azure/group#az-group-create) command creates a resource group. In the above command, replace `<REGION>` with a region near you, using an available region code returned from the [az account list-locations](/cli/azure/account#az-account-list-locations) command.
403405

404406
# [Azure PowerShell](#tab/azure-powershell)
405407

406408
```azurepowershell
407409
New-AzResourceGroup -Name AzureFunctionsContainers-rg -Location <REGION>
408410
```
409411

410-
The [New-AzResourceGroup](/powershell/module/az.resources/new-azresourcegroup) command creates a resource group. You generally create your resource group and resources in a region near you, using an available region returned from the [Get-AzLocation](/powershell/module/az.resources/get-azlocation) cmdlet.
412+
The [`New-AzResourceGroup`](/powershell/module/az.resources/new-azresourcegroup) command creates a resource group. You generally create your resource group and resources in a region near you, using an available region returned from the [`Get-AzLocation`](/powershell/module/az.resources/get-azlocation) cmdlet.
411413

412414
---
413415

@@ -419,15 +421,15 @@ Use the following commands to create these items. Both Azure CLI and PowerShell
419421
az storage account create --name <STORAGE_NAME> --location <REGION> --resource-group AzureFunctionsContainers-rg --sku Standard_LRS
420422
```
421423

422-
The [az storage account create](/cli/azure/storage/account#az-storage-account-create) command creates the storage account.
424+
The [`az storage account create`](/cli/azure/storage/account#az-storage-account-create) command creates the storage account.
423425

424426
# [Azure PowerShell](#tab/azure-powershell)
425427

426428
```azurepowershell
427429
New-AzStorageAccount -ResourceGroupName AzureFunctionsContainers-rg -Name <STORAGE_NAME> -SkuName Standard_LRS -Location <REGION>
428430
```
429431

430-
The [New-AzStorageAccount](/powershell/module/az.storage/new-azstorageaccount) cmdlet creates the storage account.
432+
The [`New-AzStorageAccount`](/powershell/module/az.storage/new-azstorageaccount) cmdlet creates the storage account.
431433

432434
---
433435

@@ -446,7 +448,7 @@ Use the following commands to create these items. Both Azure CLI and PowerShell
446448
---
447449
We use the Premium plan here, which can scale as needed. For more information about hosting, see [Azure Functions hosting plans comparison](functions-scale.md). For more information on how to calculate costs, see the [Functions pricing page](https://azure.microsoft.com/pricing/details/functions/).
448450

449-
The command also provisions an associated Azure Application Insights instance in the same resource group, with which you can monitor your function app and view logs. For more information, see [Monitor Azure Functions](functions-monitoring.md). The instance incurs no costs until you activate it.
451+
The command also creates an associated Azure Application Insights instance in the same resource group, with which you can monitor your function app and view logs. For more information, see [Monitor Azure Functions](functions-monitoring.md). The instance incurs no costs until you activate it.
450452

451453
## Create and configure a function app on Azure with the image
452454

@@ -459,7 +461,7 @@ A function app on Azure manages the execution of your functions in your hosting
459461
az functionapp create --name <APP_NAME> --storage-account <STORAGE_NAME> --resource-group AzureFunctionsContainers-rg --plan myPremiumPlan --deployment-container-image-name <DOCKER_ID>/azurefunctionsimage:v1.0.0
460462
```
461463

462-
In the [az functionapp create](/cli/azure/functionapp#az-functionapp-create) command, the *deployment-container-image-name* parameter specifies the image to use for the function app. You can use the [az functionapp config container show](/cli/azure/functionapp/config/container#az-functionapp-config-container-show) command to view information about the image used for deployment. You can also use the [az functionapp config container set](/cli/azure/functionapp/config/container#az-functionapp-config-container-set) command to deploy from a different image.
464+
In the [`az functionapp create`](/cli/azure/functionapp#az-functionapp-create) command, the *deployment-container-image-name* parameter specifies the image to use for the function app. You can use the [az functionapp config container show](/cli/azure/functionapp/config/container#az-functionapp-config-container-show) command to view information about the image used for deployment. You can also use the [`az functionapp config container set`](/cli/azure/functionapp/config/container#az-functionapp-config-container-set) command to deploy from a different image.
463465

464466
> [!NOTE]
465467
> If you're using a custom container registry, then the *deployment-container-image-name* parameter will refer to the registry URL.
@@ -482,7 +484,7 @@ A function app on Azure manages the execution of your functions in your hosting
482484
az storage account show-connection-string --resource-group AzureFunctionsContainers-rg --name <STORAGE_NAME> --query connectionString --output tsv
483485
```
484486

485-
The connection string for the storage account is returned by using the [az storage account show-connection-string](/cli/azure/storage/account) command.
487+
The connection string for the storage account is returned by using the [`az storage account show-connection-string`](/cli/azure/storage/account) command.
486488

487489
# [Azure PowerShell](#tab/azure-powershell)
488490
```azurepowershell
@@ -491,7 +493,7 @@ A function app on Azure manages the execution of your functions in your hosting
491493
$string = "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=" + $storage_name + ";AccountKey=" + $key
492494
Write-Output($string)
493495
```
494-
The key returned by the [Get-AzStorageAccountKey](/powershell/module/az.storage/get-azstorageaccountkey) cmdlet is used to construct the connection string for the storage account.
496+
The key returned by the [`Get-AzStorageAccountKey`](/powershell/module/az.storage/get-azstorageaccountkey) cmdlet is used to construct the connection string for the storage account.
495497

496498
---
497499

@@ -503,13 +505,13 @@ A function app on Azure manages the execution of your functions in your hosting
503505
```azurecli
504506
az functionapp config appsettings set --name <APP_NAME> --resource-group AzureFunctionsContainers-rg --settings AzureWebJobsStorage=<CONNECTION_STRING>
505507
```
506-
The [az functionapp config appsettings set](/cli/azure/functionapp/config/appsettings#az-functionapp-config-ppsettings-set) command creates the setting.
508+
The [`az functionapp config appsettings set`](/cli/azure/functionapp/config/appsettings#az-functionapp-config-ppsettings-set) command creates the setting.
507509

508510
# [Azure PowerShell](#tab/azure-powershell)
509511
```azurepowershell
510512
Update-AzFunctionAppSetting -Name <APP_NAME> -ResourceGroupName AzureFunctionsContainers-rg -AppSetting @{"AzureWebJobsStorage"="<CONNECTION_STRING>"}
511513
```
512-
The [Update-AzFunctionAppSetting](/powershell/module/az.functions/update-azfunctionappsetting) cmdlet creates the setting.
514+
The [`Update-AzFunctionAppSetting`](/powershell/module/az.functions/update-azfunctionappsetting) cmdlet creates the setting.
513515

514516
---
515517

@@ -550,15 +552,15 @@ You can enable Azure Functions to automatically update your deployment of an ima
550552
az functionapp deployment container config --enable-cd --query CI_CD_URL --output tsv --name <APP_NAME> --resource-group AzureFunctionsContainers-rg
551553
```
552554
553-
The [az functionapp deployment container config](/cli/azure/functionapp/deployment/container#az-functionapp-deployment-container-config) command enables continuous deployment and returns the deployment webhook URL. You can retrieve this URL at any later time by using the [az functionapp deployment container show-cd-url](/cli/azure/functionapp/deployment/container#az-functionapp-deployment-container-show-cd-url) command.
555+
The [`az functionapp deployment container config`](/cli/azure/functionapp/deployment/container#az-functionapp-deployment-container-config) command enables continuous deployment and returns the deployment webhook URL. You can retrieve this URL at any later time by using the [`az functionapp deployment container show-cd-url`](/cli/azure/functionapp/deployment/container#az-functionapp-deployment-container-show-cd-url) command.
554556

555557
# [Azure PowerShell](#tab/azure-powershell)
556558
```azurepowershell
557559
Update-AzFunctionAppSetting -Name <APP_NAME> -ResourceGroupName AzureFunctionsContainers-rg -AppSetting @{"DOCKER_ENABLE_CI" = "true"}
558560
Get-AzWebAppContainerContinuousDeploymentUrl -Name <APP_NAME> -ResourceGroupName AzureFunctionsContainers-rg
559561
```
560562
561-
The `DOCKER_ENABLE_CI` application setting controls whether continuous deployment is enabled from the container repository. The [Get-AzWebAppContainerContinuousDeploymentUrl](/powershell/module/az.websites/get-azwebappcontainercontinuousdeploymenturl) cmdlet returns the URL of the deployment webhook.
563+
The `DOCKER_ENABLE_CI` application setting controls whether continuous deployment is enabled from the container repository. The [`Get-AzWebAppContainerContinuousDeploymentUrl`](/powershell/module/az.websites/get-azwebappcontainercontinuousdeploymenturl) cmdlet returns the URL of the deployment webhook.
562564

563565
---
564566

0 commit comments

Comments
 (0)