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/create-function-app-linux-app-service-plan.md
+58-37Lines changed: 58 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Create a function app on Linux from the Azure portal
3
3
description: Learn how to create your first Azure Function for serverless execution using the Azure portal.
4
4
ms.topic: how-to
5
-
ms.date: 02/28/2019
5
+
ms.date: 04/29/2020
6
6
#Customer intent: As a developer, learn how to use the Azure portal so that I can create a function app that runs on Linux in App Service plan so that I can have more control over how my functions are scaled.
7
7
8
8
---
@@ -22,75 +22,96 @@ Sign in to the Azure portal at <https://portal.azure.com> with your Azure accoun
22
22
23
23
You must have a function app to host the execution of your functions on Linux. The function app provides an environment for execution of your function code. It lets you group functions as a logical unit for easier management, deployment, scaling, and sharing of resources. In this article, you create an App Service plan when you create your function app.
24
24
25
-
1.Select the **Create a resource** button found on the upper left-hand corner of the Azure portal, then select **Compute**> **Function App**.
25
+
1.From the Azure portal menu or the **Home**page, select **Create a resource**.
26
26
27
-

27
+
1. In the **New** page, select **Compute** > **Function App**.
28
28
29
-
2. Use the function app settings as specified in the table below the image.
29
+
:::image type="content" source="./media/create-function-app-linux-app-service-plan/function-app-create-flow.png" alt-text="Create a function app in the Azure portal":::
30
30
31
-

