If you're reading this Harmless Havoc has successfully been transferred to Windows Azure.  I've been running my own blog and email servers since I've had a blog, and I have posts that date back to 1999.  That's a pretty impressive run given that my "servers" are just standard computers and my "internet backbone" is a DSL connection with a single static IP address.  You can do a lot with that.

Everything runs mostly in automatic.  In fact, I never have to touch the servers at all unless I have a hardware failure.  Still, running things from my home introduces some complexity.  I maintain three subnets and I have to route ports through three network address translation layers and two firewalls.

While everything is automatic, the added complexity means that any change to it involves a lot of work.  Recently I was having trouble with the stability of consumer-grade routers so I upgraded to Cisco business-grade equipment.  It took about three days of installation and troubleshooting to get everything working correctly again (and I still have problems getting my phone to reliably connect to my printer and my Sonos).

Another change is coming.  Soon we will move out for a while to do some construction on the house.  The thought of moving the servers and getting Centruylink to reconnect them without screwing it up was daunting.  I knew there would be a bunch of downtime.  For a personal blog, it's not such a big deal.  But I'm also hosting my personal email as well as Squirrel of Shame's web site.  You don't want a Big Deal band site like that to be offline.

To solve this, I had to look at moving our email addresses as well as moving our server.  Our server is actually a virtual server so technically I should be able to copy it to the cloud and run it.  Unfortunately, that's a pretty pricy way to go and the server VHD is a 76GB file so even getting it to the cloud poses some problems.

It turns out there was an easier way, but I had to do a bunch of research.

Moving Email

Gmail supports hosting your own domain names for email.  Unfortunately Google's termination of support for the Exchange ActiveSync protocol means I don't get good synchronization across all my devices.  It turns out that Outlook.com supports hosting your own domains too, and it's pretty easy to setup.  The only issue I have is that I can't create email aliases for custom domains, so I had to create several accounts and have them forward.  If you want to set this up for yourself, just go to domains.live.com and add your domain.

Moving Servers

This was a little trickier.  I have ten web sites running out of my house for me and several friends.  Hosting all ten externally was out of the question:  it would cost too much.  Only three of these web sites are really actively maintained, however, so I wanted to focus on them first.  Luckily they all run blogengine.net, which is an excellent blog engine.  Unluckily they are running different versions of blogengine.  Even more unluckily is I had to make some modifications to the version of blogengine I use to run HarmlessHavoc and PocketSilicon, so upgrading to the latest version is not trivial.

The latest version of blogengine.net has a nice feature:  you can run multiple blogs out of one site.  If I could only unify to a single version of blogengine.net, I would only have to pay to host one blog instead of three.  That's worth the effort.

It took me about two days of solid coding to get my existing extensions to all work with the new version of the blog software.  This included updating the blog themes to match changes in the engine and finding all the places in the old engine I had customized. 

Next was to find a hosting provider.  I looked at several options but I wanted to try Azure if possible.  As a Microsoft employee I get a MSDN subscription as part of my benefits, and that subscription comes with an Azure subscription.  The question was if I could get Azure to do what I wanted for a price that was right.  Azure sure makes it easy to try.  First, blogengine.net is a pre-canned option in Azure -- just create a web site and you're ready to go. Unfortunately, it's an older version of the blog software.  Also, I would not be able to customize it the way I had.  Luckily this is really easy to solve:  just create an empty web site and copy the blog software to it. This worked great and I had an empty blog up and running in no time.

My next hurdle was storage.  My blog has a lot of photos:  the file system for the blog is a little over 2GB.  But Azure's web site hosting (which is still in preview) restricts to 1GB of storage.  I solved this by writing a little C# program that walked through all the images on the site to compress, resize and strip unnecessary metadata from them.  It worked out really well -- when I was done the entire site was about 450MB and I don't see any difference in the quality of the images.

So far it's worked out pretty well.  I only have one outstanding issue that is beyond my control to fix and it has to do with how Azure charges for bandwidth.  Uploads are free and downloads cost against your subscription plan.  That's fine, but what stinks about it is when you synchronize the site down through WebMatrix it does a full copy of the site...which is 450MB and is far over the amount of download bandwidth I was allocated.  One sync to get the site locally and the site was shut down for being over its capacity.  I needed to upgrade to a bigger plan anyway to get custom domain support, but this forced my hand and gives me something to watch out for in the future. I'd much prefer it if administrative work on the site was not charged against your bandwidth allocation.

The Azure team has done a pretty good job of supporting web sites on their cloud platform.  This really was as easy as deploying via FTP and I can't imagine what kinds of cloud storage shenanigans they're pulling under the covers to make this look so simple.  I am looking forward to seeing how this plays out.