From the Developer & Evangelism Labs: Introduction to Windows Azure
This post is a summary of the notes I took while working through the Introduction to Windows Azure lab in the January 2011 Platform Training Kit. I ran into a couple of road bumps and bruises along the way and thought I’d share.
The Platform Training Kit – The download for the kit
The sample is a guestbook that lets you write your name, a message and post a photo. A background service resizes the photo and the thumbnail is linked to the full size image.
The lab walks you through setting up the relevant bits of the application locally, then walks you through deploying the application to the cloud. I found it to be a good balance of hand-holding and explanation, but you may find many questions left unanswered. The Microsoft Platform Evangelism team has certainly lowered the bar for folks to get in over their head! Thankfully, there are 26 other labs to help quench your thirst.
When you get it up and running, here’s what the end product looks like:
Well… that’s what it looks like if you post a picture of the snow on my roof with a name of MisterJames!
Snags, Detours and Road Bumps
Documentation Gap
Following the lab from the first step and trying to use the project through all of the exercises has its pitfalls. First of all if you make a mistake, that carries through the whole way. Secondly, when preparing for and throughout exercise 3 (deployment) there isn’t much clarity around the implications of misnaming your hosted service or storage account. There are also rules around naming (they have to be DNS suitable names) but this isn’t clear through the docs. Worse, the error you get when you make an account naming mistake is not very leading: One of the request inputs is out of range. I was getting this error when making a call to CreateTablesFromModel
, and nothing really pointed me back to the name.
You can, however, opt to jump in with the files provided for the lab. At each step of the exercise, the team has provided us with an updated, accurate solution to continue from.
This is good, as in step 3 it assumes you’re using that and doesn’t give clear instructions on the updates required in the service configuration file. The nodes and values required are in the provided solution.
Error Loop on Deployment
After I completed the lab, I started playing around with config files and some simple changes to the app. In that process, I managed to botch a deployment package (the configuration bits). Unfortunately, I didn’t realize that until I had already deployed the package as an upgrade to the first version, the instances were stuck in some updating/starting/waiting/resetting cycle that took over 40 minutes to work itself out. The result was an error state, which until reaching I was unable to stop and update the service.
A Missing Warning
I just want to add another voice to the mix here: remember to stop and delete your project as you don’t want to be incurring charges or burning up valuable compute cycles.
Time Expectations
This is a lab that is scheduled to take approximately 60 minutes. In addition to the coding bits, I took two phone calls, answered a few IMs and emails and was wrapped up on the code/deployment side of things inside 55 minutes. I did muscle through it pretty quickly, though, as I’ve done several of these labs and know the style.
If you aren’t patterned to recognizing the parts you should and shouldn’t need to read, this lab could take up to 75 minutes to complete. One other note: I already had my Azure account up and running, so I was able to skip that part of the task.
After plugging through the juicy bits, I then had to wait for the succession of updates, host starts, role starts and what not. This easily pushed me over the allotted 60 minutes.
For all of these services to finish their progression to their final states took about 20 minutes, at which point we end up here:
Conclusion
Set aside a two-hour slice of time and you should be able to move casually through the lab, start to finish. The Introduction to Windows Azure does a great job of touching on many of the concepts you’ll be working with when you get into cloud development. You will be left with questions around deployment and configuration, but this start is good exposure and the walkthrough doesn’t leave out any important steps.
Don’t forget to delete the services created in the lab!