Questions? Feedback? powered by Olark live chat software
Přeskočit navigaci

Azure VM Scale Sets public preview

Publikováno dne 11 listopadu, 2015

CTO, Microsoft Azure

Updated April 20, 2016: Azure VM Scale Sets are now generally available. The GA announcement is here: Azure Virtual Machine Scale Sets GA, and the product page is here: Virtual Machine Scale Sets.

Today we are announcing the public preview of Azure Virtual Machine Scale Sets. VM Scale Sets are an Azure Compute resource you can use to deploy and manage a collection of virtual machines as a set. Scale sets are well suited for building large-scale services targeting big compute, big data, and containerized workloads – all of which are increasing in significance as cloud computing continues to evolve.

Scale set VMs are configured identically, you just choose how many you need, which enables them to scale out and in rapidly and automatically. Integrating with Azure Insights Autoscale, they provide true autoscale with no need to pre-provision VMs, allowing you to use only the compute resources your application needs at any time. You can deploy VM Scale Sets using Azure Resource Manager templates and they support Windows and Linux platform images, as well as custom images and extensions. VM Scale Sets also integrate with Azure networking resources such as Load Balancers and Network Security Groups, making it easy to spread workloads across the VMs of a VM Scale Set, and to configure NAT rules so that you can connect to specific VM instances for troubleshooting.VMSS_High-level

When you define a VM Scale Set, you only define the resources you need, like VMs, NICs, and VM extensions, once in the VM Scale Set properties. Unlike with single-instance VMs, you do not need to independently define and correlate network, storage and extension resources for individual VMs. Besides making it easier to define your Azure infrastructure, this also allows Azure to optimize calls to the underlying fabric, providing greater efficiency.

The elastic nature of VM Scale Sets makes them ideal for supporting scale-out workloads like stateless web front ends and container orchestration or microservices clusters. In fact, the Azure Container Service makes use of VM Scale Sets as the foundation for the Mesos clusters it creates and manages.

Deploying a VM Scale Set

To deploy a scale set, all you need is an Azure subscription. We’ve put some example Virtual Machine Scale Set templates in the azure-quickstart-templates GitHub repository, and will be adding more during the course of the preview.

GitHub Templates

I go through some of the scale set template details in this short video:

You can find the example template I use here: 201-vmss-linux-nat. This template creates a VM Scale Set consisting of Linux VMs that are assigned to a Load Balancer with a public IP address that spreads HTTP traffic across the instances, and also defines NAT rules to allow you to SSH to each VM in the set. Like other Quickstart templates, you can deploy it by selecting the Deploy button.

VMSS_ParametersDoing this takes you to the Azure portal, which prompts you to specify the template’s parameters:

  • Set the VM size to Standard_A1 A1 – all VMs will be set to the size you choose.
  • Choose an OS version, this template creates Ubuntu VMs so we’ll select 15.10.
  • For the VMSSNAME we’ll choose a value less than nine characters in length as this template will also use the name when creating other resources, including storage accounts which it will prepend with a unique string.
  • In this example, the INSTANCECOUNT parameter corresponds to a property of the virtualMachineScaleSet resource called capacity that indicates the number of VMs in the VM Scale Set. During the public preview you can create up to 100 VMs in a VM Scale Set.
  • The ADMINUSERNAME and ADMINPASSWORD parameters are the user credentials for each VM in the VM Scale Set.
  • Click OK, create a new resource group, choose a location and accept the legal terms.
  • Click CREATE to deploy the template with the parameters you entered.

When the deployment completes, you’ll see a summary of the VM Scale Set resources, which includes the VM Scale Set itself, the load balancer, public IP address, VNET, and a set of uniquely named storage accounts:

VMSS_Resources

To connect to an individual VM, click on the public IP address resource (which is associated with the load balancer) and copy the DNS name. The NAT rules defined in the template translate an incoming port of 50000 to port 22 (SSH) of the first VM, an incoming port of 50001 to port 22 of the second VM and so on, so to connect to the first VM, SSH to port 50000 of your public IP address.

Deploying with Azure CLI and PowerShell

You can also create VM Scale Sets using the Azure CLI:

azure group deployment create -g myrg -n dep2 --template-uri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-vmss-linux-nat/azuredeploy.json

To deploy a VM Scale Set using PowerShell, use the New-AzureRMResourceGroup cmdlet:

New-AzureRMResourceGroupDeployment -name dep1 -vmSSName myvmss -instanceCount 3 -ResourceGroupName myrg -TemplateUri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-vmss-linux-nat/azuredeploy.json

Note: If you’re using an Azure PowerShell version below 1.0 replace New-AzureRMResourceGroupDeployment with New-AzureResourceGroupDeployment.

You’ll be prompted for any template parameters that are left out like resourceLocation, adminUsername etc.

PowerShell_VMSS

There are also preview CLI/PowerShell builds available which contain imperative commands to manage scale sets and scale set VMs. You can track these in GitHub: https://github.com/AzureRT/azure-powershell/releases and https://github.com/AzureRT/azure-xplat-cli/releases/.

Exploring your VM Scale Sets

We’re working on adding more detailed integration between scale sets and the Azure Portal, and in the meantime a good place to view the scale set resources you create is in the Azure Resource Explorer, which allows you to see how every resource in your subscription is defined:

Resource Explorer

For more information on how to deploy and manage VM Scale Sets, refer to the Azure VM Scale Sets Getting Started Guide. There is also a REST API guide available for developers. The VM Scale Set examples in our Quickstart templates provide useful examples you can adapt too. You can also check out Cloud Cover 191 which gave us an early preview of VM Scale Sets, and this Channel9 video overview of a VM Scale Set template.

Go ahead, give scale sets a try. We’d love your feedback on using scale sets and what you’d like to see in the future. You can send suggestions to vmssfeedback@microsoft.com.