Deploying Your Applications on Windows Azure

windows-azure-logo-lgWriting an application is one thing. Your application has been designed, built, and tested. Yet deploying the application can be an adventure in its own right. Successful ISVs build and deploy often, sometimes continuously. And then run tests to be sure the application functions as expected and runs at as expected at scale.

Windows Azure provides proven methods for moving your application from the developer, into a testing environment in the cloud, and then switching it live for your users.

You are able to provision the required components in the Windows Azure Management Portal, upload the service package, and configuring the service. You test your application in a staging environment and then promote it to production once you are satisfied that it is operating according to your expectations.

After you have set up your Windows Azure account, each step along the way can be done:

  • Done from within Azure portal itself
  • Automated by PowerShell scripts
  • Within familiar tools, such as Visual Studio.
  • Within your application using the Hosted Service REST API.
  • Command line tooling in the Windows Azure SDK for Node.js
  • Through third party tools such as Cloud9, an online environment for development of JavaScript and HTML5 applications

Each of these helps you package (zip) your application and upload it to Windows Azure along with some XML configuration files. The configuration information is used by Azure to figure out how many role instances to provision for each role, determines what OS version and components to put on each role instance, installs your uploaded code on each role instance, and boots them.

So within a few minutes after uploading the files, Windows Azure provisions your role instances and your application is up and running.

Once your role instances (that is, VMs running your application code) are up and running, Windows Azure constantly monitors them to ensure high availability of your applications. If one of your application processes terminates due to an unhandled exception, Windows Azure automatically restarts your application process on the role instance. If the hardware that is running your role instance experiences a failure, Windows Azure detects this, automatically provisions a new role instance, and boots it on other hardware, again ensuring high availability for your application.

You can get a good overview at Deploying and Updating Windows Azure Applications.

Learning How to Deploy Your Applications

A great place to get started is with a lab in the Windows Azure Training Developer Kit entitled, Deploying Applications in Windows Azure. In this hands-on lab, you learn how to:

  • Use the Windows Azure Management Portal to create storage accounts and hosted service components
  • Deploy service component packages using the Windows Azure Management Portal user interface
  • Change configuration settings for a deployed application
  • Test deployments in a separate staging environment before deployment to final production
  • Use Windows PowerShell to deploy, upgrade, and configure Windows Azure services programmatically
  • Use the Windows Azure Tools for service deployment from Visual Studio
  • Secure your Windows Azure application with SSL

Automatically Maintaining Your Application

You may want to increase or decrease the number of role instances that your application is using within your program. For example, you may want to increase the number of Web roles whenever the number of concurrent users exceeds some threshold. You can also reduce the number of instances when the users falls. This is done using the Windows Azure Service Management API.

You can use the API to check errors, maintain certificates, define the data centers where your application is hosted, and more.

Traffic Manager

In addition you can use the APIs with Windows Azure Traffic Manager.

Windows Azure Traffic Manager enables you to manage and distribute incoming traffic to your Windows Azure hosted services whether they are deployed in the same data center or in different centers across the world. In this hands-on lab, you will explore different load balancing policies available in Traffic Manager and how you can use them to enhance performance, increase availability, and balance traffic to your hosted services.

Updating Your Application

Anytime you want to update your application  — for example, to fix a bug or add a small feature — you can create a new CSPKG file containing the new code and upload it to Windows Azure via the Windows Azure Management Portal or by calling the Upgrade Deployment REST API. You can alternatively deploy your application directly from Windows Azure tooling, such as the Visual Studio tooling in the Windows Azure SDK for .NET or the command line tooling in the Windows Azure SDK for Node.js.

Staging Your Application

One of the great features in Windows Azure is to stage your application, try it and test it online, and then move it into your production site.

You deploy your application in the same way, but instead of putting it directly in service, you can send it into a staging instance.

Windows Azure deploys your new application to a new set of role instances and Windows Azure assign a globally unique identifier (GUID) as a special DNS prefix when an application is deployed to the staging environment. The new version of your application is now up and running in your desired data center and accessible for you to test at

Your production application is still running. When it is time, you can swap the two versions. Windows Azure puts your storage version into production by performing what is called a Virtual IP (VIP) Swap. This causes Windows Azure to reprogram the load balancer so that it now directs client traffic sent to to the instances running the new version of your code.

And should things not go as planned, the older version is still ready. You can swap them back if you need.

Learn More

You can learn more about getting started see Windows Azure Developer Center.

You can try out the features described here for free. See Windows Azure 3 Month free trial.

The Windows Azure Training Course includes a comprehensive set of hands-on labs and videos that are designed to help you quickly learn how to use Windows Azure services and SQL Azure.


Bruce D. KyleISV Architect Evangelist | Microsoft Corporation