Skip to content

Commit ff2cd30

Browse files
authored
Merge pull request #69321 from ggailey777/xstof
Fixing the Linux consumption quickstart
2 parents c18357d + 638da89 commit ff2cd30

File tree

2 files changed

+18
-23
lines changed

2 files changed

+18
-23
lines changed

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

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ services: functions
55
keywords:
66
author: ggailey777
77
ms.author: glenga
8-
ms.date: 11/28/2018
8+
ms.date: 03/12/2019
99
ms.topic: quickstart
1010
ms.service: azure-functions
11-
ms.custom: mvc
11+
ms.custom: mvc, fasttrack-edit
1212
ms.devlang: javascript
1313
manager: jeconnoc
1414
---
1515

1616
# Create your first function hosted on Linux using Core Tools and the Azure CLI (preview)
1717

18-
Azure Functions lets you execute your code in a [serverless](https://azure.com/serverless) Linux environment without having to first create a VM or publish a web application. Linux-hosting is currently in preview and requires [the Functions 2.0 runtime](functions-versions.md). To learn more about preview considerations for running your function apps on Linux, see [this Functions on Linux article](https://aka.ms/funclinux).
18+
Azure Functions lets you execute your code in a [serverless](https://azure.com/serverless) Linux environment without having to first create a VM or publish a web application. Linux-hosting requires [the Functions 2.0 runtime](functions-versions.md). Support to run a function app on Linux in the serverless [Consumption plan](functions-scale.md#consumption-plan) is currently in preview. To learn more, see [this preview considerations article](https://aka.ms/funclinux).
1919

2020
This quickstart article walks you through how to use the Azure CLI to create your first function app running on Linux. The function code is created locally and then deployed to Azure by using the [Azure Functions Core Tools](functions-run-local.md).
2121

@@ -44,7 +44,7 @@ func init MyFunctionProj
4444
When prompted, use the arrow keys to select a worker runtime from the following language choices:
4545

4646
+ `dotnet`: creates a .NET class library project (.csproj).
47-
+ `node`: creates a JavaScript project.
47+
+ `node`: creates a JavaScript or TypeScript project. When prompted, choose `JavaScript`.
4848
+ `python`: creates a Python project. For Python functions, see the [Python quickstart](functions-create-first-function-python.md).
4949

5050
When the command executes, you see something like the following output:
@@ -56,6 +56,12 @@ Writing local.settings.json
5656
Initialized empty Git repository in C:/functions/MyFunctionProj/.git/
5757
```
5858

59+
Use the following command to navigate to the new `MyFunctionProj` project folder.
60+
61+
```bash
62+
cd MyFunctionProj
63+
```
64+
5965
[!INCLUDE [functions-create-function-core-tools](../../includes/functions-create-function-core-tools.md)]
6066

6167
[!INCLUDE [functions-update-function-code](../../includes/functions-update-function-code.md)]
@@ -66,24 +72,17 @@ Initialized empty Git repository in C:/functions/MyFunctionProj/.git/
6672

6773
[!INCLUDE [functions-create-storage-account](../../includes/functions-create-storage-account.md)]
6874

69-
## Create a Linux App Service plan
70-
71-
[!INCLUDE [app-service-plan-no-h](../../includes/app-service-web-create-app-service-plan-linux-no-h.md)]
72-
7375
## Create a Linux function app in Azure
7476

7577
You must have a function app to host the execution of your functions on Linux. The function app provides a serverless environment for executing your function code. It lets you group functions as a logic unit for easier management, deployment, and sharing of resources. Create a function app running on Linux by using the [az functionapp create](/cli/azure/functionapp#az-functionapp-create) command.
7678

77-
In the following command, use a unique function app name where you see the `<app_name>` placeholder and the storage account name for `<storage_name>`. The `<app_name>` is also the default DNS domain for the function app. This name needs to be unique across all apps in Azure. You should also set the `<language>` runtime for your function app, from `dotnet` (C#), `node` (JavaScript), or `python`.
79+
In the following command, use a unique function app name where you see the `<app_name>` placeholder and the storage account name for `<storage_name>`. The `<app_name>` is also the default DNS domain for the function app. This name needs to be unique across all apps in Azure. You should also set the `<language>` runtime for your function app, from `dotnet` (C#), `node` (JavaScript/TypeScript), or `python`.
7880

7981
```azurecli-interactive
8082
az functionapp create --resource-group myResourceGroup --consumption-plan-location westus --os-type Linux \
8183
--name <app_name> --storage-account <storage_name> --runtime <language>
8284
```
8385

84-
> [!NOTE]
85-
> If you have an existing resource group named `myResourceGroup` with any non-Linux App Service apps, you must use a different resource group. You can't host both Windows and Linux apps in the same resource group.
86-
8786
After the function app has been created, you see the following message:
8887

8988
```output
@@ -99,9 +98,4 @@ Now, you can publish your project to the new function app in Azure.
9998

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

102-
## Next steps
103-
104-
This article showed you how to host your function app on a default Azure App Service container. You can also host your functions on Linux in your own custom container.
105-
106-
> [!div class="nextstepaction"]
107-
> [Create a function on Linux using a custom image](functions-create-function-linux-custom-image.md)
101+
[!INCLUDE [functions-quickstart-next-steps-cli](../../includes/functions-quickstart-next-steps-cli.md)]

includes/functions-update-function-code.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ author: ggailey777
66
manager: jeconnoc
77
ms.service: azure-functions
88
ms.topic: include
9-
ms.date: 09/16/2018
9+
ms.date: 03/12/2019
1010
ms.author: glenga
11-
ms.custom: include file
11+
ms.custom: include file, fasttrack-edit
1212
---
1313

1414
## Update the function
@@ -17,12 +17,13 @@ By default, the template creates a function that requires a function key when ma
1717

1818
### C\#
1919

20-
Open the MyHttpTrigger.cs code file that is your new function and update the **AuthorizationLevel** attribute in the function definition to a value of `anonymous` and save your changes.
20+
Open the MyHttpTrigger.cs code file that is your new function and update the **AuthorizationLevel** attribute in the function definition to a value of `Anonymous` and save your changes.
2121

2222
```csharp
2323
[FunctionName("MyHttpTrigger")]
24-
public static IActionResult Run([HttpTrigger(AuthorizationLevel.Anonymous,
25-
"get", "post", Route = null)]HttpRequest req, ILogger log)
24+
public static async Task<IActionResult> Run(
25+
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
26+
ILogger log)
2627
```
2728

2829
### JavaScript

0 commit comments

Comments
 (0)