Date post: | 28-May-2015 |
Category: |
Technology |
Upload: | azure-summit-brasil |
View: | 264 times |
Download: | 2 times |
Windows Azure IaaS Avançado
Rafael GodinhoArquiteto de Soluções – Windows Azurehttp://blogs.msdn.com/rafaelgodinho
• Como automação pode te ajudar• Criando sua coleção de VMs• Soluções escaláveis e com alta
disponibilidade
Agenda
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
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"
Glossário
• Cloud service == Hosted service• Virtual machine == PersistentVMRole
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)
RedeNetworkConfigurationSet
• InputEndpoints• SubnetNames
InputEndpoint
LocalPortNamePortProtocolLoadBalancedEndpointSetNameLoadBalancerProbe• Path• Port• Protocol
PersistentVMRole
Role Name=VMNameRole Type=PersistentVMRoleConfigurationSets• NetworkConfigurationSet• WindowsProvisioningConfigurationSet• LinuxProvisioningConfigurationSetOSVirtualHardDiskDataVirtualHardDisksRoleSize=ExtraSmall, Small, Medium, Large, ExtraLarge
ProvisionamentoWindowsProvisioningConfigurationSet
ComputerNameAdminPasswordResetPasswordOnFirstLoginEnableAutomaticUpdatesTimeZoneStoredCertificateSettingsDomainJoin
LinuxProvisioningConfigurationSet
HostNameUserNameUserPasswordDisableSshPasswordAuthenticationSSH
PersistentVMRole
Role Name=VMNameRole Type=PersistentVMRoleConfigurationSets• NetworkConfigurationSet• WindowsProvisioningConfigurationSet• LinuxProvisioningConfigurationSetOSVirtualHardDiskDataVirtualHardDisksRoleSize=ExtraSmall, Small, Medium, Large, ExtraLarge
Storage
DataVirtualHardDisks
HostCachingDiskLabelDiskNameLunLogicalDiskSizeInGBMediaLink
OSVirtualHardDisk
HostCachingDiskLabelDiskNameMediaLinkSourceImageName
PersistentVMRole
Role Name=VMNameRole Type=PersistentVMRoleConfigurationSets• NetworkConfigurationSet• WindowsProvisioningConfigurationSet• LinuxProvisioningConfigurationSetOSVirtualHardDiskDataVirtualHardDisksRoleSize=ExtraSmall, Small, Medium, Large, ExtraLarge
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
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
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
Demo
Service Management API
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.
• Download (http://www.windowsazure.com/en-us/manage/downloads)
• Import-Module Azure
• Get-AzurePublishSettingsFile
• Import-AzurePublishSettings File
• Get-AzureVM
Utilizando PowerShell
• Instalar node.js (http://nodejs.org)
• npm install azure –g
• azure account download
• azure account import
• azure vm list
Utilizando Cross Platform CLI
Demo
Gerenciando Windows Azure com PowerShell e Cross Platform CLI
• Como utilizar a função de captura para salvar imagens customizadas
Criando sua coleção de VMs
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
“Startup Tasks” com VMs (Windows)• Possibilidade de rodar um script quando a máquina ligar• GPO!!!
Demo
Trabalhando com Imagens
• Usando availability sets e o load balancer
Soluções Escaláveis com Alta Disponibilidade
Availability Sets• Separa suas VMs em diferentes hardwares• Permite SLA de 99.95%
Microsoft Confidential
Availability Sets
Fault DomainRack
Fault DomainRack
IIS1
SQL1
IIS2
SQL2
UD #2
UD #2
UD #1
UD #1
Load Balanced Sets• Distribuir o tráfego entre as VMs de acordo com a porta e protocolo
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
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)
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)
Demo
Configurando Load Balancer Probes
• 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
© 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