Clone your existing Web App using Azure portal

Clone your existing Web App using Azure portal

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.

  1. 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”

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/1-1-1024×496.jpg

2.   Select App Service Environment v1 (this version is used in this tutorial).

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/2-1024×495.jpg

3.   Provide name of the App Service Environment, select resource group, select virtual network, provide its location, click ok and create.

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/3-1024×499.jpg

4.   After clicking create, the ASE isolated environment will start building which includes NSG, Routing table and V-Net.

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/4-1024×500.jpg

5.  App Service Environment build would be complete after deploying complete bundle, this whole process could take around two hours.

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/5-1024×500.jpg

6.   Go to deployed ASE, click on Add App in right blade.

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/6-1024×589.jpg

7.   You can see number of web apps, in this tutorial ASP.NET starter Web App is used.

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/7-1024×595.jpg

8.   Provide Web App Name, Resource group and create new App Service Plan.

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/8-1024×495.jpg

9.   Verify your Web App “BS-ASE-PROD-APP” is deployed.

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/9-1024×514.jpghttps://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/10-1024×509.jpg

10.   To verify app is deployed and associated to ASE, go to ASE “BS-ASE-PROD” and then click Apps in its left blade.

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/11-1024×506.jpg

11.   Click on app “BS-ASE-PROD-APP” to see it’s URL and other related details.

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/12-1024×508.jpg

12.   Browse your Web App by clicking on its URL.

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/13-1-1024×482.jpg

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.

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/15-1024×508.jpghttps://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/16-1024×514.jpg

14.   We have a pre-deployed ASE environment “BS-ASE-DR” in West Europe region for DR purposes.

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/17-1024×509.jpg

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.

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/18-1024×506.jpg

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.

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/19-1024×495.jpg

17.   You will have an option if you want certain settings shouldn’t be cloned.

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/20-1024×509.jpg

18.   Verify clone settings and click ok.

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/21-1024×505.jpg

19.   You should see a success for your cloned deployment in few minutes.

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/23-1024×517.jpg

20. Navigate to ASE “BS-ASE-DR” and click Apps, you have a cloned app named “BS-ASE-DR-APP”

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/24-1024×502.jpg

21. Verify the Web App overview after clicking into it.

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/25-1024×493.jpg

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”

https://secureservercdn.net/192.169.223.13/l5j.f95.myftpupload.com/wp-content/uploads/2018/05/26-1024×495.jpg

You have made a successful clone of your Web App primary to secondary / DR region.

Thank You,

Vikrant Duggal | Cloud Infrastructure Engineer.

BrainScale Inc.

Vikrant.duggal@brainscale.com

Share this post

Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on pinterest
Share on print
Share on email

Leave A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.