DevOps Basics: Swapping Azure Website Deployment Slots


After successfully creating a an Azure Website deployment slot, one will notice that it contains no content.  This is to allow deployment from a different repository branch, or a different repository all together. The configuration of said slot can also be changed and publish profile or deployment credentials associated with the deployment slot can be used for content updates.

The newly created deployment slot can also be cloned making the cloned deployment slot’s configuration editable. The following attributes can be altered:

  • General Settings
  • Connection Strings
  • Handler Mappings
  • Monitoring and Diagnostic Settings
     

The following attributes cannot be altered:

  • Publishing Endpoints
  • Custom Domain Names
  • SSL Certificated and Bindings
  • Scale Settings
     

It is of note that multiple deployment slots are only made possible in the Standard web hosting plan.

Swapping Azure Website Deployment slots can be implemented via these few steps:
 

  1. Navigate to the Azure Management Portal
     
  2. Navigate to Web Apps
     

    Azure_Websites_Deployment_Slots_001
     
  3. Select the desired website
     
  4. In the Web Apps screen click the Swap button located in the command bar at the bottom of the screen
     
    Azure_Websites_Deployment_Slots_Swap_001
     
  5. In the SWAP DEPLOYEMENTS screen, select the SOURCE and DESTINATION desired and click the checkmark to complete the swap.
     
    Azure_Websites_Deployment_Slots_Swap_002
     

One can reverse the slots back to their pre-swap state should there be an error identified by simply swapping the two sites again immediately.

Comments (0)

Skip to main content