Moving your existing Sitecore 8.2 solution to Azure


This is with the assumption that, you need to move your existing Sitecore 8.2 solution over to Azure in the quickest way and 

(a) You have an Azure subscription

(b) Your azure admin has already created a Resource Group

(c) Your Sitecore SQL databases were already setup on Azure SQL by your admin and you have the Azure SQL login and password.

(d) Your Sitecore solution server is simple single server configuration with CMS and WEB on the same server.

So once you have these, like everyone else I started with getting my Sitecore solution ready to be packaged (https://doc.sitecore.net/cloud/working_with_sitecore_azure/configuring_sitecore_azure/package_a_sitecore_solution_for_the_azure_app_service) and deployed (https://doc.sitecore.net/cloud/working_with_sitecore_azure/configuring_sitecore_azure/deploy_a_new_sitecore_environment_to_azure_app_service) to Azure. These pages give a very detailed picture of what is involved in a step-by-step approach. But I hit many breakpoints while following these. While I was able to proceed with creating the packages after many hiccups, when trying to deploy the package I realized that the command (https://doc.sitecore.net/cloud/working_with_sitecore_azure/configuring_sitecore_azure/deploy_a_new_sitecore_environment_to_azure_app_service) actually tries to create a new Resource group altogether. Of course this is not what I wanted. My target was simply to push my existing Sitecore (Sitecore Experience Platform 8.2 rev. 161115) solution as a “Webapp” over to existing Azure Resource Group using already migrated Sitecore SQL database in Azure SQL.

 

After undergoing some more research, this is when I decided to go for a manual approach. Following is what I did and had a successful working implementation.

 

1- Login to your Azure portal

 

2- Select the Resource Group already created

 

3- click on the azure sql database

(a) click on properties and note the server name (See figure "AzureSql" below).

Figure “AzureSql”

 

(b) keep handy the sql server admin user login and password (Your azure admin must have passed these to you)

               

4- In your Sitecore solution, you should modify the “connectionstrings.config” file replacing the login/password and db server name noted from above. Your new “connectionstrings.config” file is now ready.

               

5- Go to your “resource group” and add a "webapp".

 

6- Select the “webapp” just created

(a) Note down the site url ([azure site url]) and FTP hostname from the overview (See figure "SitecoreWebApp1" below).

 

Figure “SitecoreWebApp1”

 

(b) Click on "Application Settings" and modify the server configuration as needed. Make sure you select “4.6” for ”.NET Framework version”, platform as 64-bit, managed pipeline as “integrated” etc. Save the settings.

 

(c) Under "Application Settings", you add the physical path to your sitecore application in "Virtual applications and directories". Leave the root as "/" and the path as "site\wwwroot\[your site name]\Website". Note that this folder [your site name] is something you would have to create in step (e) below.

(d) Click on "Deployment Credentials" and enter the ftp user name and desired password. Keep this handy for later use.

 

(e) To know the exact physical location of your newly created "web app" on the server you can click on "Console". This will be useful to configure any physical paths for say the Sitecore Data folder (DataFolder.config) etc. See figure "SitecoreWebAppPhysicalLocation" below. Create the folder [your site name] using mkdir, under wwwroot.

 

Figure “SitecoreWebAppPhysicalLocation”

 

(f) Open your Sitecore solution's “datafolder.config” (or wherever you define Sitecore Data folder location) and modify the datafolder’s physical path as noted above.

 

(g) Open your Sitecore solution's “sitedefinition.config” (or wherever you define your Sites), and update the "hostname" to the site url [6(a)] as needed.

 

7- You are now ready to move your Sitecore solution's "website" folder to “webapp” location on azure

 

(a) Connect through an FTP client like say "filezilla", to the FTP server [6(a)] using the ftp credentials as noted in step [6(c)].

(b) once connected, on the FTP server expand site/wwwroot and then can create your desired Sitecore site folder (as you did for your current site on your local server).

(c) copy your Sitecore solution's "website" folder and subitems from your box to the folder created at step above. Please be aware that this would be a time consuming process.

(d) copy the Sitecore solution's "Data" folder and subitems from your box to the folder created at step 7(b) above. Before copying you should clean the "logs", "packages" folder etc. and any other files that is not needed for the site to function. This way then the copying of files would be faster.

(e) Once copied, the remote site folder structure should now look like "site/wwwroot/[sitecore site name]/website".

8- you should now be able to browse to you new site (http://[azure site url]/sitecore and http://[azure site url]).
Categories:

SEARCH ARTICLES