Windows Azure - SWAP VIP of Azure Application From Staging to Production And Vice Versa

Introduction:

In this article we are going to see how to swap a deployed Azure Application from Staging to Production and Vice Versa using the Windows Azure Management Portal.

Overview:

Swapping a service deployed from one environment to another (traditionally from Stage to Production) is much easier with Windows Azure Management Portal using a few button clicks. With any application we first deploy it to the staging and then check for the real time scenarios (test) and then move the final version to production. After a regular patch is required to do some enhancements to the application, which requires a downtime for the application to do a manual deployment which requires time based on the application and network connectivity as well.

Using SWAP Virtual IP Address (VIP) in Azure this became much easier by upgrading the environments without downtime, like swapping the Application from Staging to Production after complete testing of the application in the Staging environment. This way the application is available online and does not require a downtime during the swap as well which is time-saving and easier to manipulate as well. 
So what exactly happens when we do a SWAP VIP in Azure? The steps are as follows:
  1. Normally Swap VIP is done between Production and Staging environments.
  2. The VIP will be assigned as Production VIP to Staging VIP and Staging VIP to Production VIP. Inside the VIP swap, we may have the following changes as well possibly based on the application like:
  • Changes in VM Size.
  • Changes in Trust Level of the application
  • Changes in the Certificate issued.

Finally VIP will be swapped without any downtime to the application.
Some of the limitations of the VIP SWAP is normally if the number of endpoints for the web role is changed between the environments. Let us see step by step how to do a SWAP VIP of an application from Staging to Production using the Windows Azure Management Portal. 

Steps:

Login to the Management Portal using the following link:

http://www.microsoft.com/windowsazure/
We will see a screen like below. Select the "Sign into Management Portal" at the top right corner:

image90.png

After selecting "Sign into Management Portal" you will be asked for the Username and Password to authenticate the process as shown in the following screen:

110.png

After providing the correct credentials and clicking on the submit button it will navigate to the main screen of the portal as shown in the following screen:

120.png

Now click on the Hosted Services, Storage Account and CDN option in the bottom menu and then select the Hosted Services as shown in the screen below.

130.png

Now select the deployed application (f5Debug, f5DebugTest in respective environments) as shown in the screen below. Here we will see the options like the environment on which its deployed and the DNS name to access the application etc.

2011-07-12 07h40_47

Now to do the SWAP, first we need to select the Staging environment application and we will see a Ribbon Menu Button at the top "Swap VIP" as highlighted in the screen below.

2011-07-12 07h44_42
Clicking on the SWAP VIP button will pop up a window summarizing the environment where the Virtual IP (VIP) will be swapped as shown in the screen below. Click the OK button to proceed.

2011-07-12 07h45_50

Clicking on the OK button will start the process of Swapping the VIP's and we will see the progress as highlighted in the screen below.

2011-07-12 07h46_30
Now we will see the status as Updating which indicates the swapping is in progress as shown in the screen below.

2011-07-12 07h46_58

After the process completes we will see the environments are swapped but still the DNS Name and other things remain the same which indicates on the environment is swapped from stage to production and other components points the same.

2011-07-12 07h48_12

Conclusion:

So in this article we have seen how to do a Swapping of environments with the SWAP VIP option available in Windows Azure Management Portal.