Free trial *Internet Service Required

Staging an Application in Windows Azure

A packaged application can be deployed to the staging environment in Windows Azure to be tested before you move it to the production environment in which the application is accessible on the Internet. The staging environment is exactly like the production environment, except that you can only access the staged application with an obfuscated URL that is generated by Windows Azure. After you have verified that your application is working correctly, it can be deployed to the production environment by performing a Virtual IP (VIP) swap.

This task includes the following steps:

Step 1: Stage an Application by Using the Management Portal

This task covers how to stage an application by using the Windows Azure Management Portal. You can also Stage an Application with Visual Studio.

  1. Log on to the Windows Azure Management Portal.

  2. In the Management Portal, click New Hosted Service.

  3. In the Create a New Hosted Service dialog, fill in the required information and select Deploy to stage environment under Deployment options.

  4. Click OK to create the hosted service.

  5. After the hosted service is created and the deployment's status has been updated to Ready, click on the deployment and note the values in the Properties pane to the right. The DNS name is an obfuscated internal ID that Windows Azure generated. Also, the environment is set to Staging.

Now you can verify that the application is working correctly in the staging environment.

For an upgrade scenario, in which the staged application is an upgraded version of one that has already been deployed to production, you can upgrade the application in the production environment by swapping the VIPs.

Step 1 (Alternate): Stage an Application with Visual Studio

This task covers how to stage an application with Visual Studio. You can also Stage an Application with the Management Portal.

Note: This step requires Visual Studio 2010 and the Windows Azure SDK for .NET.

  1. Start Visual Studio 2010 and open a cloud project that's ready for deployment.

  2. In the Solution Explorer, right-click the name of your project, and click Publish. The Publish Windows Azure Application wizard appears.

  3. In the Windows Azure Publish Sign In page, select the named authentication credentials you want to use, and then click Next. For more information, see Setting Up Named Authentication Credentials.

  4. In Windows Azure Publish Settings, select hosted service in which to publish the application, and then in Environment, select Staging.

  5. Use the defaults for the rest of the settings and click Next.

  6. In Windows Azure Publish Summary, review the settings (make sure Environment is set to Staging), and then click Publish.

Visual Studio starts the publishing process of packaging the application and then deploying it to Windows Azure. After several minutes, the deployment is completed.

Now you can verify that the application is working correctly in the staging environment.

For an upgrade scenario, in which the staged application is an upgraded version of one that has already been deployed to production, you can upgrade the application in the production environment by swapping the VIPs.

Step 2: Upgrade an Application in Production by Swapping VIPs

After you have verified the upgraded version of an application in the staging environment, you can quickly make it available in production by swapping the virtual IPs (VIPs) of the staging and production environments.

Note: This step assumes that you have already deployed an application to production and staged the upgraded version of the application.

  1. Log into the Management Portal, click Hosted Services, Storage Accounts, & CDN, and click Hosted Services.

  2. Expand the hosted service that contains the deployment that you want to upgrade, and then click Swap VIP. This opens the Swap VIPs dialog.

  3. Review the information, and then click OK. The two deployments begin updating as the staging deployment switches to production and the production deployment switches to staging.

You have successfully staged a deployment and upgraded a production deployment by swapping VIPs with the deployment in staging.

Additional Resources

How to Deploy a Service Upgrade to Production by Swapping VIPs in Windows Azure

Overview of Managing Deployments in Windows Azure

Publishing Applications to Windows Azure from Visual Studio

rss feed newsletter