How To Create Function App In Azure
What is a function app?
Functions are hosted in an execution context called a function app. You define function apps to logically group and structure your functions and a compute resource in Azure. In our elevator example, you would create a function app to host the escalator drive gear temperature service. There are a few decisions that need to be made to create the function app; you need to choose a service plan and select a compatible storage account.
Choosing a service plan
Function apps may use one o f two types of service plans. The first service plan is the Consumption service plan. This is the plan that you choose when using the Azure serverless application platform. The Consumption service plan provides automatic scaling and bills you when your functions are running. The Consumption plan comes with a configurable timeout period for the execution of a function. By default, it is 5 minutes, but may be configured to have a timeout as long as 10 minutes.
The second plan is called the Azure App Service plan. This plan allows you to avoid timeout periods by having your function run continuously on a VM that you define. When using an App Service plan, you are responsible for managing the app resources the function runs on, so this is technically not a serverless plan. However, it may be a better choice if your functions are used continuously or if your functions require more processing power or execution time than the Consumption plan can provide.
Storage account requirements
When you create a function app, it must be linked to a storage account. You can select an existing account or create a new one. The function app uses this storage account for internal operations such as logging function executions and managing execution triggers. On the Consumption service plan, this is also where the function code and configuration file are stored.
Create a function app
Let's create a function app in the Azure portal.
- Sign into the Azure portal using the same account you activated the sandbox with.
- Select the Create a resource button found on the upper left-hand corner of the Azure portal, and then select Get started > Serverless Function App to open the Function App Create blade. Alternatively, you can use the Compute > Function App option, which will open the same blade.
- Choose a globally unique app name. This will serve as the base URL of your service. For example, you can name it escalator-functions-xxxxxxx, where the x's can be replaced with your initials and your birth year. If this isn't globally unique, you can try any other combination. Valid characters are a-z, 0–9 and -.
- Select the Azure subscription where you would like the function app hosted.
- Select the existing resource group called "3b75ea7f-2cf1–4937–8e49–6a81aa843c2c".
- Select Windows for OS.
- For Hosting Plan, select Consumption Plan, which is the serverless hosting option.
- Select the geographical location closest to you from the list below. In a production system, you would want to select a location near your customers or consumers of the function.
- The free sandbox allows you to create resources in a subset of Azure's global regions. Select a region from the following list when creating any resources.
- For Runtime Stack, select JavaScript from the dropdown, which is the language in which we implement the function examples in this exercise.
- Create a new storage account. Azure will give it a name based on the app name. You can change it if you like, but it must also be unique.
- Make sure that Azure Application Insights is On and select the region closest to you (or your customers).
- Select Create; deployment will take a few minutes. You'll receive a notification once it's complete.
Verify your Azure function app
- From the Azure portal left-hand menu, select Resource groups. You should then see a resource group named 3b75ea7f-2cf1–4937–8e49–6a81aa843c2c in the list of available groups.
2. Select the resource group 3b75ea7f-2cf1–4937–8e49–6a81aa843c2c. You should then see a resource list like the following list.
The item with the lightning bolt Function icon, listed as an App Service, is your new function app. You can click on it to open the details about the new function — it has a public URL assigned to it, if you open that in a browser, you should get a default web page that indicates your Function App is running.
source : https://docs.microsoft.com/en-us/learn/modules/create-serverless-logic-with-azure-functions/3-create-an-azure-functions-app-in-the-azure-portal
How To Create Function App In Azure
Source: https://medium.com/@purwanto.dev/create-a-function-app-in-the-azure-portal-4e4f2692ed0f
Posted by: fischerbessed1987.blogspot.com
0 Response to "How To Create Function App In Azure"
Post a Comment