This post briefly details the tools and techniques I use when creating an Azure solution. They focus around the core Azure technologies rather than third party add-ons and typically are lessons learned that help ease deployment management.

Use Web Deploy for iterative Web Role updates

With Version 1.4 of the Azure SDK came the ability to use “Web Deploy” with Azure Web Roles. This allows the very rapid update of single instance code bases, and where it is possible to use is by far the fastest way to update code running on an Azure Web Role.

Described in more detail here http://blog.bareweb.eu/2011/04/using-web-deploy-in-azure-sdk-1-4-1/, the Web Deploy technique is invaluable in shaving off huge quantities of time that would otherwise be spent starting up brand new instances.

Update your Configuration changes rather than redeploying … and …

Upgrade running roles rather than deleting and recreating them.

These two tips are very similar, but important. When you want to make a configuration change, there’s no need to redeploy your whole project! The Windows Azure portal gives you the ability to make configuration changes to ServiceConfiguration.cscfg. You can then use the RoleEnvironment.Changed event in order to have your instances detect this change, and make any appropriate change to their function.

When you want to make a code change, you can either destroy your old instances or upgrade them. There are different reasons for doing either during development, but it is significantly more simple and SPEEDY to use the Upgrade route rather than stopping, deleting and recreating manually.

For more information, this is an excellent read: http://blog.toddysm.com/2010/06/update-upgrade-and-vip-swap-for-windows-azure-servicewhat-are-the-differences.html  

Use Intellitrace to debug issues

When errors occur within roles, whether they fail to run or experience difficulty whilst running, it is important to know about Intellitrace. The caveat to this is that this tool is not available on all versions of Visual Studio, but if you do have it it is one of the most powerful tools available to you.

More details here: http://blogs.msdn.com/b/jnak/archive/2010/06/07/using-intellitrace-to-debug-windows-azure-cloud-services.aspx

Use Remote Desktop to get access to your instances

This one speaks for itself – one of the most standard powerful ways of managing remote environments on the Windows platform is now available in Azure. You should enable this at all times during development – its usefulness in diagnosing issues in production is unsurpassed. http://msdn.microsoft.com/en-us/library/gg443832.aspx

When using Startup Tasks, follow @smarx!

Startup tasks are some of the more powerful ways of getting an Azure role to be just how you want it before it begins to run your code. You can install software, tweak settings and other such details. The problem (if you can call it such) with them is that since they are running in the cloud, before you have your main software running, any failure with them can prove catastrophic with little chance of a UI to report the issues.

I don’t think I can summarise it better than following the recommendation of Steve Marx, as described here: http://blog.smarx.com/posts/windows-azure-startup-tasks-tips-tricks-and-gotchas

Use Windows Azure Bootstrapper

Available at http://bootstrap.codeplex.com/ is a tool that allows you to automatically pull down dependencies as your project is starting up and run them. This can be incredibly useful for tracing, logging and other reasons. I recommend you check it out.

I will be updating these as I find more ways of improving the deployment lifecycle.

Thanks

Andy