Windows Azure Training Kit – October 2012

The moment that you’ve all been waiting for has come, the October 2012 drop of the Windows Azure Training Kit has been released! This release is rather significant and I’ll get into the details in a few minutes, but first I wanted to call out the Windows Azure Training Kit page on WindowsAzure.com.

Special Thanks to the WindowsAzure.com team for updating the Windows Azure Training Kit page.

image

What’s new in this Release?

The October 2012 update of the Windows Azure Training Kit includes 47 hands-on labs, 24 demos and 38 presentations designed to help you learn how to build applications that use Windows Azure services. The October update includes updated hands-on labs to use the latest version of Visual Studio 2012 and Windows 8, new demos and presentations.

Presentations

We received a lot of requests to add speaker notes in the slide presentations. I’m happy to announce that we have included speaker notes necessary to support the majority of sessions in the Agendas which are outlined on the Agendas section. The following presentations have speaker notes to aid you in delivering a session:

Foundation

DevCamps

Localized Content

We have scene how excited the community was about mobile services, so we have created new GitHub organizations to host localized versions of the Mobile Services Presentation.

Hands-on Labs

September marked the launch of Visual Studio 2012 RTM. How do we ring in this celebration? We’ve converted a number of Hands-on Labs to support Visual Studio 2012. In addition to this, we wanted to ensure that you were properly supported for running community events, so we have ensured that the Hands-on Labs will work with Visual Studio 2012 Express Editions just incase you or your audience do not have a license.

Labs available for use with Visual Studio 2012

New Labs page Layout

As the number of labs has increased, we wanted to provide a nice simple way of discovering the provided hands-on labs. The page is divided now into VS2012, VS2010, Open Source, Scenario, and All [which is the classic layout with the ability to Navigate by Service.]

Windows Azure Training Kit Hands-on Labs

Demos

You may not have noticed in the August 2012 REFRESH but we shipped a few demos. You might not have noticed this because we didn’t have a navigation page for you to browse them, they were just sitting around on your hard drive if you were adventurous enough to check.

We’ve added a landing page now which will help you navigate and discover the demos which we have packaged for use with the presentations.

image

Available Demos

Contribute

GitHub - Codercat

One of the nicest things about the Windows Azure Training Kit is that it is open source and available on GitHub. This enables you in the community to Report Issues or Fork and either extend the solution or commit bug fixes back to the Training Kit.

You can find out more details about  the training kit from our GitHub Page including guidelines on how to commit back to the project.

Happy Clouding!

Windows Azure Cloud Service or Web Site: Where am I Deployed?

Recently, I came across someone trying to figure out where their code was deployed between Windows Azure Web Sites and Windows Azure Cloud Services. There are many things that you may want to wrap discovery code around between deploying to Cloud Services and Web Sites. One such example that comes to mind is use of LocalStorage in Cloud Services over writing directly to disk in Web Sites.

Non .NET Example with Environment Variables

In Non .NET Languages such as PHP or Node.js you may not have a standard configuration location or you may find the implementation of Environment  Variables more convenient. In a past article I outlined how to read App Settings from the App Settings section of the Windows Azure Management Portal, which explained that App Settings configured in such a way are exposed as Environment Variables.

Cloud Services also have a way to configure custom Environment Variables in the Service Definition (CSDEF) file which is packaged up with a Cloud Service Package (CSPKG). Considering both Cloud Services and Windows Azure Web Sites enable you to expose Environment Variables this is consistent way to share information in either deployment method.

Configuring Environment Variables in Web Sites Portal

Configuring Environment Variables in Cloud Services


Environment Variable in Action

PHP


Node.js


ASP.NET Example using Web.config

In ASP.NET there is the concept of a web.config file. This is an xml based file which is used for storing configuration settings which are specific to a deployment. It is easy to pivot on environment by providing transforms of the web.config file. Let’s assume we have 3 environments Local, WebSites and CloudService.

This will yield three configuration transforms which upon build will roll up to the base web.config:

  • web.local.config
  • web.websites.config
  • web.cloud.config

Creating an App Setting

An App Setting is a Key/Value pair configured in the <appsettings /> element within the web.config file.

Web.config

Application Configuration File

We’ll set this appsettings to a value appropriate for debugging.


Web.local.config

Configuration Transform

We will provide a replacement element for the appsettings for our local test environment.


Web.websites.config

Configuration Transform

We will provide a replacement element for the appsettings for Windows Azure Web Sites.


Web.cloud.config

Configuration Transform

We will provide a replacement element for the appsettings for a Windows Azure Cloud Service.


AppSetting in Action


Conclusion

Depending on your development language or your scenario [as the Environment Variable route would work for ASP.NET as well] you can quickly and easily setup a way to verify which Environment you are deployed to be it Local Test, Windows Azure Web Sites, Windows Azure Cloud Services or any other environment you may have.

Stay Cloudy my Friends…