In our previous articles, we created Azure Cloud Service with multiple roles in it.

Login to your Azure Subscription and navigate to Cloud Services, as shown below.

Login

Clicking the “Cloud Services” will take you to the page, given below, where all your existing Cloud services are displayed.

Cloud Services
Click “HelloWorldCS” Cloud Service. We will be taken to Cloud Service – Overview blade, as shown below.

HelloWorldCS

Navigate to the site URL by clicking on the link, available in the site URL field.

site url
As per the above screenshot, I added a text “(Production Slot)” to better explain the rest of the article.

By default, the overview blade displays the details of the Production slot. Let’s assume the client has requested some changes and we would like to test the changes before we make them live. Azure Cloud Service provides two slots (1) Production and (2) Staging.

You can follow the same process to create the package and upload the same to the Staging Slot. Only thing you need to do is to change the slot by clicking the arrow mark, located besides the “Production Slot” link, as shown below-

Production Slot

Clicking this arrow mark will open up a dropdown, which also lists the “Staging” slot, as shown below.

Staging

Selecting the “Staging” link will display the corresponding details, as shown below.

Staging

Let’s deploy the new changes to the staging slot before uploading them to the Production Slot. For the sake of simplicity, I just updated the text to “Hello Cloud World!!! (Staging Slot)”, as shown below-

code

Let’s package it again and deploy the same to the Staging Slot. You can find more details on how to create and deploy the package to any of the slots in the following articles.

  • Azure Cloud Service – Create Package, using Visual Studio.
  • Azure Cloud Service – Deploy Cloud Service, using Azure Management Portal.

As per the screenshot, given below, the updated package has been uploaded to the Staging Slot.

Staging Slot

The URL of the staging slot will be http://<<guid>>/cloudapp.net. I navigate to the new slot by clicking on the link and the output of the changes, as shown below.

URL
Please note, now you have two slots with all the roles installed in both the slots, it means you will be charged 2x. (Of course, you can scale down the instances of the Staging Slot to reduce the cost).

In this article, we learned how to create Staging Slot in Azure Cloud Service. I hope you enjoyed reading the article. Your feedback is appreciated.