Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Right way to create staging and Prod environment in Azure

We want to create two environments on Azure. These two environments will be used as Staging and Production, but we want to be able swap between them very easily, so staging can act like prod and vice versa. These two environments will contain Azure App services (Web App, API App and logic app).

What is the best practice to create these two environment? Do we need to have two subscriptions, or two resource groups? appreciate all kind of advice.

like image 630
user217648 Avatar asked Oct 17 '22 17:10

user217648


1 Answers

Well, in that case I believe you should use Slots for the WebApp as it is meant for that exact purpose.
So you create a WebApp and create staging slots, swap is virtually instantaneous, you can configure slots to get code from different branches, you can have slot settings and so on.

So you don't need another subscription or another resource group.

As for your additional question: there are SLOT specific settings, you assign them to SLOTS, not to version of your APP, so if you have a PROD SLOT connection string and STAGIN SLOT connection string, when you do a swap SLOT SETTINGS STAY IN THE SAME PLACE, its the APPS that are swapped. TL/DR: it does exactly what you want.

like image 111
4c74356b41 Avatar answered Oct 21 '22 00:10

4c74356b41