This document provides information on scalable virtual machines (VMs) and VM scale sets in Microsoft Azure. It includes descriptions of VM scale sets, how they can be used to manage groups of identical VMs, and how they provide capabilities for deployment at scale, autoscale, load balancer integration, and other features. The document also compares unique attributes of VMs and VM scale sets. It provides examples of VM scale set templates and links to documentation and code samples for working with VM scale sets.
Breaking the Code : A Guide to WhatsApp Business API.pdf
UK Azure Users Group
1.
2. Scalable VM
OS Image Diff
Base
OS Image
Scalable VM
OS Image Diff
Scalable VM
OS Image Diff
Scalable VM
OS Image Diff
Scalable Virtual
Machine
OS Image Diff
Disk
Microsoft.Compute/virtualMachineScaleSets
platform independent
3. Virtual Machines
Azure Public CloudAzure Stack
VM Scale Sets
ACS
Mesos, Swarm
Service
Fabric
Batch
App ServiceMedia
Web
Apps
Mobile
Apps
CloudFoundry
Infrastructure
IaaS and
IaaS+
Cluster
Orchestration
PaaS Layers
Cluster Orchestration
Vertical PaaS
Pivotal Cloud Foundry
6. Resource Group
Subnet
Storage
VM
VNET
Public IP
Azure Resource Manager: Building a Virtual Machine
NIC storageAccount
- accountType
publicIPAddress
- allocationMethod
- domainNameLabel
virtualNetwork
- addressSpace
- Subnet
- addressPrefix
networkInterface
- privateIPAllocati
onMethod
virtualMachine
- hardwareProfile
- osProfile
- storageProfile
- networkProfile
https://github.com/Azure/azure-quickstart-templates/ See also Cloud Cover #189
7. Resource Group
Subnet
Storage
VM
VNET
Public IP
Resource Loops: Declare multiple resources
NIC
https://github.com/Azure/azure-quickstart-templates/blob/master/resource-loop-vms-vnet/azuredeploy.json
VM
Public IP
NIC
VM
Public IP
NIC
…
Subnet
Storage
10. Specify a target instance count
Specify a prefix for computer name
1
2
"capacity": "[parameters('instanceCount')]"
"computerNamePrefix": "[parameters('vmSSName')]",
11. Unique to VMSS
Built in deployment at scale
Autoscale
Load balancer/autoscale
integration
Simple manual scale/in out with
HA
Deployment reliability
(overprovisioning)
Manual OS image patching
Integrated network properties
Integrated extension properties
>500 VMs/RG
Name Limit
VMs per Scale
Set
100
Storage a/c’s per
subscription
100
FDs/UDs 5/5
Custom
images/scale set
40 VMs (1
Storage a/c)
Unique to VMs
Public IP per VM
Attached data disks
Unique extension startup
params
Permanent machine
name/IP addr links
Specific machine names
17. AutoScale service
(background job)
ARM/CSMPortal
Insights SDK,
PowerShell
Monitoring
Service
(Insights)
Insights
Storage
1 2
3
4
5
6
Scale action
Scale action (ask the Resource Provider to scale, via ARM)
Resource validations/checks
Create/update AutoScale setting
Schedule AutoScale job (runs every 5 minutes)
Insights REST API calls
Log AutoScale
trigger events
V
M
V
M
V
M
Scale Set
Job collects metrics for AutoScale rules
WAD metrics
https://azure.microsoft.com/en-us/documentation/articles/cloud-services-dotnet-diagnostics-performance-counters/
https://github.com/Azure/azure-quickstart-templates/tree/master/201-vmss-windows-autoscale
18.
19. Data is stored.. Pros Cons
OS Drive Self-contained, backed by data
service
Poor design in many
scenarios.
Storage limited,
Temp drive Local, ephemeral, good for stateless
scenarios.
Not backed by storage RP.
Storage limited.
Azure Files Storage can be shared across
clients. Perf/scale work ongoing.
Limited scale and
performance.
Azure Blobs Data is a reliable service backed by
storage.
Existing apps need
redesign. IOPS limits
Azure Tables Data is a reliable service backed by
storage.
Simple data structure.
App redesign.
Remote source (e.g.
DB)
Data is a service separate from app
infrastructure.
Only suitable for a subset of
apps.
3rd party shared
storage e.g. Lustre
Storage shared across clients.
Scalable performance.
Lustre is Linux only.
22. # Create a scale set from a template
New-AzureRmResourceGroupDeployment -name dep1 -vmSSName myvmss -instanceCount 2 -ResourceGroupName
myrg -TemplateUri https://raw.githubusercontent.com/gbowerman/azure-myriad/master/vmss-ubuntu-vnet-
storage.json
# Get scale set details
Get-AzureRmResource -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.
# Scaling out or scaling in
New-AzureRmResourceGroupDeployment -name dep2 -vmSSName myvmss -instanceCount 2 -ResourceGroupName myrg
–TemplateUri https://raw.githubusercontent.com/gbowerman/azure-myriad/master/vmss-scale-in-or-out.json
# Remove a scale set:
# Easy: Remove the resource group:
Remove-AzureRmResourceGroup -Name myrg
#Precise: Remove a resource:
Remove-AzureRmResource -Name myvmss -ResourceGroupName myrg -ApiVersion 2015-06-15 -ResourceType
Microsoft.Compute/virtualMachineScaleSets
24. # create a resource group
azure group create myrg "Southeast Asia"
# create a scale set
azure group deployment create -g myrg -n dep2 --template-uri
https://raw.githubusercontent.com/gbowerman/azure-myriad/master/vmss-
ubuntu-vnet-storage.json
# this should ask for parameters dynamically, or you could specify them
as arguments
# get scale set details
azure resource show -n vmssname -r
Microsoft.Compute/virtualMachineScaleSets -o 2015-06-15 -g myrg
# or for more details:
azure resource show –n vmssname –r
Microsoft.Compute/virtualMachineScaleSets –o 2015-06-15 –g myrg –json –
vv
25. # Creation of a Scale Set with or without a Template.
azure vmss parameters generate create-or-update --parameter-file
%filename%
...
azure vmss create-or-update --resource-group-name %rgname% --parameter-
file %filename%
# GetInstanceView on the Scale Set
azure vmss get-instance-view --resource-group-name %rgname% --vm-scale-
set-name test3
# Scale Up/Down with only updating instance count.
azure vmss parameters set sku --parameter-file %filename% --capacity 2
azure vmss parameters set sku --parameter-file %filename% --capacity 3
azure vmss create-or-update --resource-group-name %rgname% --parameter-
file %filename%
# Manual Upgrade actions on certain instances
azure vmss update-instances --resource-group-name %rgname% --vm-scale-set-
name test3 --vm-instance-ids ...
26. V
M
V
M
V
M
VMSS can be configured
https://github.com/Azure/azure-quickstart-templates/tree/master/201-vmss-automation-dsc
39. Storage AC
VNET
Scale Set
Storage AC
VNET
Scale Set
Storage AC
VNET
Scale Set
Batch pool:
a logical abstraction over
VM scale sets tailored to
batch computing
scenarios
Larger units than a single
VM make for more
manageable coordination
pieces
42.
Scenario Solution
Lift and Shift, Front Small-medium Scale, general
purpose compute, autoscale, Linux Support
VM Scale Sets
Containerized microservices and containerized
applications on Linux
Azure Container
Service
External Websites with minimal Guest
Customization
WebApps
Hyper Scale, stateful and stateless microservices Service Fabric
Open source stack, polyglot, migration from
OpenStack / VMWare
Cloud Foundry
43. Title Link
Azure blog Announcement (MarkRuss) https://azure.microsoft.com/en-us/blog/azure-vm-scale-sets-public-preview/
Linux VMSS with shared storage using Lustre http://blogs.msdn.com/b/arsen/archive/2015/12/30/linux-azure-vm-scale-sets-with-shared-storage-
using-lustre.aspx
VMSS Getting Started Guide https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-vmss-walkthrough/
VMSS Overview https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-vmss-overview/
VMSS REST API https://msdn.microsoft.com/library/mt589023.aspx
Deploying VMSS Templates in Visual Studio https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-vmss-vstemplates/
VMSS example templates https://github.com/Azure/azure-quickstart-templates
https://github.com/gbowerman/azure-myriad
VMSS Intro video (Mark Russ) https://sec.ch9.ms/ch9/5b22/f343f009-b42e-4a6e-8eac-
bf8252de5b22/MarkRussinovichAzureScaleSet_high.mp4
Cloud Cover 191 https://channel9.msdn.com/Shows/Cloud+Cover/Episode-191-Virtual-Machine-Scale-Sets-with-Guy-
Bowerman
Tuesdays with Corey https://regularitguy.com/2015/11/25/tuesdays-with-corey-azure-vm-scale-sets-in-public-preview/
VM Scale Set template dissection https://channel9.msdn.com/Blogs/Windows-Azure/VM-Scale-Set-Template-Dissection/player