Deploy a VM Scale Set with a Linux custom image

Última atualização: 01/02/2017

This template allows you to deploy a custom VM Linux image inside an Scale Set. These VMs are behind a load balancer with HTTP load balancing (by default on port 80). The example uses a custom script to do the application deployment and update, you may have to provide your custom script for your own update procedure. You will have to provide a generalized image of your VM in the same subscription and region where you create the VMSS.

Este modelo do ARM (Azure Resource Manager) foi criado por um membro da comunidade, e não pela Microsoft. Cada modelo do ARM é licenciado para você de acordo com o contrato de licença de seu proprietário, e não da Microsoft. A Microsoft não é responsável por modelos do ARM fornecidos e licenciado por membros da comunidade e não avalia sua segurança, compatibilidade ou desempenho. Modelos do ARM da comunidade não têm suporte de nenhum programa ou serviço de suporte da Microsoft e são disponibilizados DA FORMA COMO ESTÃO, sem nenhum tipo de garantia.

Parâmetros

Nome do parâmetro Descrição
vmSku Size of VMs in the VM Scale Set.
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.
capacity Number of VM instances (20 or less).
adminUsername Admin username on all VMs.
adminPassword Admin password on all VMs. It must be at least 12 characters in length.
sourceImageVhdUri The source of the blob containing the custom image, must be in the same region of the deployment.
appPackage The source of the application package to copy using the configuration.sh script it should be inside the _artifacts/app folder
destinationFolder path were the appPackage will be copied inside the Linux machine
serviceName name of the service that needs restart when the new package is copied
customScriptName name of the custom script to be run by bash
_artifactsLocation The base URI where artifacts required by this template are located. When the template is deployed using the accompanying scripts, a private location in the subscription will be used and this value will be automatically generated.
_artifactsLocationSasToken The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated.

Usar o modelo

PowerShell

New-AzureRmResourceGroupDeployment -Name <deployment-name> -ResourceGroupName <resource-group-name> -TemplateUri https://raw.githubusercontent.com/azure/azure-quickstart-templates/master/201-vmss-linux-customimage-autoscale/azuredeploy.json
Instale e configure o PowerShell do Azure

Linha de comando

azure config mode arm
azure group deployment create <my-resource-group> <my-deployment-name> --template-uri https://raw.githubusercontent.com/azure/azure-quickstart-templates/master/201-vmss-linux-customimage-autoscale/azuredeploy.json
Instalar e configurar a Interface de Linha de Comando de Plataforma Cruzada do Azure