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
This task covers how to stage an application by using the Windows Azure PowerShell for Node.js.
-
When publishing a service, simply pass the -Slot parameter to the Publish-AzureService cmdlet.
Publish-AzureService -Slot staging
-
Log on to the Windows Azure Management Portal. 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 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.
-
Log into the Management Portal, click Hosted Services, Storage Accounts, & CDN, and click Hosted Services.
-
Expand the hosted service that contains the deployment that you want to upgrade, and then click Swap VIP. This opens the Swap VIPs dialog.

-
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