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-deployment-technologies.md
+8-17Lines changed: 8 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,27 +60,26 @@ When you change any of your triggers, the Functions infrastructure must be aware
60
60
Azure Functions can automatically perform builds on the code it receives after zip deployments. These builds behave slightly differently depending on whether your app is running on Windows or Linux. Remote builds are not performed when an app has previously been set to run in [Run From Package](run-functions-from-deployment-package.md) mode. To learn how to use remote build, navigate to [zip deploy](#zip-deploy).
61
61
62
62
> [!NOTE]
63
-
> If you're having issues with remote build, it might be because your app was created before the feature was made available (August 1, 2019). Try creating a new function app.
63
+
> If you're having issues with remote build, it might be because your app was created before the feature was made available (August 1, 2019). Try creating a new function app, or running `az functionapp update -g <RESOURCE_GROUP_NAME> -n <APP_NAME>` to update your function app. This command might take two tries to succeed.
64
64
65
65
#### Remote build on Windows
66
66
67
67
All function apps running on Windows have a small management app, the SCM (or [Kudu](https://github.com/projectkudu/kudu)) site. This site handles much of the deployment and build logic for Azure Functions.
68
68
69
69
When an app is deployed to Windows, language-specific commands, like `dotnet restore` (C#) or `npm install` (JavaScript) are run.
70
70
71
-
#### Remote build on Linux (preview)
71
+
#### Remote build on Linux
72
72
73
-
To enable remote build on Linux, you must set the following [application settings](functions-how-to-use-azure-function-app-settings.md#settings):
73
+
To enable remote build on Linux, the following [application settings](functions-how-to-use-azure-function-app-settings.md#settings) must be set:
74
74
75
75
*`ENABLE_ORYX_BUILD=true`
76
76
*`SCM_DO_BUILD_DURING_DEPLOYMENT=true`
77
77
78
-
When apps are built remotely on Linux, they [run from the deployment package](run-functions-from-deployment-package.md).
78
+
By default, both [Azure Functions Core Tools](functions-run-local.md) and the [Azure Functions Extension for Visual Studio Code](functions-create-first-function-vs-code.md#publish-the-project-to-azure) perform remote builds when deploying to Linux. Because of this, both tools automatically create these settings for you in Azure.
79
79
80
-
> [!NOTE]
81
-
> Remote build on the Linux Dedicated (App Service) plan is currently only supported for Node.js and Python.
80
+
When apps are built remotely on Linux, they [run from the deployment package](run-functions-from-deployment-package.md).
82
81
83
-
##### Consumption (preview) plan
82
+
##### Consumption plan
84
83
85
84
Linux function apps running in the Consumption plan don't have an SCM/Kudu site, which limits the deployment options. However, function apps on Linux running in the Consumption plan do support remote builds.
86
85
@@ -100,21 +99,13 @@ You can use an external package URL to reference a remote package (.zip) file th
100
99
>
101
100
>If you use Azure Blob storage, use a private container with a [shared access signature (SAS)](../vs-azure-tools-storage-manage-with-storage-explorer.md#generate-a-sas-in-storage-explorer) to give Functions access to the package. Any time the application restarts, it fetches a copy of the content. Your reference must be valid for the lifetime of the application.
102
101
103
-
>__When to use it:__ External package URL is the only supported deployment method for Azure Functions running on Linux in the Consumption plan, if the user specifically doesn't want a remote build to occur. When you update the package file that a function app references, you must [manually sync triggers](#trigger-syncing) to tell Azure that your application has changed.
102
+
>__When to use it:__ External package URL is the only supported deployment method for Azure Functions running on Linux in the Consumption plan, if the user doesn't want a [remote build](#remote-build) to occur. When you update the package file that a function app references, you must [manually sync triggers](#trigger-syncing) to tell Azure that your application has changed.
104
103
105
104
### Zip deploy
106
105
107
106
Use zip deploy to push a .zip file that contains your function app to Azure. Optionally, you can set your app to start [running from package](run-functions-from-deployment-package.md), or specify that a [remote build](#remote-build) occurs.
108
107
109
-
>__How to use it:__ Deploy by using your favorite client tool: [VS Code](functions-create-first-function-vs-code.md#publish-the-project-to-azure), [Visual Studio](functions-develop-vs.md#publish-to-azure), or the [Azure CLI](functions-create-first-azure-function-azure-cli.md#deploy-the-function-app-project-to-azure). To manually deploy a .zip file to your function app, follow the instructions in [Deploy from a .zip file or URL](https://github.com/projectkudu/kudu/wiki/Deploying-from-a-zip-file-or-url).
110
-
111
-
To perform a zip deploy with a [remote build](#remote-build), use the following [Core Tools](functions-run-local.md) command:
Alternatively, you can instruct VS Code to perform a remote build when deploying by adding the ``azureFunctions.scmDoBuildDuringDeployment" flag. To learn how to add a flag to VS Code, read the instructions in the [Azure Functions Extension Wiki](https://github.com/microsoft/vscode-azurefunctions/wiki).
108
+
>__How to use it:__ Deploy by using your favorite client tool: [Visual Studio Code](functions-create-first-function-vs-code.md#publish-the-project-to-azure), [Visual Studio](functions-develop-vs.md#publish-to-azure), the [Azure Functions Core Tools](functions-run-local.md), or the [Azure CLI](functions-create-first-azure-function-azure-cli.md#deploy-the-function-app-project-to-azure). By default, these tools use zip deployment and [run from package](run-functions-from-deployment-package.md). Core Tools and the Visual Studio Code extension both enable [remote build](#remote-build) when deploying to Linux. To manually deploy a .zip file to your function app, follow the instructions in [Deploy from a .zip file or URL](https://github.com/projectkudu/kudu/wiki/Deploying-from-a-zip-file-or-url).
118
109
119
110
>When you deploy by using zip deploy, you can set your app to [run from package](run-functions-from-deployment-package.md). To run from package, set the `WEBSITE_RUN_FROM_PACKAGE` application setting value to `1`. We recommend zip deployment. It yields faster loading times for your applications, and it's the default for VS Code, Visual Studio, and the Azure CLI.
When you're ready to publish, make sure that all your dependencies are listed in the *requirements.txt* file, which is located at the root of your project directory. Azure Functions can [remotely build](functions-deployment-technologies.md#remote-build) these dependencies.
396
396
397
-
Project files and folders that are excluded from publishing, including the virtual environment folder, are listed in the .funcignore file.
397
+
Project files and folders that are excluded from publishing, including the virtual environment folder, are listed in the .funcignore file.
398
398
399
-
To deploy to Azure and perform a remote build, use the following command:
399
+
Both the [Azure Functions Core Tools](functions-run-local.md#v2)and the [Azure Functions Extension for VS Code](functions-create-first-function-vs-code.md#publish-the-project-to-azure) will perform a remote build by default. For example, use the following command:
If you're not using remote build, and using a package that requires a compiler and does not support the installation of many Linux-compatible wheels from PyPI, publishing to Azure without building locally will fail with the following error:
406
-
407
-
```
408
-
There was an error restoring dependencies.ERROR: cannot install <package name - version> dependency: binary dependencies without wheels are not supported.
409
-
The terminal process terminated with exit code: 1
410
-
```
411
-
412
-
To build locally and configure the required binaries, [install Docker](https://docs.docker.com/install/) on your local machine and run the following command to publish using the [Azure Functions Core Tools](functions-run-local.md#v2) (func). Remember to replace `<app name>` with the name of your function app in Azure.
405
+
If you wish to build your app locally instead of in Azure, [install Docker](https://docs.docker.com/install/) on your local machine and run the following command to publish using the [Azure Functions Core Tools](functions-run-local.md#v2) (func). Remember to replace `<app name>` with the name of your function app in Azure.
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-run-local.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -436,7 +436,7 @@ To publish your local code to a function app in Azure, use the `publish` command
436
436
func azure functionapp publish <FunctionAppName>
437
437
```
438
438
439
-
This command publishes to an existing functionappin Azure. You'll get an error if you try to publish to a `<FunctionAppName>` that doesn't exist in your subscription. To learn how to create a functionapp from the command prompt or terminal window using the Azure CLI, see [Create a Function App for serverless execution](./scripts/functions-cli-create-serverless.md). By default, this command deploys your app to [run from the deployment package](run-functions-from-deployment-package.md). To disable this recommended deployment mode, use the `--nozip` option.
439
+
This command publishes to an existing functionappin Azure. You'll get an error if you try to publish to a `<FunctionAppName>` that doesn't exist in your subscription. To learn how to create a functionapp from the command prompt or terminal window using the Azure CLI, see [Create a Function App for serverless execution](./scripts/functions-cli-create-serverless.md). By default, this commanduses [remote build](functions-deployment-technologies.md#remote-build) and deploys your app to [run from the deployment package](run-functions-from-deployment-package.md). To disable this recommended deployment mode, use the `--nozip` option.
440
440
441
441
>[!IMPORTANT]
442
442
> When you create a functionappin the Azure portal, it uses version 2.x of the Function runtime by default. To make the functionapp use version 1.x of the runtime, follow the instructions in [Run on version 1.x](functions-versions.md#creating-1x-apps).
@@ -458,6 +458,7 @@ The following publish options are only supported in version 2.x:
458
458
| **`--list-included-files`** | Displays a list of files that are published, which is based on the .funcignore file. |
459
459
| **`--nozip`** | Turns the default `Run-From-Package` mode off. |
460
460
| **`--build-native-deps`** | Skips generating .wheels folder when publishing python function apps. |
461
+
| **`--build [-b]`** | Performs build action when deploying to a Linux function app. (accepts: remote, local) |
461
462
| **`--additional-packages`** | List of packages to install when building native dependencies. For example: `python3-dev libevent-dev`. |
462
463
| **`--force`** | Ignore pre-publishing verification in certain scenarios. |
463
464
| **`--csx`** | Publish a C# script (.csx) project. |
0 commit comments