31
+
1. On the **Basics** page, use the function app settings as specified in the following table.
|**App name**| Globally unique name | Name that identifies your new function app. Valid characters are `a-z`, `0-9`, and `-`. |
36
-
|**Subscription**| Your subscription | The subscription under which this new function app is created. |
37
-
|**[Resource Group](../azure-resource-manager/management/overview.md)**| myResourceGroup | Name for the new resource group in which to create your function app. |
38
-
|**OS**| Linux | The function app runs on Linux. |
39
-
|**Publish**| Code | The default Linux container for your **Runtime Stack** is used. All you need to provide is your function app project code. Another option is to publish a custom [Docker image](functions-create-function-linux-custom-image.md). |
40
-
|**[Hosting plan](functions-scale.md)**| App Service plan | Hosting plan that defines how resources are allocated to your function app. When you run in an App Service plan, you can control the [scaling of your function app](functions-scale.md). |
41
-
|**App Service plan/Location**| Create plan | Choose **Create new** and supply an **App Service plan** name. Choose a **Location** in a [region](https://azure.microsoft.com/regions/) near you or near other services your functions access. Choose your desired **[Pricing tier](https://azure.microsoft.com/pricing/details/app-service/linux/)**. <br/>You can't run both Linux and Windows function apps in the same App Service plan. |
42
-
|**Runtime stack**| Preferred language | Choose a runtime that supports your favorite function programming language. Choose **.NET** for C# and F# functions. |
43
-
|**[Storage](../storage/common/storage-account-create.md)**| Globally unique name | Create a storage account used by your function app. Storage account names must be between 3 and 24 characters in length and may contain numbers and lowercase letters only. You can also use an existing account, which must meets the [storage account requirements](storage-considerations.md#storage-account-requirements). |
44
-
|**[Application Insights](functions-monitoring.md)**| Enabled | Application Insights is disabled by default. We recommend enabling Application Insights integration now and choosing a hosting location near your App Service plan location. If you want to do this later, see [Monitor Azure Functions](functions-monitoring.md). |
33
+
| Setting | Suggested value | Description |
34
+
| ------------ | ---------------- | ----------- |
35
+
|**Subscription**| Your subscription | The subscription under which this new function app is created. |
36
+
|**[Resource Group](../articles/azure-resource-manager/management/overview.md)**|*myResourceGroup*| Name for the new resource group in which to create your function app. |
37
+
|**Function App name**| Globally unique name | Name that identifies your new function app. Valid characters are `a-z` (case insensitive), `0-9`, and `-`. |
38
+
|**Publish**|**Code** (default) | Option to publish code files or a Docker container. |
39
+
|**Runtime stack**| Preferred language | Choose a runtime that supports your favorite function programming language. Choose **.NET Core** for C# and F# functions. |
40
+
|**Version**| Version number | Choose the version of your installed runtime. |
41
+
|**Region**| Preferred region | Choose a [region](https://azure.microsoft.com/regions/) near you or near other services your functions access. |
45
42
46
-
3. Select **Create** to provision and deploy the functionapp.
4. Select the Notification icon in the upper-right corner of the portal and watch for the **Deployment succeeded** message.
45
+
1. Select **Next : Hosting**. On the **Hosting** page, enter the following settings.
49
46
50
-

47
+
| Setting | Suggested value | Description |
48
+
| ------------ | ---------------- | ----------- |
49
+
|**[Storage account](../articles/storage/common/storage-account-create.md)**| Globally unique name | Create a storage account used by your function app. Storage account names must be between 3 and 24 characters in length and can contain numbers and lowercase letters only. You can also use an existing account, which must meet the [storage account requirements](../articles/azure-functions/functions-scale.md#storage-account-requirements). |
50
+
|**Operating system**|**Linux**| An operating system is pre-selected for you based on your runtime stack selection, but you can change the setting if necessary. |
51
+
|**[Plan](../articles/azure-functions/functions-scale.md)**|**Consumption (Serverless)**| Hosting plan that defines how resources are allocated to your function app. In the default **Consumption** plan, resources are added dynamically as required by your functions. In this [serverless](https://azure.microsoft.com/overview/serverless-computing/) hosting, you pay only for the time your functions run. When you run in an App Service plan, you must manage the [scaling of your function app](../articles/azure-functions/functions-scale.md). |
51
52
52
-
5. Select **Go to resource** to view your new functionapp.
Next, you create a function in the new function app. Even after your function app is available, it may take a few minutes to be fully initialized.
55
+
1. Select **Next : Monitoring**. On the **Monitoring** page, enter the following settings.
55
56
56
-
## <aname="create-function"></a>Create an HTTP triggered function
57
+
| Setting | Suggested value | Description |
58
+
| ------------ | ---------------- | ----------- |
59
+
|**[Application Insights](../articles/azure-functions/functions-monitoring.md)**|**Yes** (default) | Creates an Application Insights resource of the same *App name* in the nearest supported region. By expanding this setting or selecting **Create new**, you can change the Application Insights name or choose a different region in an [Azure geography](https://azure.microsoft.com/global-infrastructure/geographies/) where you want to store your data. |
1. Select **Review + create** to review the app configuration selections.
64
+
65
+
1. On the **Review + create** page, review your settings, and then select **Create** to provision and deploy the function app.
66
+
67
+
1. Select the **Notifications** icon in the upper-right corner of the portal and watch for the **Deployment succeeded** message.
68
+
69
+
1. Select **Go to resource** to view your new function app. You can also select **Pin to dashboard**. Pinning makes it easier to return to this function app resource from your dashboard.
Even after your function app is available, it may take a few minutes to be fully initialized.
74
+
75
+
Next, you create a function in the new function app.
76
+
77
+
## <aname="create-function"></a>Create an HTTP trigger function
57
78
58
79
This section shows you how to create a function in your new function app in the portal.
59
80
60
81
> [!NOTE]
61
82
> The portal development experience can be useful for trying out Azure Functions. For most scenarios, consider developing your functions locally and publishing the project to your function app using either [Visual Studio Code](functions-create-first-function-vs-code.md#create-an-azure-functions-project) or the [Azure Functions Core Tools](functions-run-local.md#create-a-local-functions-project).
62
83
63
-
1. In your new function app, choose the **Overview** tab, and after it loads completely choose **+ New function**.
84
+
1. From the left menu of the **Functions** window, select **Functions**, then select **Add** from the top menu.
85
+
86
+
1. From the **New Function** window, select **Http trigger**.
64
87
65
-

1. In the **Quickstart**tab, choose **In-portal**, and select **Continue**.
90
+
1. In the **New Function**window, accept the default name for **New Function**, or enter a new name.
68
91
69
-

92
+
1. Choose **Anonymous** from the **Authorization level** drop-down list, and then select **Create Function**.
70
93
71
-
1. Choose **WebHook + API** and then select **Create**.
94
+
Azure creates the HTTP trigger function. Now, you can run the new function by sending an HTTP request.
72
95
73
-

74
-
75
-
A function is created using a language-specific template for an HTTP triggered function.
96
+
## Test the function
76
97
77
-
Now, you can run the new function by sending an HTTP request.
98
+
1. In your new HTTP trigger function, select **Code + Test** from the left menu, then select **Get function URL** from the top menu.
78
99
79
-
## Test the function
100
+

80
101
81
-
1. In your new function, click **</> Get function URL**at the top right, select **default (Function key)**, and then click **Copy**.
102
+
1. In the **Get function URL**dialog box, select **default** from the drop-down list, and then select the **Copy to clipboard** icon.
82
103
83
104

84
105
85
-
2. Paste the function URL into your browser's address bar. Add the query string value `&name=<yourname>` to the end of this URL and press the `Enter` key on your keyboard to execute the request. You should see the response returned by the function displayed in the browser.
106
+
1. Paste the function URL into your browser's address bar. Add the query string value `?name=<your_name>` to the end of this URL and press Enterto run the request.
86
107
87
108
The following example shows the response in the browser:
88
109
89
110

90
111
91
112
The request URL includes a key that is required, by default, to access your function over HTTP.
92
113
93
-
3. When your function runs, trace information is written to the logs. To see the trace output from the previous execution, return to your function in the portal and click the arrow at the bottom of the screen to expand the **Logs**.
114
+
1. When your function runs, trace information is written to the logs. To see the trace output, return to the **Code + Test** page in the portal and expand the **Logs**arrow at the bottom of the page.
94
115
95
116

96
117
@@ -100,7 +121,7 @@ Now, you can run the new function by sending an HTTP request.
100
121
101
122
## Next steps
102
123
103
-
You have created a function app with a simple HTTP triggered function.
124
+
You have created a function app with a simple HTTP trigger function.
0 commit comments