Azure deployment slots auto swap

In this video we will discuss how to auto swap deployment slots in azure.

azure app service auto swap

Auto swap allows us to deploy our app continuously with zero downtime. When auto swap is configured, for example, from staging to production deployment slot, everytime we push code in to staging slot, it is automatically swapped into the production slot without any manual intervention and that too after it is warmed up in the source slot. This means we are able to deploy with zero downtime.

azure web app auto swap

How to configure auto swap

  1. In the azure portal navigate to your App Service
  2. Click on Deployment slots. We want to configure auto swap from staging to production slot.
  3. Navigate to the source slot, in our case staging slot.
  4. Click onConfiguration and then General settings.
  5. Scroll down and look for Auto swap enabled and select On radio button.
  6. Select your target slot from the dropdownlist. In our case it is production.
  7. Don't forget to save the changes.

azure deployment slots auto swap

With auto swap configured, everytime we push code in to the source slot (in our case staging slot), it is automatically swapped into the target slot (in our case production slot). It is a good practice to test auto swap on a non-production target slot, before we configure it for the production slot.

Azure tutorial for beginners

© 2020 Pragimtech. All Rights Reserved.