windows azure infrastructure as a service (iaas) avançado

31
Windows Azure IaaS Avançado Rafael Godinho Arquiteto de Soluções – Windows Azure http://blogs.msdn.com/rafaelgodinho

Upload: azure-summit-brasil

Post on 28-May-2015

274 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Windows Azure Infrastructure as a Service (IaaS) Avançado

Windows Azure IaaS Avançado

Rafael GodinhoArquiteto de Soluções – Windows Azurehttp://blogs.msdn.com/rafaelgodinho

Page 2: Windows Azure Infrastructure as a Service (IaaS) Avançado

• Como automação pode te ajudar• Criando sua coleção de VMs• Soluções escaláveis e com alta

disponibilidade

Agenda

Page 3: Windows Azure Infrastructure as a Service (IaaS) Avançado

Microsoft Confidential

Disco no Storage

Blob Storag

e

Cloud

Provisionamento de MáquinasImagem e TamanhoFerramentas

Portal

>_Script

(Windows, Linux e Mac)

REST API

BootWindows Server

Linux

Extra SmallSmallMediumLarge X-Large

Page 4: Windows Azure Infrastructure as a Service (IaaS) Avançado

Service Management API• REST - https://management.core.windows.net• Autenticação com certificado X509• Chamadas assíncronas• Versionado através de HTTP header

• "x-ms-version", "2012-03-01"

Page 5: Windows Azure Infrastructure as a Service (IaaS) Avançado

Glossário

• Cloud service == Hosted service• Virtual machine == PersistentVMRole

Page 6: Windows Azure Infrastructure as a Service (IaaS) Avançado

Anatomia de uma VMPersistentVMRole (s)

Role Name=VMNameRole Type=PersistentVMRoleConfigurationSets• NetworkConfigurationSet• WindowsProvisioningConfigurationSet• LinuxProvisioningConfigurationSetOSVirtualHardDiskDataVirtualHardDisksRoleSize=ExtraSmall, Small, Medium, Large, ExtraLarge

Deployment

Slot (Always Production for PersistentVMRole)DeploymentNameRoleListDnsServersVirtualNetworkName

Cloud Service (Hosted Service)

ServiceName (myservice.cloudapp.net)AffinityGroupLocationDeployments (Production, Staging)

Page 7: Windows Azure Infrastructure as a Service (IaaS) Avançado

RedeNetworkConfigurationSet

• InputEndpoints• SubnetNames

InputEndpoint

LocalPortNamePortProtocolLoadBalancedEndpointSetNameLoadBalancerProbe• Path• Port• Protocol

PersistentVMRole

Role Name=VMNameRole Type=PersistentVMRoleConfigurationSets• NetworkConfigurationSet• WindowsProvisioningConfigurationSet• LinuxProvisioningConfigurationSetOSVirtualHardDiskDataVirtualHardDisksRoleSize=ExtraSmall, Small, Medium, Large, ExtraLarge

Page 8: Windows Azure Infrastructure as a Service (IaaS) Avançado

ProvisionamentoWindowsProvisioningConfigurationSet

ComputerNameAdminPasswordResetPasswordOnFirstLoginEnableAutomaticUpdatesTimeZoneStoredCertificateSettingsDomainJoin

LinuxProvisioningConfigurationSet

HostNameUserNameUserPasswordDisableSshPasswordAuthenticationSSH

PersistentVMRole

Role Name=VMNameRole Type=PersistentVMRoleConfigurationSets• NetworkConfigurationSet• WindowsProvisioningConfigurationSet• LinuxProvisioningConfigurationSetOSVirtualHardDiskDataVirtualHardDisksRoleSize=ExtraSmall, Small, Medium, Large, ExtraLarge

Page 9: Windows Azure Infrastructure as a Service (IaaS) Avançado

Storage

DataVirtualHardDisks

HostCachingDiskLabelDiskNameLunLogicalDiskSizeInGBMediaLink

OSVirtualHardDisk

HostCachingDiskLabelDiskNameMediaLinkSourceImageName

PersistentVMRole

Role Name=VMNameRole Type=PersistentVMRoleConfigurationSets• NetworkConfigurationSet• WindowsProvisioningConfigurationSet• LinuxProvisioningConfigurationSetOSVirtualHardDiskDataVirtualHardDisksRoleSize=ExtraSmall, Small, Medium, Large, ExtraLarge

Page 10: Windows Azure Infrastructure as a Service (IaaS) Avançado

POST - https://management.core.windows.net/<subscription-id>/services/hostedservices/<service-name>/deployments

<Deployment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/windowsazure"> <Name>testsmapi1</Name> <DeploymentSlot>Production</DeploymentSlot> <Label>testsmapi1</Label> <RoleList> <Role i:type="PersistentVMRole"> …. </Role> </RoleList></Deployment>

Criando uma VM

Deployment PersistentVMRole

POST - https://management.core.windows.net/<subscription-id>/services/hostedservices/deployments/<deployment-name>/roles

<PersistentVMRole xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/windowsazure"> <RoleName>myvm1</RoleName> <RoleType>PersistentVMRole</RoleType> …. </PersistentVMRole>

PersistentVMRole

Primeira VM é criada com API Create Deployment

Outras VMs no mesmo deployment API Add Role

