How to set up an alternate environment for an Azure app?

mitya33 1 Reputation point
2022-04-25T22:03:06.097+00:00

Hi everyone,

I'm new to Azure so this is probably going to be a very basic quesiton for someone, but how can I make a new environment (e.g. staging) for an existing app?

We have a live app (app service) but our main branch has several commits that we want to push to a test environment for testing and then push to live.

I've inherited this project. So far they've just been hoping for the best and then pushing to production and testing there!

I couldn't see anything under the app to add environments to it. Can anyone point me in the right direction?

Thanks in advance!

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,327 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Alan Kinane 16,811 Reputation points MVP
    2022-04-26T09:20:00.673+00:00

    Have you looked into using the deployment slots feature of Azure App Service? This will allow you to set up separate environments for staging and you can push your code updates directly to these slots instead of straight to production.

    https://learn.microsoft.com/en-us/azure/app-service/deploy-staging-slots

    0 comments No comments

  2. VenkateshDodda-MSFT 19,641 Reputation points Microsoft Employee
    2022-04-26T09:39:09.243+00:00

    @mitya33 , Thanks for reaching out. By default, when you create a web app in azure you will get created with one deployment slot ( Production). Using add deployment slot feature under deployment slot option in the portal you can create a another slot for staging/testing of your application. In order to create a new deployment your web app should be in either standard, premium or isolated app service plans. While create the new deployment slot you can clone the setting of that production slot to the new stating slot that you are going to create as shown below.

    196562-webapp1.png

    Once all the testing is done you can perform slot swap to keep your tested application which is in stagging slot to production slot. you can use either swap direct, swap with preview to move your stagging slot to production or production to stagging vice versa as explained here and also during the slot swap only you can swap only some of the application settings (like connection strings,app settings,certificate handler etc.,)from production to stagging slots.

    Feel Free to reach back to me if you have any further questions.

    0 comments No comments