Automating and Managing Windows Azure Solutions with Powershell

Slides:



Advertisements
Similar presentations
Managing Windows Azure Virtual Machines from PowerShell
Advertisements

Windows Azure for SharePoint people Dennis – Solution Architect Microsoft Windows Azure.
Name Title Microsoft Windows Azure Virtual Machines.
Intro to Windows Azure Antimo Musone Cloud Tour Owner Microsoft Student Partner
Microsoft Dynamics AX Technical Conference 2013
Advanced Windows Azure: Infrastructure as a service (IaaS)
Linux on Windows Azure Andreas Wasita.
Page 1 Ricardo Villalobos Windows Azure Architect Evangelist Microsoft Corporation Designing, Building, and Deploying Windows Azure applications.
Windows Azure VMs VMs and Cloud Services VM Availability Images and Disks Managing VMs Agenda.
Partner Practice Enablement - Overview In today's topic students will learn how to use the Microsoft Azure PowerShell cmdlets for management and monitoring.
Integrate into existing systems with PowerShell integration modules Extend by building PS modules to enable integrating into other systems Optimize.
Extending Enterprise Networks to Windows Azure Ganesh Srinivasan Program Manager, Windows Azure Networking Microsoft Corporation AZR316.
Inside Windows Azure Virtual Machines Vijay Rajagopalan Microsoft Corporation.
Deep Dive into Windows Azure Virtual Machines – From Cloud Vendor and Enterprise Perspective Vijay Rajagopalan Principal Lead Program Manager Microsoft.
Devices & Services Full WinRT 11,000 members Windows Phone Runtime 2,800 shared members 600 new members Networking Proximity In-App Purchase.
SOFTWARE AS A SERVICE PLATFORM AS A SERVICE INFRASTRUCTURE AS A SERVICE.
Windows Azure Virtual Machines. Agenda IT Pro experience Support for key server applications Easy storage manageability High availability features.
Name Title Microsoft Deploying SharePoint Farms on Windows Azure Virtual Machines.
Migrating Applications to Windows Azure Virtual Machines Michael Washam Senior Technical Evangelist Microsoft Corporation.
Partner Practice Enablement - Overview In today's topic students will learn how to use the Microsoft Azure PowerShell cmdlets for management and monitoring.
Esri UC 2014 | Demo Theater | Using ArcGIS for Server in the Microsoft Azure Cloud Nikhil Shampur.
Cross Platform Mobile Backend with Mobile Services James
WINDOWS AZURE Scott Guthrie Corporate Vice President Windows Azure Application Platform.
Windows Azure Alex BOGDAN Academic Developer Evangelist.
Partner Practice Enablement - Overview This session will focus on integration strategies for applications deployed using Microsoft Azure Websites and Microsoft.
Windows Azure with a dash of OSS Peter Laudati Technology Evangelist Microsoft Corporation
Using Windows Azure John Donnelly Technical Evangelist Microsoft Technology Centre Thames Valley Park
Windows Azure Overview
Introduction To Windows Azure Cloud
Windows Azure Conference 2014 Azure Infrastructure services foundation.
On Premises Storage Servers Networking O/S Middleware Virtualization Data Applications Runtime You manage Infrastructure (as a Service) Storage.
Interoperabilidade com Windows Azure Computação em nuvem no Windows Azure com suporte a PHP, Java, Ruby e Python Rogerio Cordeiro Technical Evangelist.
Windows Azure Virtual Machines Noam King Azure Lead –Middle East & Africa Microsoft EPG.
Windows Azure Conference 2014 Deploy your Java workloads on Windows Azure.
Partner Practice Enablement - Overview This session will focus on integration strategies for applications deployed using Microsoft Azure Websites and Microsoft.
DCIM211. By 2015, 35% of enterprise IT expenditures for most organizations will be managed outside the IT department’s budget IT budget.
Why SharePoint and Windows Azure are Just Plain Better Together Steve Fox Director, MCS Microsoft Corporation.
Intro to cloud computing and Azure. And in a non-Cloud view, there are inefficiencies in addressing those issues TIME IT CAPACITY Actual Load Allocated.
WINDOWS AZURE Scott Guthrie Corporate Vice President Windows Azure
Website s Azure Websites is an enterprise class cloud solution for developing, testing and running web apps. Azure Websites allows you to focus on what.
Windows Azure Migrating Applications and Workloads Speaker Title Organization.
Hybrid Cloud and Windows Server 2003 end of support on Azure Rod Kruetzfeld Data Center Technical Strategist Microsoft Canada.
Node.js & Windows Azure AZR326  JavaScript on the Server!  Event driven I/O server-side JavaScript  Not thread based, each connection uses only a.
Windows Azure Virtual Machines Anton Boyko. A Continuous Offering From Private to Public Cloud.
IT Professionals 03 | Managing Windows Azure Virtual Machines from PowerShell David Tesar | Microsoft Technical Evangelist David Aiken | Microsoft Group.
Windows Azure. Azure Application platform for the public cloud. Windows Azure is an operating system You can: – build a web application that runs.
Zvezdan Pavković. Storage Non-Persistent Storage Persistent Storage Easily add additional storage. Networking Internal and Input Endpoints configured.
Microsoft Confidential Automation Query, Manage and Configure Windows Azure resources (VMs, Cloud Services, Websites, Storage, Queues, Databases etc…)
Multi-Tier Apps with Admin Access, RDP, Custom Installs Modern Scalable Web Sites Full Windows Server/Linux VMs Web Sites Virtual Machines Cloud Services.
When and why would I use SharePoint in the Cloud?
Azure in a Day Training: Windows Azure Module 1: Windows Azure Overview Module 2: Development Environment / Portal – DEMO: Signing up for Windows Azure.
On Premises Storage Servers Networking O/S Middleware Virtualization Data Applications Runtime You manage Infrastructure (as a Service) Storage Servers.
Enabling the Cloud OS Today  New high-density Web Sites with elastic cloud scaling and complete dev-ops experiences  New rich IaaS experience for self-service.
Microsoft Cloud Computing. Topics to be covered 1.Environmental Features of windows azure 2.What is Cloud Computing 3.Roles in Cloud Computing 4.Benefits.
Windows Azure Overview for IT Pros Anton Boyko. Intro to Cloud Computing Intro to Windows Azure Cloud Services Web Sites Virtual Machines Workload Options.
Going Hybrid – part 1 Moving to Hybrid Cloud with Windows Azure Virtual Machines & System Center 2012 R2.
Windows Azure Boot CampWindowsAzureBootCamp.com. Windows Azure Boot CampWindowsAzureBootCamp.com.
Inspirirani ljudima. Ugasite mobitele. Hvala.. Paolo Pialorsi Senior Consultant PiaSys ( Publishing apps for SharePoint 2013 on Microsoft.
 Cloud Computing technology basics Platform Evolution Advantages  Microsoft Windows Azure technology basics Windows Azure – A Lap around the platform.
ALWAYSON AVAILABILITY GROUPS ON AZURE – LESSONS FROM THE FIELD.
Develop for the Cloud - Windows Azure Microsoft gi Pranav Rastogi.
Virtual Machines and Web Sites
Deploying Web Application
Deploying SharePoint Farms on Windows Azure Virtual Machines
Platform as a Service.
Logo here Module 3 Microsoft Azure Web App. Logo here Module Overview Introduction to App Service Overview of Web Apps Hosting Web Applications in Azure.
Cloud computing Anton Boyko .NET Developer.
Microsoft Azure: Infrastructure as a Service (IaaS)
Introduction to Windows Azure Web Sites
Why? (or … am I really in the right track?)
Presentation transcript:

Automating and Managing Windows Azure Solutions with Powershell Tom Fuller Windows Azure – Technology Solution Professional @DeveloperTofu http://developertofu.com

Who is Tom Fuller? 2 Years as MVP, 5 Years as Microsoft Field Engineer, recently took role as Azure specialist I lived in Buffalo, NY until I left for college and yes, I am still a Buffalo Bills fan but no, I do not miss the snow Active speaker, writer, blogger developertofu.com or @DeveloperTofu 12 years in dev focused roles like architect, web developer lots of work with large enterprises in the US In 2010, the family moves to Atlanta, GA from Tampa, FL A fun challenge, coaching a 5 and under girls team

Cloud Computing Packaged Software Infrastructure Platform Software Storage Servers Networking O/S Middleware Virtualization Data Applications Runtime You manage Infrastructure (as a Service) Platform (as a Service) Managed by vendor You manage Storage Servers Networking O/S Middleware Virtualization Applications Runtime Data Software (as a Service) Managed by vendor Storage Servers Networking O/S Middleware Virtualization Applications Runtime Data Applications Data You manage Runtime Middleware O/S Virtualization Managed by vendor Servers Storage Networking

Cloud Computing Patterns On and Off On & off workloads (e.g. batch job) Over provisioned capacity is wasted Time to market can be cumbersome Cloud Computing Patterns Inactivity Period Compute t Growing Fast Successful services needs to grow/scale Keeping up w/ growth is big IT challenge Cannot provision hardware fast enough Compute t Unpredictable Bursting Unexpected/unplanned peak in demand Sudden spike impacts performance Can’t over provision for extreme cases Compute t Predictable Bursting Services with micro seasonality trends Peaks due to periodic increased demand IT complexity and wasted capacity Compute t

Windows Azure Comprehensive set of services that enable you to quickly build, deploy and manage applications across a global network of Microsoft-managed datacenters Flexible Open Solid

Global Footprint

99.95% monthly SLA

Pay only for what you use

Virtual machines Cloud services Web sites

application building blocks compute application building blocks networking big data virtual machines database storage identity caching web sites infrastructure for building and running your applications service bus media CDN traffic manager mobile This is a more simplified way to present “what is Azure” than the previous slide, some of the individual capabilities have been moved into categories (e.g. data synch in DB, AD, ACS in Identity etc.) cloud services

Windows Azure Cloud Services (Stateless VM’s) compute data management networking SQL database noSQL database websites blob connect virtual network traffic manager VMs cloud services Windows Azure Cloud Services (Stateless VM’s) Virtual machines in the Cloud Two Flavors: A place for your application code to run… Web role is simply a Virtual Machine with IIS pre-configured Worker role is for non-web based processing code, back-end business processes You can actually connect to your web/worker roles – they are just VM’s You package your code/artifacts and Windows Azure bootstraps a VM, installs the code and starts up the VM for you. Load balances multiple instances Web Role Worker Role a place for your application code to run… Web role is simply a Virtual Machine with IIS pre-configured Worker role is for non-web based processing code, back-end business processes You can actually connect to your web/worker roles – they are just VM’s You package your code/artifacts and Windows Azure bootstraps a VM, installs the code and starts up the VM for you. Load balances multiple instances VM Role is a blank template – you install any software you need All these roles are stateless (VM Role will become state full in next release)

Windows Azure Virtual Machines compute data management networking SQL database noSQL database websites blob connect virtual network traffic manager cloud services VMs Windows Azure Virtual Machines Getting Started Select Image and VM Size New Disk Persisted in Storage Boot VM from New Disk Management Portal Building a VM in the cloud Instantly run your existing applications in the cloud using Windows Azure Virtual Machines. Virtual Machines allow you to easily move your applications and infrastructure to the cloud without requiring any changes to the existing code. You can bring your own Windows Server or Linux images or select from a gallery. Regardless of your choice, you retain full control to configure and maintain the image. Windows Azure Virtual Machines are great for: Application mobility Virtual Machines give you application mobility, allowing you to move your virtual hard drives (VHDs) back and forth between on-premises and the cloud. Running popular Microsoft server applications Virtual Machines help you run the same on-premises enterprise applications and infrastructure in the cloud, with support for many popular Microsoft server applications such as Microsoft SQL Server, Active Directory and Microsoft SharePoint Server. Future gallery images will support applications such as SQL Server pre-installed on Windows Server for your usage. Integrate with Other Windows Azure Services Virtual machines can be used in coordination with all of the services provided by Windows Azure. Common scenarios would be to use Windows Azure Virtual Network to connect Virtual Machines to your on-premises data center or include a Virtual Machine in the design of your application that includes web and worker roles. You have three methods of starting this process: Build a VM from the portal, from the command line OR programmatically calling the REST API. Once your choice of provisioning is made you will need to select the image and instance size to start from. The newly created disk will be stored in blob storage and your machine will boot. Blob Storage Scripting (Windows, Linux and Mac) REST API Cloud

Windows Azure Web Sites compute data management networking SQL database noSQL database blob connect virtual network traffic manager cloud services VMs websites Windows Azure Web Sites Quickly and easily deploy sites to a highly scalable cloud environment with the frameworks and open source apps of your choice using Windows Azure Web Sites Supported Deployment Protocols Supports multiple frameworks (ASP.NET, Classic ASP, PHP, Node.js) Pick from popular Open Source apps Pick your DB (SQL Azure, MySQL) Choose your tools (Visual Studio, Git, FTP, WebMatrix) Build on any platform (Windows, Mac, Linux) GIT : FTP Web Deploy : TFS Deploy 1010111001010101010001010100011

Management

Service Management API for Managing and Monitoring Applications in Windows Azure Provides programmatic access to platform functionality Used to deploy, manage, and monitor applications Powerful REST API, performed over SSL and mutually authenticated using X.509 certificates May be accessed from within application running in Windows Azure, or directly over the Internet from any application PowerShell commands using the same APIs can be used to script management functions Application in Windows Azure can be monitored and managed by using Service API’s Service Management API Provide programmatic access to platform functionality Used to deploy, manage, and monitor applications Powerful REST API, performed over SSL and mutually authenticated using X.509 certificates May be accessed from within application running in Windows Azure, or directly over the Internet from any application PowerShell commands using the same APIs can be used to script management functions We can also manage and monitor Applications on Windows Azure using System center which is explained in detail in subsequent slides..

What can you do with PowerShell? Remote Management Manage SQL Databases, Configuration, Diagnostics, Deployments, and Azure assets (Affinity Groups, Storage Accounts, Keys, etc..) Automation Query, Manage and Configure Virtual Machines across multiple subscriptions, cloud services and storage accounts. Provision Fully Configured Virtual Machines Domain Joined Storage and Networking Configured Virtual Networking Completely Configure VNETs from a Script

Getting Started Use: Get-AzurePublishSettingsFile and Import-AzurePublishSettingsFile To Import Downloaded Publish Profile (.publishsettings) http://windows.azure.com/download/publishprofile.aspx Automatically configures Subscription ID, Certificate, Service Endpoint and Subscription Name. For Manual Approach: Associate Certificate and Subscription ID $cert = Get-Item cert:\CurrentUser\My\CERTTHUMBPRINT Set-AzureSubscription 'mysub' -Certificate $cert -SubscriptionID $id Subscription Settings Persisted C:\Users\user\AppData\Roaming\Windows Azure Powershell Multiple Subscription Support Get-AzureSubscription | foreach { Select-AzureSubscription $_.SubscriptionName # Perform Management Operation Against Each Subscription }

Demo Getting Started with Azure Subscription Credentials in Powershell

Virtual Machine Management Quick VM Provisioning Mode Supports VM Creation in a Single Cmdlet Advanced Provisioning Configuration Mode Provision With: Endpoints, Data Disks Configure: Cache Settings for OS/Data Disks and Subnet Names Create Multiple Pre-Defined VMs in a Batch New-AzureVM -VMs $vm1, $vm2, $vm3

Setting the current storage account Returns Storage Account Get-AzureStorageAccount | Select StorageAccountName Sets the Current Storage Account Set-AzureSubscription 'somesub1' -CurrentStorageAccount 'mystorage‘ Cmdlets like New-AzureQuickVM will use this Account

Information Needed to create a VM Image Name Get-AzureVMImage | select ImageName Disk Name Get-AzureDisk | select DiskName Data Center Location Get-AzureLocation

Simple VM Creation First Virtual Machine in a NEW Cloud Service (-Location specified) New-AzureQuickVM -Windows -ServiceName $svc -Name $vm1 -ImageName $wimg -Location $location -Password $pwd New Virtual Machine in an Existing Cloud Service (no –Location) New-AzureQuickVM -Windows -ServiceName $svc -Name $vm2 -ImageName $wimg -Password $pwd Creating a Linux Virtual Machine in an Existing Cloud Service New-AzureQuickVM -Linux -ServiceName $svc -Name $vm3 -ImageName $limg -LinuxUser $lu -Password $pwd

Virtual Machine Discovery Retrieve Cloud Services Get-AzureService Retrieve Virtual Machines for Service Get-AzureVM -ServiceName $cloudSvcName Retrieve Status for All VMs in Subsription Get-AzureService | foreach { $_ | Get-AzureVM | ft ServiceName, Name, InstanceStatus }

Common Settings Name AvailabilitySetName InstanceSize The name of the Virtual Machine AvailabilitySetName The availability set (used for high availability) InstanceSize ExtraSmall, Small, Medium, Large, ExtraLarge

Provisioning Options Add-AzureProvisioningConfig Options -Windows -Password $pwd -WindowsDomain -Password $pwd -Domain $dom, -JoinDomain $fqdn, -DomainUser $domUser -DomainPassword $domPwd -MachineObjectOU $ou -DisableAutomaticUpdates -NoRDPEndpoint, -TimeZone, Certificates Add-AzureProvisioningConfig Options Linux -LinuxUser $user -Password $pwd -DisableSSH , -NoSSHEndpoint -SSHKeyPairs, -SSHPublicKeys installed from certificates deployed in cloud service

Configuring a VM at Provision Time Create Configuration Object with New-AzureVMConfig Modify with Add-* cmdlets Add with New-AzureVM New-AzureVMConfig -Name $vm1 -InstanceSize Medium -ImageName $img | Add-AzureProvisioningConfig -Windows -Password $pwd | Add-AzureDataDisk -CreateNew -DiskLabel 'data' -DiskSizeInGB 10 -LUN 0 | Add-AzureEndpoint -Name 'web' -PublicPort 80 -LocalPort 80 -Protocol tcp | New-AzureVM -ServiceName $newSvc -Location $location

Virtual Machine Storage Data Disks Add/Remove data disks at boot or while running Create blank or attach existing disks Modify Cache Settings of OS Disk or Data Disk Modifying OS Disk while running requires reboot

Data Disk Creation New Virtual Machine Creation with Data Disk New-AzureVMConfig -Name 'myvm1' -InstanceSize 'Small' -ImageName $img | Add-AzureProvisioningConfig -Windows -Password $pwd | Add-AzureDataDisk -CreateNew -DiskSizeInGB 10 -DiskLabel 'myddisk' -LUN 0 | New-AzureVM -ServiceName $cloudSvcName Add new Data Disk to existing Virtual Machine Get-AzureVM -ServiceName 'myvm1' | Add-AzureDataDisk -CreateNew -DiskSizeInGB 10 -DiskLabel 'myddisk' -LUN 1 | Update-AzureVM

Deploying into a Virtual Network Virtual Machine Settings Set Subnet on VM with Set-AzureSubnet Deployment Settings Set Virtual Network -VNetName Set DNS Servers - New-AzureDns and -DNSSettings

Provision into a VNET and AD $dom = 'contoso' $jdom = 'contoso.com' $onPremDNS = New-AzureDns -IPAddress '192.168.1.4' -Name 'OnPremDNS' $cloudDNS = New-AzureDns -IPAddress '10.1.1.4' -Name 'CloudDNS' $computerOU = $advmou = 'OU=AzureVMs,DC=contoso,DC=com‘ New-AzureVMConfig -Name 'myvm1' -InstanceSize 'Small' -ImageName $img | Add-AzureProvisioningConfig -WindowsDomain -Password $pwd -Domain $dom ` -DomainUserName $domUser -DomainPassword $dpwd -JoinDomain $jdom ` -MachineObjectOU 'AzureVMs' | Set-AzureSubnet -SubnetNames 'AppSubnet' | New-AzureVM –ServiceName $svc -AffinityGroup 'adag' ` -VNetName 'ADVNet' -DnsSettings $onPremDNS, $cloudDNS

Demo Provisioning and updating a new Virtual Machine from Powershell

Automation

Adding and Removing Instances Update a running role to have more or less instances Set-AzureRole –ServiceName "MySvc1" –Slot "Production" –RoleName "MyTestRole3" –Count 3

VM Batch Creation Create Multiple Configured VMs and Pass to New-AzureVM $vm1 = New-AzureVMConfig -Name 'myvm1' -InstanceSize 'Small' -ImageName $img | Add-AzureProvisioningConfig -Windows -Password $pwd $vm2 = New-AzureVMConfig -Name 'myvm1' -InstanceSize 'Small' -ImageName $img | Add-AzureProvisioningConfig -Windows -Password $pwd $vm3 = New-AzureVMConfig -Name 'myvm1' -InstanceSize 'Small' -ImageName $img | Add-AzureProvisioningConfig -Windows -Password $pwd New-AzureVM -CreateService -ServiceName $cloudSvcName -VMs $vm1,$vm2,$vm3 -Location $dc

Disk and Image Repository OS Images Get-AzureVMImage # Return all Get-AzureVMImage | Where { $_.Category -eq 'Microsoft' } # Return Microsoft Get-AzureVMImage | Where { $_.Category -eq 'User' } # Return Custom Get-AzureVMImage | Where { $_.Category -eq 'Partner' } # Return Partner Images Get-AzureVMImage | Where { $_.OS -eq 'Windows' } # Return only Windows OS images Remove-AzureVMImage -ImageName 'myimg' -DeleteVHD # Delete image and storage Add-AzureVMImage -OS 'Windows' -ImageName 'MyWinImage' -MediaLocation 'http://storageaccount/vhds/winimage.vhd' # Add Existing VM Image from Storage Disks Get-AzureDisk # Return all Get-AzureDisk | Where { $_.AttachedTo -eq $null } # Return all not attached to a VM Get-AzureDisk | Where { $_.OS -eq $null } # Return only data disks Get-AzureDisk | Where { $_.OS -eq 'Windows' } # Return only Windows OS disks Remove-AzureDisk -DiskName 'mydisk' -DeleteVHD # Delete disk and storage Add-AzureDisk -OS 'Windows' -DiskName 'MyWinDisk' -MediaLocation 'http://storageaccount/vhds/winosdisk.vhd‘ # Add Existing OS Disk from Storage Add-AzureDisk -DiskName 'MyDataDisk' -MediaLocation 'http://storageaccount/vhds/datadisk.vhd‘ # Add Existing Data Disk from Storage Microsoft, Partner and User OS Disks or Data Disks

Batch Updating Running VMs Remove RDP and Add New Storage Across all Web Front Ends Get-AzureVM -ServiceName $svc | Where { $_.Name -match 'wfe' } | foreach { $_ | Remove-AzureEndpoint -Name 'rdp' | Add-AzureDataDisk -CreateNew -DiskSizeInGB 10 -LUN 1 -DiskLabel 'newstorage' | Update-AzureVM }

Demo Automating Scale Up of a Web Role with Powershell

Get Started http://WindowsAzure.com

Q&A