Page 11: Windows Azure Infrastructure as a Service (IaaS) Avançado

GET - https://management.core.windows.net/<sub-id>/services/hostedservices/<service-name>/deployments/<deployment-name>/roles/<role-name>

Atualizando uma VM

PersistentVMRole

PUT - https://management.core.windows.net/<sub-id>/services/hostedservices/<service-name>/deployments/<deployment-name>/roles/<role-name>

<PersistentVMRole xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/windowsazure"> <RoleName>myvm1</RoleName> <RoleType>PersistentVMRole</RoleType> …. </PersistentVMRole> PersistentVMRole

Modificar o XML (endpoints, discos, etc..) e fazer um PUT

Retorna uma representação XML da VM

Page 12: Windows Azure Infrastructure as a Service (IaaS) Avançado

Outras Operações

Capture Salva a VM como uma imagem reusável

Delete Deleta da VM (mantém os discos)

Download RDP File Gera um arquivo RDP para a VM

Start, Shutdown e Restart

Page 13: Windows Azure Infrastructure as a Service (IaaS) Avançado

Demo

Service Management API

Page 14: Windows Azure Infrastructure as a Service (IaaS) Avançado

Microsoft Confidential

Automação com Scripts

Virtual NetworkingAtravés de um script gerenciar todas as configurações de rede (PowerShell)

Criar VMs Totalmente Configuradas

AutomaçãoConsultar, gerenciar e configurar VMs em múltiplas subscrições, cloud services e contas de storage.

Page 15: Windows Azure Infrastructure as a Service (IaaS) Avançado

• Download (http://www.windowsazure.com/en-us/manage/downloads)

• Import-Module Azure

• Get-AzurePublishSettingsFile

• Import-AzurePublishSettings File

• Get-AzureVM

Utilizando PowerShell

Page 16: Windows Azure Infrastructure as a Service (IaaS) Avançado

• Instalar node.js (http://nodejs.org)

• npm install azure –g

• azure account download

• azure account import

• azure vm list

Utilizando Cross Platform CLI

Page 17: Windows Azure Infrastructure as a Service (IaaS) Avançado

Demo

Gerenciando Windows Azure com PowerShell e Cross Platform CLI

Page 18: Windows Azure Infrastructure as a Service (IaaS) Avançado

• Como utilizar a função de captura para salvar imagens customizadas

Criando sua coleção de VMs

Page 19: Windows Azure Infrastructure as a Service (IaaS) Avançado

Como Funciona?

Blob Storag

e

Blob Storage

Platform Image

Identical/similar deployment instances using common OS image

as start

Capture VM Saves Customized Image to Your Image Library

Page 20: Windows Azure Infrastructure as a Service (IaaS) Avançado

“Startup Tasks” com VMs (Windows)• Possibilidade de rodar um script quando a máquina ligar• GPO!!!

Page 21: Windows Azure Infrastructure as a Service (IaaS) Avançado

Demo

Trabalhando com Imagens

Page 22: Windows Azure Infrastructure as a Service (IaaS) Avançado

• Usando availability sets e o load balancer

Soluções Escaláveis com Alta Disponibilidade

Page 23: Windows Azure Infrastructure as a Service (IaaS) Avançado

Availability Sets• Separa suas VMs em diferentes hardwares• Permite SLA de 99.95%

Page 24: Windows Azure Infrastructure as a Service (IaaS) Avançado

Microsoft Confidential

Availability Sets

Fault DomainRack

Fault DomainRack

IIS1

SQL1

IIS2

SQL2

UD #2

UD #2

UD #1

UD #1

Page 25: Windows Azure Infrastructure as a Service (IaaS) Avançado

Load Balanced Sets• Distribuir o tráfego entre as VMs de acordo com a porta e protocolo

Page 26: Windows Azure Infrastructure as a Service (IaaS) Avançado

Persistent VM Role

Persistent VM Role

Redundância em todos os níveis

Uma Solução com Alta Disponibilidade

IIS Web Application

Web Server

IIS Web Application

Web Server

LB S

QL

Mirro

ring

Internet

SQL-AVSET

IIS-AVSET

SQLServer

SQLServer

Page 27: Windows Azure Infrastructure as a Service (IaaS) Avançado

Microsoft Confidential

HTTP 500

HTTP Load Balancer Probes

Validação à cada 15s (polling)

!= 200 OK (HTTP)

Remove do LB até receber 200

Continua validando (polling)

Page 28: Windows Azure Infrastructure as a Service (IaaS) Avançado

Microsoft Confidential

TCP Load Balancer Probes

Validação à cada 15s (polling)

Espera um ACK no socket

Remove do LB até receber o ACK

Continua validando (polling)

Page 29: Windows Azure Infrastructure as a Service (IaaS) Avançado

Demo

Configurando Load Balancer Probes

Page 30: Windows Azure Infrastructure as a Service (IaaS) Avançado

• O que vimos

• Como automação pode te ajudar

• Como criar sua coleção de VMs

• Soluções escaláveis e com alta disponibilidade

Resumo

Page 31: Windows Azure Infrastructure as a Service (IaaS) Avançado

© 2012 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.

Rafael GodinhoArquiteto de Soluções – Windows Azurehttp://blogs.msdn.com/rafaelgodinho