Applying blue-green deployments on Azure
Now that we've looked at blue-green deployment, we'll look at how to apply it to an Azure infrastructure using two types of components—App Service slots and Azure Traffic Manager.
Let's start by looking at the most basic component—App Service slots.
Using App Service with slots
If we have an Azure subscription and want to use blue-green deployment without investing a lot of effort, we can use App Service slots (Azure Web Apps or Azure Functions).
In Azure App Services such as a Web App, we can create a second instance of our Web App by creating a slot for it (up to 20 slots, depending on the App Service plan). This slot is a secondary web app but is attached to our main web app.
In other words, the main web app represents the blue environment, and the slot represents the green environment.
To use this web app and its slot as a blue-green architecture, we will perform the following configuration...