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 (GUID-based) 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:

 

Stage using Management PortalStep 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, click Compute, click Cloud service, and then click Custom create.

    cloud service dialog

  3. Specify the URL, Region/Affinity Group, and Subscription to use for the cloud service. Ensure that Deploy a cloud service package now is checked and click Next.

    custom create cloud service

  4. In the Publish your cloud service dialog, fill in the required information and for Environment select Staging. (If any of your roles contain a single instance, ensure Deploy even if one or more roles contain a single instance is checked.) Click Complete to create the cloud service.

    publish cloud service

  5. After the cloud service is created and the staging status has been updated to Running, select the Dashboard and then select Staging.

    cloud service dashboard

  6. Note the value in the Site URL entry on the right. The DNS name is an obfuscated GUID-based name generated by Windows Azure.

    site url

Click the value listed for 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.

 

Stage with Visual StudioStep 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 2012 and the Windows Azure SDK for .NET.

  1. Start Visual Studio 2012 and open a cloud project that is 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 dialog, 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 the cloud service in which to publish the application, and then for 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, ensure 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.

 

Deploy by swapping VIPsStep 2: Deploy an application to 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 cloud 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 Yes. 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 ResourcesAdditional Resources

Rss Newsletter