TechEd 2012 Highlights: Git deploy for Azure

This will be the first in a few quick hits about TechEd 2012.  It’s been about a month and a half and I think I’ve finally settled on a few things that have stuck with me.

First off is Windows Azure.  I used to be totally unimpressed and uninspired with this platform.  It seemed like you had to code against some very Azure – specific things (e.g., Azure Service Bus, its key-value storage mechanism, etc) to gain some elasticity and scalability.

Now they’ve really expanded their offering, allowing full VM instances to be deployed and scaled in the cloud, virtual network segments, and Git deployment (on top of their previously existing hosted services, and many other features).  In this post, I’ll just touch briefly on the Git deployment piece.

Git is a distributed version control system that developed out of the disparate nature of Linux development.  I’ve grown to love its speed, ability to work disconnected, branching model, and some other little things about it (e.g., .gitignore files instead of svn:ignore attributes).  I hear it is somewhat magical with its merging capabilities, though that’s not something I’ve experienced quite yet.

Building a website with Azure and Git is kind of scarily easy.  Here’s all you have to do:
  1. Use the new Preview Portal to “Quick Create a website”
    Azure Quick Create
  2. This will spin up a new site instance with some default Azure content in it.  On the management view for that website, you’ll find a git URL.  This is where your source repository is hosted!  It will be something likehttps://%5Byourusername%5D@%5Byourwebsitename%5D.scm.azurewebsites.net/.git
    Planning Poker
  3. Use Git to “clone” this repository locally.
  4. Start adding / committing files for your awesome website to your local repository
  5. When you’re ready, use the “git push origin” command to get your changes back up to Azure.  This will automatically trigger a build / deployment to your hosting area.
    Git Deploy Active
  6. Sit back, have a drink, marvel at teh futures

Also, if you’re looking for a super-easy way to get rolling with Git on Windows, I can’t recommend GitHub for Windows enough.  Very clean / cool looking, super easy installation and updates, and pre-configures Git with several methods of interaction (Metro UI, bash command line, PowerShell with posh-git).