datacenter airlift - next gen cloud infra management and scale
TRANSCRIPT
Next Generation Cloud Infrastructure Management and Scale“Your VMs are not pets, they’re cattle”
Tiago [email protected]
Agenda• What are scale sets and when to use them?• Challenges of scaling• Deploying Scale Sets• Over-provisioning• Deployment Tools
• Managing Scale Sets• Scaling • Upgrade and Patching• Application Deployment
• Q&A
What are scale sets and when to use them?
What is a Virtual Machine Scale Set?A Virtual Machine Scale Set (VMSS) is an easy way to deploy and manage VMs as a set• Integrated with Azure Autoscale• Integrated with Azure Load Balancer• Scalable• Platform-independent
VMs and VM Scale SetsAzure Public CloudAzure Stack
VM ExtensionsACS, Mesos,
Swarm
Service Fabric Batch
App ServiceMedia
Web Apps
MobileApps
CloudFoundry
Infrastructure
IaaS and IaaS+
Azure’s Next Generation cloud platform
Cluster Orchestrati
on
PaaS LayersCluster OrchestrationVertical PaaS
When to use VM Scale Sets?Are you managing a lone wolf or a pack of wolfs?
Why VM Scale Sets?Modern cloud applications need:• Scale - Deploy identical resources
• Easily• Rapidly• At scale..
• Customization – PaaS-like ease of use with custom infrastructure requirements
• Availability - Roll out updates without service interruption
• Low cost - Dynamically increase/decrease compute power to optimize costs
• Elasticity - Automatically scale to changing demand
Challenges of scaling
Resource Group
Subnet
Storage
VM
VNET
Public IP
NIC storageAccount- accountType
publicIPAddress- allocationMetho
d- domainNameLa
bel
virtualNetwork- addressSpace- Subnet
- addressPrefix
networkInterface- privateIPAllocationMet
hod
virtualMachine- hardwareProfile- osProfile- storageProfile- networkProfile
Azure Resource Manager: Building a Virtual Machine
Resource Group
Subnet
Storage
VM
VNET
Public IP
NIC
VM
Public IP
NIC
VM
Public IP
NIC…
Subnet
Storage
Resource Loops: Declare multiple resources
Challenges of Scale• Need to correlate loops of independent resources, e.g. NICs,
storage accounts, VMs• Different loop sizes for NICs and storage accounts etc.
• No integrated mechanism to scale out• Scale in – How do you ensure availability?• Resource loops are a syntactical shorthand, but multiple calls
go to fabric
VM Scale Sets in ARM• Auto-Scalable
• Fast
• Customizable • Windows or Linux• VM extensions• Open PaaS platform
• Ease of Management• Focus on target instance count• Updateable
Resource Group
Subnet
Scalable Storage
VM
VNET
Scalable NIC…V
MVM
VM
Scale Set
Extensions
Manage groups of identical VMs
Deploying Azure Virtual Machine Scale Sets
Deployment reliability and overprovisionWhy is overprovisioning needed?• Provisioning success rate is
dramatically improved by deploying more VMs than requested• “overprovision” default is true• E.g. set capacity to 100 VMs
• Deploy up to 120 VMs (depending on platform)• Keep the first 100 VMs to deploy successfully
• No charge for overprovisioned VMs
Side-effects of overprovision• Extensions can run on doomed VMs• VMs could exceed subnet capacity• Uneven distribution across UDs & FDs• Storage accounts limited to 20 disks• NAT rule quota can be exceeded• Gaps in NAT rules• Gaps in VM IDs/names
Best Practices for overprovisioning• Use overprovisioning for large deployments • Allow for overprovisioning in NAT/subnet configuration e.g.
configure for 120• Don’t make app depend on contiguous VM/IP/NAT assignment• Assume extensions will run on VMs marked for deletion (for now)• Rebalance VMs across FDs/UDs with stop-dealloc -> Start
VMSS Deployment tools
Azure Portal Visual Studio REST PowerShell / cli
Azure Virtual Machine Scale Set Deployment
Demo
Managing Azure Virtual Machine Scale Sets
Scaling Virtual Machine Scale Set
Scaling
Manual ScalingAdvanced Auto-Scaling
Scale Up/DownScale Out/InScale Out/In
Scaling Out/InVMSS
Azure load balancer
Scaling Out/InVMSS
Azure load balancer
Scaling Out/InVMSS
Azure load balancer
Scaling Out/InVMSS
Azure load balancer
Scaling Up/DownVMSS
Azure load balancer
Scaling Up/DownVMSS
Azure load balancer
Advanced Auto-ScalingScale out and in Virtual Machine Scale Sets based on:• Performance metric thresholds• Recurring schedule• Particular date
Use webhooks to send messages to other applications when VMSS is scaled out or in.
Send notifications to a valid email address when VMSS is scaled out or in.
Scaling an Azure Scale Set
Demo
Upgrade Virtual Machine Scale SetThere are 3 main types of upgrades you can do:1. Changing the version or SKU of a platform image2. Changing the URI that points to a new version of a custom
image you built3. Patching the OS from within a virtual machine
Depending on upgrade policy there might exist downtime. If automatic upgrade is enabled all VMs will be updated at the same time.
Upgrade Virtual Machine Scale SetThe basic sequence for changing the OS version/SKU of a platform image or the URI of a custom image looks as follows:1. Get the virtual machine scale set model2. Change the version, SKU, or URI value in the model3. Update the model4. Do a manualUpgrade call on the virtual machines in the
scale set
Application Deployment StrategiesWhen deploying an application or an application update there are 3 main approaches:1. Updating with VM Extensions – by changing the extension
definition. One example is to change the fileURIs to point to new application2. The immutable custom image approach – change the entire
vm image and update all the vms3. Update Containers - Abstract the application lifecycle management to a
level above the cloud infrastructure by using containers and manage application deployments through the use of orchestrators (DC/OS, Kubernetes, Swarm,…)
Upgrading an Azure Virtual Machine Scale Set
Demo
Q&A
Still today
Free AzureTrial
Try Windows Server 2016http://aka.ms/tryws2016
http://aka.ms/tryazure
Try System Center 2016http://aka.ms/trysc2016
Try OMShttp://aka.ms/tryoms
© 2016 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.