Quickstart: Create App Service app using an ARM template
Статия
Get started with Azure App Service by deploying an app to the cloud using an Azure Resource Manager template (ARM template) and Azure CLI in Cloud Shell. A Resource Manager template is a JavaScript Object Notation (JSON) file that defines the infrastructure and configuration for your project. You incur no costs to complete this quickstart because you use a free App Service tier.
To complete this quickstart, you'll need an Azure account with an active subscription. If you don't have an Azure account, you can create one for free.
Skip to the end
If you're familiar with using ARM templates, you can skip to the end by selecting this
button. This button opens the ARM template in the Azure portal.
In the Azure portal, select Create new to create a new Resource Group and then select the Review + create button to deploy the app.
Get started with Azure App Service by deploying an app to the cloud using an Azure Resource Manager template (ARM template) and Azure CLI in Cloud Shell. A Resource Manager template is a JavaScript Object Notation (JSON) file that defines the infrastructure and configuration for your project. You incur no costs to complete this quickstart because you use a free App Service tier.
To complete this quickstart, you'll need an Azure account with an active subscription. If you don't have an Azure account, you can create one for free.
Skip to the end
If you're familiar with using ARM templates, you can skip to the end by selecting this
button. This button opens the ARM template in the Azure portal.
In the Azure portal, select Create new to create a new Resource Group and then select the Review + create button to deploy the app.
Get started with Azure App Service by deploying an app to the cloud using an Azure Resource Manager template (ARM template) and Azure CLI in Cloud Shell. A Resource Manager template is a JavaScript Object Notation (JSON) file that defines the infrastructure and configuration for your project. A premium plan is needed to deploy a Windows container app. See the App Service pricing page for pricing details.
Skip to the end
If you're familiar with using ARM templates, you can skip to the end by selecting this
button. This button opens the ARM template in the Azure portal.
In the Azure portal, select Create new to create a new Resource Group and then select the Review + create button to deploy the app.
Review the template
The template used in this quickstart is from Azure Quickstart Templates. It deploys an App Service plan and an App Service app on Windows. It's compatible with .NET Core, .NET Framework, PHP, Node.js, and Static HTML apps. For Java, see Create Java app.
Programming language stack (.NET, php, node, html)
helloWorld
boolean
False
True = Deploy "Hello World" app
repoUrl
string
External Git repo (optional)
The template used in this quickstart is from Azure Quickstart Templates. It deploys an App Service plan and an App Service app on Linux. It's compatible with all supported programming languages on App Service.
Azure CLI is used here to deploy the template. You can also use the Azure portal, Azure PowerShell, and REST API. To learn other deployment methods, see Deploy templates.
The following code creates a resource group, an App Service plan, and a web app. A default resource group, App Service plan, and location have been set for you. Replace <app-name> with a globally unique app name (valid characters are a-z, 0-9, and -).
Run the following commands to deploy a .NET framework app on Windows.
az group create --name myResourceGroup --location "southcentralus"
az deployment group create --resource-group myResourceGroup \
--parameters language=".NET" helloWorld="true" webAppName="<app-name>" \
--template-uri "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.web/app-service-docs-windows/azuredeploy.json"
Run the following commands to create a Python app on Linux:
az group create --name myResourceGroup --location "southcentralus"
az deployment group create --resource-group myResourceGroup --parameters webAppName="<app-name>" linuxFxVersion="PYTHON|3.9" \
--template-uri "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.web/app-service-docs-linux/azuredeploy.json"
To deploy a different language stack, update linuxFxVersion with appropriate values. Samples are shown in the table. To show current versions, run the following command in the Cloud Shell: az webapp config show --resource-group myResourceGroup --name <app-name> --query linuxFxVersion
Language
Example
.NET
linuxFxVersion="DOTNETCORE|3.0"
PHP
linuxFxVersion="PHP|7.4"
Node.js
linuxFxVersion="NODE|10.15"
Java
linuxFxVersion="JAVA|1.8 |TOMCAT|9.0"
Python
linuxFxVersion="PYTHON|3.7"
Run the following commands to deploy a .NET app on a Windows container.
az group create --name myResourceGroup --location "southcentralus"
az deployment group create --resource-group myResourceGroup \
--parameters webAppName="<app-name>" \
--template-uri "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.web/app-service-docs-windows-container/azuredeploy.json"
In this learning path, get acquainted with using Azure App Service to create and deploy your website without underlying servers, storage or network assets.
Build end-to-end solutions in Microsoft Azure to create Azure Functions, implement and manage web apps, develop solutions utilizing Azure storage, and more.