Azure 快速入門範本目前提供英文版
Deploys a Windows VM Scale Set running IIS and a very basic .NET MVC web app. The VMSS PowerShell DSC Extension is leveraged to do the IIS install and WebDeploy package deployment.
此 Azure Resource Manager (ARM) 範本是由社群成員 (而非 Microsoft) 建立。每個 ARM 範本都是由其擁有者 (而非 Microsoft) 依據授權合約授權給您。Microsoft 並不負責社群成員所提供和授權的 ARM 範本,而不會為了安全性、相容性或效能進行篩選。社群 ARM 範本並未依據任何 Microsoft 支援方案或服務提供支援,而且會在沒有任何擔保的情況下依現況提供。
參數
參數名稱 | 說明 |
---|---|
vmSku | Size of VMs in the VM Scale Set. |
windowsOSVersion | The Windows version for the VM. This will pick a fully patched image of this given Windows version. Allowed values: 2008-R2-SP1, 2012-Datacenter, 2012-R2-Datacenter & 2016-Datacenter, 2019-Datacenter. |
vmssName | String used as a base for naming resources. Must be 3-61 characters in length and globally unique across Azure. A hash is prepended to this string for some resources, and resource-specific information is appended. |
instanceCount | Number of VM instances (100 or less). |
singlePlacementGroup | When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. |
adminUsername | Admin username on all VMs. |
adminPassword | Admin password on all VMs. |
_artifactsLocation | The base URI where artifacts required by this template are located. For example, if stored on a public GitHub repo, you'd use the following URI: https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-vmss-windows-webapp-dsc-autoscale/. |
_artifactsLocationSasToken | The sasToken required to access _artifactsLocation. If your artifacts are stored on a public repo or public storage account you can leave this blank. |
powershelldscZip | Location of the PowerShell DSC zip file relative to the URI specified in the _artifactsLocation, i.e. DSC/IISInstall.ps1.zip |
webDeployPackage | Location of the of the WebDeploy package zip file relative to the URI specified in _artifactsLocation, i.e. WebDeploy/DefaultASPWebApp.v1.0.zip |
powershelldscUpdateTagVersion | Version number of the DSC deployment. Changing this value on subsequent deployments will trigger the extension to run. |
location | Location for all resources. |
platformFaultDomainCount | Fault Domain count for each placement group. |
使用範本
PowerShell
New-AzResourceGroup -Name <resource-group-name> -Location <resource-group-location> #use this command when you need to create a new resource group for your deployment安裝和設定 Azure PowerShell
New-AzResourceGroupDeployment -ResourceGroupName <resource-group-name> -TemplateUri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/demos/vmss-windows-webapp-dsc-autoscale/azuredeploy.json
命令列
az group create --name <resource-group-name> --location <resource-group-location> #use this command when you need to create a new resource group for your deployment安裝和設定 Azure 跨平台命令列介面
az group deployment create --resource-group <my-resource-group> --template-uri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/demos/vmss-windows-webapp-dsc-autoscale/azuredeploy.json