UK Azure Users Group

Post on 21-Jan-2017

610 views 0 download

transcript

Scalable VM

OS Image Diff

Base

OS ImageScalable 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

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

https://www.flickr.com/photos/vijairaj/278290052/

https://creativecommons.org/licenses/by-sa/2.0/

http://survivorsdogs.wikia.com/wiki/Wolf_(animal)?file=Wolfpack.jpg

http://creativecommons.org/licenses/by-sa/3.0/

http://www.torange-fr.com/animals/birds/Un-troupeau-de-pigeons-et-tourterelles-15497.html

http://creativecommons.org/licenses/by/4.0/

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

- privateIPAllocationMethod

virtualMachine

- hardwareProfile

- osProfile

- storageProfile

- networkProfile

https://github.com/Azure/azure-quickstart-templates/ See also Cloud Cover #189

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

Resource Group

Subnet

Scalable Storage

V

M

VNET

Scalable NIC

…V

MV

M

V

M

Scale Set

Extensions

Manage groups of identical VMs

https://github.com/Azure/azure-quickstart-templates - *vmss*

Specify a target instance count

Specify a prefix for computer name

1

2

"capacity": "[parameters('instanceCount')]"

"computerNamePrefix": "[parameters('vmSSName')]",

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

Subnet

V

M

VNET

V

M

V

M

Scale Set

https://github.com/Azure/azure-quickstart-templates/tree/master/201-vmss-linux-jumpbox

Subnet

V

M

VNET

V

MV

M

Scale Set

https://github.com/Azure/azure-quickstart-templates/tree/master/201-vmss-linux-nat

Subnet

V

M

VNET

V

MV

M

Scale Set

https://github.com/Azure/azure-quickstart-templates/tree/master/201-vmss-windows-autoscale

AppGw

Fabrikam Servers

Contoso Servers

contoso.com/images* Contoso Image Servers

Contoso Video Servers

VIP1:80

AutoScale service

(background job)

ARM/CSMPortal

Insights SDK,

PowerShell

Monitoring

Service

(Insights)

Insights

Storage1 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

MV

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

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.

http://blogs.msdn.com/b/arsen/archive/2015/12/30/linux-azure-vm-scale-sets-with-shared-storage-using-lustre.aspx

• Parallel filesystem

• Aggregates many servers into one

filesystem

• Scales I/O throughput and capacity

• Clients see a single synchronized

namespace

• Shared POSIX filesystem

• Open source

• Linux only

# Create a scale set from a template

New-AzureRmResourceGroupDeployment -name dep1 -vmSSName myvmss -instanceCount 2 -ResourceGroupNamemyrg -TemplateUri https://raw.githubusercontent.com/gbowerman/azure-myriad/master/vmss-ubuntu-vnet-storage.json

# Get scale set details

Get-AzureRmResource -name myvmss -ResourceGroupName myrg -ResourceTypeMicrosoft.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 -ResourceTypeMicrosoft.Compute/virtualMachineScaleSets

https://github.com/AzureRT/azure-powershell/releases

# create a resource group

azure group create myrg "Southeast Asia"

# create a scale set

azure group deployment create -g myrg -n dep2 --template-urihttps://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

# 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 ...

azure vmss list-all

V

M

V

MV

MVMSS can be configured

https://github.com/Azure/azure-quickstart-templates/tree/master/201-vmss-automation-dsc

https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-vmss-vstemplates/

https://github.com/Azure/azure-sdk-for-net

https://github.com/Azure/azure-sdk-for-java/

https://github.com/Azure/azure-sdk-for-python

https://github.com/Azure/azure-sdk-for-go

https://github.com/Azure/azure-sdk-for-ruby

https://github.com/Azure/azure-sdk-for-node

Authenticating a service principal with Azure Resource Manager -https://azure.microsoft.com/en-us/documentation/articles/resource-group-authenticate-service-principal/

https://azure.microsoft.com/en-us/blog/azure-resource-manager-preview-sdks/http://www.dushyantgill.com/blog/2015/05/23/developers-guide-to-auth-with-azure-resource-manager-api/

https://msdn.microsoft.com/en-us/library/azure/mt589023.aspx

https://github.com/gbowerman/vmssdashboard

https://resources.azure.com/

http://spinnaker.io

Network Security Group

LoadBalancer

Scale Set

LoadBalancer

Scale Set

LoadBalancer

Scale Set

Network Security Group

PIP PIP PIP

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

PaaS Options with ARM Stack

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

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