Skip to content

Swapping Slots

shanice-skylight edited this page Aug 27, 2024 · 3 revisions

Quick refresher on how the API is deployed

Our deployments operate in a staged rollout. Each environment has a staging slot and an active slot. When a deployment action takes place, the following steps occur:

  • The CI/CD pipeline runs initial code and structure tests.
  • Terraform changes are applied to the environment.
  • The new version of the app service is deployed to the staging slot.
  • The staging slot is checked for health and stability.
  • When stable, the staging slot is swapped with the active slot. This means that the staging slot, with the new code, becomes the active slot and receives all traffic.

As a beneficial side effect of this procedure, the known-good production configuration remains active in the staging slot until another deployment is made. If a malfunctioning feature or some other code problem prevents proper application startup, the change can be quickly reverted by executing a manual slot swap.

Perform a slot swap

This process has been automated using our GitHub actions. To perform a slot swap, go to the workflow corresponding to the environment you're having issues with and click to run the workflow using the main branch. The slow swap job swaps the staging slot with the production slot and checks the environment's readiness.

This GitHub action resolves the following error message:

Screenshot 2024-08-27 at 14 45 17

If this job fails or you need additional information, consult Microsoft's official documentation.

Local development

Setup

How to

Development process and standards

Oncall

Technical resources

How-to guides

Environments/Azure

Misc

?

Clone this wiki locally