Azure deployment slots auto swap
In this video we will discuss how to auto swap deployment slots in azure.
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.
How to configure auto swap
- In the azure portal navigate to your App Service
- Click on
Deployment slots. We want to configure auto swap from staging to production slot.
- Navigate to the source slot, in our case staging slot.
- Click on
- Scroll down and look for
Auto swap enabledand select
- Select your target slot from the dropdownlist. In our case it is production.
- Don't forget to save the changes.
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.
© 2020 Pragimtech. All Rights Reserved.