Azure App Service Introduction Series – Deployment Slots

Deployment slots are a feature of Azure App Services, and can be used with Web Apps, API Apps, and Mobile Apps. Whatever your application type is (i.e. web application, web api, or a mobile app backend), Deployment Slots allow you to set up environments other than that of the production environment (like the one we setup implicitly in the previous article). This means you can for example setup a test environment and a staging environment; something which you traditionally have done in on premise development.

Go again to the Azure portal and create a staging deployment slot as follows. Here I create a slot with name staging, which will automatically create a web app under the name [originalwebappname]-staging; in my case myblogwebapp-staging:

1

Once done, you will have your staging slot ready:

2

Now go to VS and do any change on your web application; I did the following impressive change:

3

Now deploy the web application to the staging slot – as we did before using the Publish wizard. Only this time you will see the slot we created within Azure portal:

4

Upon deployment completion, you will have a brand new Web App holding your staging web application:

5

Finally, you can swap the staging and production Web Apps using the portal:

6

Once you do you will notice that the versions have flipped. Note though that behind the scenes Swap doesn’t really move files from one place to another, what it actually does is swapping the VIPs assigned to the slots. This makes swapping a very fast process. This also means that if for whatever reason we find a production problem, we can swap back to the previous version as Azure again just swaps back the VIPs.

Finally, although I said it before but it’s important to stress this: a deployment slot is just another Web App, meaning that it falls under the pricing model.

Next

In the next article, I’m going to talk about API Apps.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s