Using deployment slots in Azure is very useful when it comes to production deployments. You can deploy to a deployment slot and then verify and swap the slot with production.
It is deployed with Visual Studio Team Services, Release Management using a linked Azure Resource Management Service endpoint.
Azure Resource Manager command “Invoke-AzureRmResourceAction” can be used in PowerShell to swap the slot.
Script requires following parameters.
-resourceGroupName "ch-demo-resgroup" -websiteName "Demo-Swap" -slotName "Deploy" -targetSlotName "Production"
- resourceGroupName – Resource Group Name of the Web App
- websiteName – Web App Name
- slotName – Slot Name
- targetSlotName – target Slot
After swap “Deploy” slot contains what was in “Production” slot and “Production” slot now has the newly deployed site.