Hello Readers and Viewers!
By now, you have likely seen Brad Anderson’s Blog Post (VMware Migration… Like You’ve Never Seen) and its associated video, starring Building Cloud Blog’s very own Migration Mark! And sure, I have a cameo, but let’s be honest, that movie is all about The Migrator and the amazing MAT (powered by Project Shift).
So why do I bring it up? Well, at the 04:03 timestamp, I bravely profess, “Extending your migration to Windows Azure is easy. It’s like 5 more lines of PowerShell…(elevator music while sped up demo plays)…actually, it’s like magic.”
And while it may not be EXACTLY like magic, it is possible. That is what this blog series is all about.
First, a message from its predecessor
I do want to pause briefly to call-out that this is not the first time we have seen this kind of fancy-chocolate-rainbow-filled-magic in the wild. No, it was first introduced (at least by me, I am sure others have talked about it too) here on the Building Clouds Blog back in February 2013: Automation–Orchestrating Windows Azure–Solving the Public Cloud Puzzle with System Center 2012 SP1.
Back then it was rolled up as part of my “Orchestrating Windows Azure” example solution. It was the third use case in that solution, and demonstrated at the 11:48 timestamp of the associated video: Demo of OnPrem VM Move to Windows Azure via System Center 2012 SP1 Orchestrator and PS.
This portion of the existing solution executed the PowerShell necessary to upload a VHD to Windows Azure and then deploy a VM based on that uploaded VHD into an existing Windows Azure environment (Affinity Group, Cloud Service, Storage Resources, etc.). This Windows Azure environment was pre-created as part of the first portion of the existing solution (demonstrated in that same video at the 00:58 timestamp: Demo of Windows Azure VM Deployment Creation via System Center 2012 SP1 Orchestrator), and built using System Center Orchestrator’s Integration Pack for Windows Azure.
End history lesson.
Hybrid Clouds with Windows Azure – Automated
What I have for you in this blog series is a little different. The examples here are 100% PowerShell, no System Center Orchestrator or Integration Packs required. I did this for two reasons:
- To offer something new, different and more foundational – leveraging out-of-the-box Windows Server functionality (Windows PowerShell) with easily accessible Command line tools (Windows Azure PowerShell)
- To provide a simple transition for this use case, from Orchestrator to Service Management Automation (Part 2 of this blog series is all about PowerShell Workflow)
What’s being automated?
The examples provided include the following High Level Concepts:
- Creation of a new Public Cloud Environment (Affinity Group, Cloud Service, Storage Resources, etc.), leveraging an existing Subscription to Windows Azure
- Copying a VHD from an “On-Prem” Windows Server to that new Public Cloud Environment in Windows Azure
- Creation of a VM Image from that uploaded VHD, and then creation of a VM based on that VM Image
- Deprovisioning of all Provisioned Public Cloud Environment resources
Note Obviously, there are other methods and concepts to be automated for Windows Azure – these are just the ones I chose for the examples in this blog series.
High Level Concept Commands
Public Cloud Environment Provisioning
- Establish Windows Azure Subscription Connection
- Create Windows Azure Affinity Group
- Create Windows Azure Cloud Service
- Create Windows Azure Storage Account
- Create Windows Azure Storage Container
- Upload “On-Prem” VHD to Windows Azure Storage Container
- Copy Windows Azure Blob
- Create Windows Azure VM Image
- Create Windows Azure VM
Note Remember, this is a “ground up” (or “On-Prem” up – RDRR) example solution. It assumes no (and does not require) other (related) Affinity Groups, Cloud Services, Storage Resources, etc. before creation.
Public Cloud Environment Deprovisioning
- Remove Windows Azure VM
- Remove Windows Azure VM Image
- Remove Windows Azure VM Disk(s)
- Remove Windows Azure Storage Account (and Storage Account Resources)
- Remove Windows Azure Storage Blob(s)
- Remove Windows Azure Storage Container(s)
- Remove Windows Azure Cloud Service
- Remove Windows Azure Affinity Group
Automating Hybrid Clouds with Windows Azure and PowerShell – Blog Series – Table of Contents
I broke this “Automating Windows Azure” topic up into four posts – primarily to make it easier to reference externally (based on varied interest levels).
- Automation–Automating Hybrid Clouds with Windows Azure and PowerShell (Part 1): Introduction and Table of Contents
- Automation–Automating Hybrid Clouds with Windows Azure and PowerShell (Part 2): Public Cloud Environment Provisioning PowerShell Examples
- Automation–Automating Hybrid Clouds with Windows Azure and PowerShell (Part 3): Public Cloud Environment Provisioning PowerShell Workflow Examples
- Automation–Automating Hybrid Clouds with Windows Azure and PowerShell (Part 4): Public Cloud Environment Deprovisioning PowerShell Examples
As promised, the following is the link to the TechNet Contribution and Download for the examples (from all parts of the blog series).
TechNet Contribution and Download
The download (Hybrid Cloud Automation Toolkit – Windows Azure and PowerShell.zip) includes the following (4) files:
Thanks for checking out this blog series! For more information, tips/tricks, and example solutions for Automation within System Center, Windows Azure Pack, Windows Azure, etc., be sure to check out the other blog posts from Building Clouds in the Automation Track!