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.

Note

The steps in this article only apply to node applications hosted as a Windows Azure Cloud Service.

This task includes the following steps:

Step 1: Stage an Application

This task covers how to stage an application by using the Windows Azure PowerShell.

  1. When publishing a service, simply pass the -Slot parameter to the Publish-AzureServiceProject cmdlet.

    Publish-AzureServiceProject -Slot staging

  2. Log on to the Windows Azure Management Portal and select Cloud Services. After the cloud service is created and the Staging column status has been updated to Running, click on the service name.

    portal displaying a running service

  3. Select the Dashboard, and then select Staging.

    cloud service dashboard

  4. Note the value in the Site URL entry to the right. The DNS name is an obfuscated internal ID that Windows Azure generated.

    site url

Now you can verify that the application is working correctly in the staging environment by using the staging site URL.

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 Windows Azure Management Portal, click Cloud Services and then select the service name.

  2. From the Dashboard, select Staging, and then click Swap at the bottom of the page. This opens the VIP Swap dialog.

    vip swap 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

Rss Newsletter