In this article we will learn to Clone Web Apps in Azure Portal.
Clone in Azure Portal feature allows you to copy the App you want to clone to a different region or keep it in the same region. When you clone, Azure will also clone all the App Settings, Connection strings, Deployment sources and Certificates so the new cloned app is more or less up and running.
Make sure the web apps are stopped after cloning otherwise it may create a conflict if you have a routable network from your primary region to secondary. You can put an Azure traffic manager to manage your network load.
Cloning could be done of existing Apps, be it Web App, Mobile App or API Apps in Azure App Services suit.
To clone App Service Environment, We are going to create other required components as follows:
- ASE (App Service Environment)
- Virtual Network (With External Virtual IP )
- Web App
- App Service Plan
We have used ASE-PROD resource group in North Europe as our primary region of ASE and ASE-DR resource group in West Europe as our secondary / DR region.
An ASE, BS-ASE-PROD, Web app name “BS-ASE-PROD-APP” would be deployed in North Europe and other ASE BS-ASE-DR Web app name “BS-ASE-DR-APP” would be cloned in West Europe.
- Login to Azure ARM portal and navigate to respective resource group, click add to add resources from market place and look for “App Service Environment”
2. Select App Service Environment v1 (this version is used in this tutorial).
3. Provide name of the App Service Environment, select resource group, select virtual network, provide its location, click ok and create.
4. After clicking create, the ASE isolated environment will start building which includes NSG, Routing table and V-Net.
5. App Service Environment build would be complete after deploying complete bundle, this whole process could take around two hours.
6. Go to deployed ASE, click on Add App in right blade.
7. You can see number of web apps, in this tutorial ASP.NET starter Web App is used.
8. Provide Web App Name, Resource group and create new App Service Plan.
9. Verify your Web App “BS-ASE-PROD-APP” is deployed.
10. To verify app is deployed and associated to ASE, go to ASE “BS-ASE-PROD” and then click Apps in its left blade.
11. Click on app “BS-ASE-PROD-APP” to see it’s URL and other related details.
12. Browse your Web App by clicking on its URL.
13. After verifying the Web App is functional let’s make some certain changes into Web App settings so these could be reflected into our cloned app and to do so in the left blade of Web App click on Application settings and make custom changes in it as shown in below image.
14. We have a pre-deployed ASE environment “BS-ASE-DR” in West Europe region for DR purposes.
15. We are cloning our primary app, so navigate back to “BS-ASE-PROD-APP” in North Europe region. In left blade options of Web App click on Clone app.
16. After clicking on clone app, you need to mention your cloned app name, resource group, App Service plan and location (In this case, ours is West Europe) and rest shown in given image.
17. You will have an option if you want certain settings shouldn’t be cloned.
18. Verify clone settings and click ok.
19. You should see a success for your cloned deployment in few minutes.
20. Navigate to ASE “BS-ASE-DR” and click Apps, you have a cloned app named “BS-ASE-DR-APP”
21. Verify the Web App overview after clicking into it.
22. Go to application settings of “BS-ASE-DR-APP” Web App and you can see that all custom settings made in primary “BS-ASE-PROD-APP” are cloned to “BS-ASE-DR-APP”
You have made a successful clone of your Web App primary to secondary / DR region.
Vikrant Duggal | Cloud Infrastructure Engineer.