Thursday, October 8, 2020

Sitecore 10 Azure Deployment ARM Templates Hidden Option to Have Separat CM and Reporting WebApp Hosting Plans

Recently I was working on preparing ARM templates for Sitecore 10 Azure PaaS environment deployment.

One of the requirements client had was to have a separate Hosting Plans for CM web app and Reporting web app, which will allow the client to scale up/down the performance of CM & Reporting web apps separately.

So I took the Sitecore 10 ARM templates from GitHub repository (https://github.com/Sitecore/Sitecore-Azure-Quickstart-Templates)  and tried to deploy a "Small" size azure environment with Sitecore XP Scale ARM templates. 

Once the deployment went successful, I tried to verify the deployed environments with the requested environment topology. Everything was deployed correctly except for the CM & Reporting Web Apps shared a common single Hosting plan (i.e. CM Hosting Plan).

So I thought I will have to adjust the default Sitecore 10 ARM templates by adding new Hosting Plan configuration and then changed the Reporting Web App to use this newly added hosting plan. 

While I was trying to investigate on how to add this new hosting plan, I saw following configuration on Reporting Web app.



As you can see, there was actually an optional configuration by default in Sitecore 10 ARM templates, where we can tell the deployment to either use CM hosting plan OR a separate hosting plan for Reporting web app.

\Sitecore 10.0 XP ARM Template\nested\infrastructure.json 

....

"serverFarmId": "[if(parameters('useDedicatedHostingPlanForReporting')

          resourceId('Microsoft.Web/serverfarms', variables('repHostingPlanNameTidy')), 

          resourceId('Microsoft.Web/serverfarms', variables('cmHostingPlanNameTidy')))]",

.... 

 Also there was this "useDedicatedHostingPlanForReporting" parameter defined on "azuredeploy.json" file as boolean type.

"useDedicatedHostingPlanForReporting": {

"type": "bool",

"defaultValue": false

},

So what just had to do was, to provide value to that variable from my azuredeploy.parameters.json file.

"useDedicatedHostingPlanForReporting" : {

  "value": true

},

That was it. Just ran the deployment and now I have CM & Reporting web apps running on their own two separate hosting plans.


Happy Sitecore !!!

No comments:

Post a Comment