Skip to content

Commit d76dbd4

Browse files
authored
Merge pull request #53650 from ggailey777/cleanup
Cleanup for v2 updates
2 parents 96a7687 + 77e71e0 commit d76dbd4

4 files changed

+62
-1
lines changed

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

+12
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,18 @@ Because `myAppServicePlan` is a Linux plan, the built-in docker image is used to
7979
>[!NOTE]
8080
>The sample repository currently includes two scripting files, [deploy.sh](https://github.com/Azure-Samples/functions-quickstart-linux/blob/master/deploy.sh) and [.deployment](https://github.com/Azure-Samples/functions-quickstart-linux/blob/master/.deployment). The .deployment file tells the deployment process to use deploy.sh as the [custom deployment script](https://github.com/projectkudu/kudu/wiki/Custom-Deployment-Script). In the current preview release, scripts are required to deploy the function app on a Linux image.
8181
82+
## Configure the function app
83+
84+
The project in the GitHub repository requires the version 1.x of the Functions runtime. Setting the `FUNCTIONS_WORKER_RUNTIME` application setting to `~1` pins the function app to the latest 1.x version. Set application settings with the [az functionapp config appsettings set](https://docs.microsoft.com/cli/azure/functionapp/config/appsettings#set) command.
85+
86+
In the following Azure CLI command, `<app_name> is the name of your function app.
87+
88+
```azurecli-interactive
89+
az functionapp config appsettings set --name <app_name> \
90+
--resource-group myResourceGroup \
91+
--settings FUNCTIONS_WORKER_RUNTIME=~1
92+
```
93+
8294
[!INCLUDE [functions-test-function-code](../../includes/functions-test-function-code.md)]
8395

8496
[!INCLUDE [functions-cleanup-resources](../../includes/functions-cleanup-resources.md)]

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

+14
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,20 @@ After the function app has been created, the Azure CLI shows information similar
196196
}
197197
```
198198

199+
## Configure the function app
200+
201+
Core Tools version 2.x creates projects using templates for the Azure Functions 2.x runtime. Because of this, you need to make sure that the version 2.x runtime is used in Azure. Setting the `FUNCTIONS_WORKER_RUNTIME` application setting to `~2` pins the function app to the latest 2.x version. Set application settings with the [az functionapp config appsettings set](https://docs.microsoft.com/cli/azure/functionapp/config/appsettings#set) command.
202+
203+
In the following Azure CLI command, `<app_name> is the name of your function app.
204+
205+
```azurecli-interactive
206+
az functionapp config appsettings set --name <app_name> \
207+
--resource-group myResourceGroup \
208+
--settings FUNCTIONS_WORKER_RUNTIME=~2
209+
```
210+
211+
[!INCLUDE [functions-publish-project](../../includes/functions-publish-project.md)]
212+
199213
[!INCLUDE [functions-test-function-code](../../includes/functions-test-function-code.md)]
200214

201215
[!INCLUDE [functions-cleanup-resources](../../includes/functions-cleanup-resources.md)]

articles/azure-functions/functions-run-local.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.assetid: 242736be-ec66-4114-924b-31795fd18884
1010
ms.service: azure-functions
1111
ms.devlang: multiple
1212
ms.topic: conceptual
13-
ms.date: 08/14/2018
13+
ms.date: 09/24/2018
1414
ms.author: glenga
1515
---
1616

includes/functions-publish-project.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: include file
3+
description: include file
4+
services: functions
5+
author: ggailey777
6+
ms.service: azure-functions
7+
ms.topic: include
8+
ms.date: 09/27/2018
9+
ms.author: glenga
10+
ms.custom: include file
11+
---
12+
13+
## Deploy the function app project to Azure
14+
15+
After the function app is created in Azure, you can use the [`func azure functionapp publish`](../articles/azure-functions/functions-run-local.md#project-file-deployment) command to deploy your project code to Azure.
16+
17+
```bash
18+
func azure functionapp publish <FunctionAppName>
19+
```
20+
21+
You see something like the following output, which has been truncated for readability.
22+
23+
```output
24+
Getting site publishing info...
25+
26+
...
27+
28+
Preparing archive...
29+
Uploading content...
30+
Upload completed successfully.
31+
Deployment completed successfully.
32+
Syncing triggers...
33+
```
34+
35+
You can now test your functions in Azure.

0 commit comments

Comments
 (0)