Friday, November 27, 2020

Edit and Update Sitecore Cloud WebDeployment Package using Sitecore Azure Toolkit

Sometimes you will need to adjust the default web deploy packages provided to add new functionality or adjust existing functionality. 


You cannot edit these WebDeploy packages by just extracting.


You have to use "Sitecore Azure Toolkit" PowerShell module to update these packages.


Below I have inserted a script that I used to update existing WebDeploy package with adjusted settings and files.


Most of the content in the internet describing this process is not complete and hard for a beginner to understand.

Following was the only blog post that explained the process that I got the basic idea on what needs to be done.

http://www.chrissulham.com/modify-sitecore-install-framework-packages-for-azure-sql/


Unfortunately that blog page seems not available at the moment. Archive of that blog post can be found from below url.


https://web.archive.org/web/20191102122827/http://www.chrissulham.com/modify-sitecore-install-framework-packages-for-azure-sql/


Preparing Files to Update WebDeploy Package

Following is the structure of my "Sitecore 10.0.0 rev. 004346 (Cloud)_cd.scwdp" folder where I have following files to replace in original WebDeploy package. You can add the changed or new files into "C:\Work\ARMTemplates\Sitecore 10.0 XP Packages\XP\Generated\Sitecore 10.0.0 rev. 004346 (Cloud)_cd.scwdp" folder.


Since I'm only adding a new connection string to ConnectionStrings.config file by capturing the parameters values returned from azure deployment, I only have following two files.


/CopyToRoot/parameters.xml

/CopyToWebsite/App_Config/ConnectionStrings.config





More info on how to organise folder structure inside the new package files can be read from https://doc.sitecore.com/developers/sat/20/sitecore-azure-toolkit/en/the-structure-of-an-sccpl-transformation.html


Import and Running Script

Step 1: Download Sitecore Azure Toolkit

Download and unzip latest "Sitecore Azure Toolkit" from Sitecore to "C:\Work\ARMTemplates\Sitecore Azure Toolkit 2.5.0-r02519.1061" folder.


Step 2: Run following script 

In this script I'm trying to update the default Sitecore 10 XP Cloud WebDeploy package with the changes I did to include some extra connection string to ConnectionString.config file.

Clear-Host


##Import Az Module

Import-Module -Name Az


# This is the location of the local repoitory and will need to be updated to refect the location of where this script # is being run from.

$basePath = "C:\Work\ARMTemplates"


## Configuration

$SCSdkPSM1 = "$basePath\Sitecore Azure Toolkit 2.5.0-r02519.1061\tools\Sitecore.Cloud.Cmdlets.psm1"

$SCSdkDLL = "$basePath\Sitecore Azure Toolkit 2.5.0-r02519.1061\tools\Sitecore.Cloud.Cmdlets.dll"



## Initialize/import the modules

Import-Module $SCSdkPSM1 -Verbose

Import-Module $SCSdkDLL -Verbose



## Payload package generation

New-SCCargoPayload -Path 'C:\Work\ARMTemplates\Sitecore 10.0 XP Packages\XP\Generated\Sitecore 10.0.0 rev. 004346 (Cloud)_cd.scwdp' -Destination 'C:\Work\ARMTemplates\Sitecore 10.0 XP Packages\XP\Generated' -Verbose -Force



## Update WDP package generation

Update-SCWebDeployPackage -CargoPayloadPath 'C:\Work\ARMTemplates\Sitecore 10.0 XP Packages\XP\Generated\Sitecore 10.0.0 rev. 004346 (Cloud)_cd.scwdp.sccpl' -Path 'C:\Work\ARMTemplates\Sitecore 10.0 XP Packages\GeneratingNewWDPPackages\Generated\Sitecore 10.0.0 rev. 004346 (Cloud)_cd.scwdp.zip'



New-SCCargoPayload command will create .sccpl payload package

Update-SCWebDeployPackage command will update the scwdp.zip WebDeploy package



Following is the final results after running the above script

Sitecore 10.0.0 rev. 004346 (Cloud)_cd.scwdp folder             - New/Edited files

Sitecore 10.0.0 rev. 004346 (Cloud)_cd.scwdp.sccpl folder   - Payload package created from New-SCCargoPayload command

Sitecore 10.0.0 rev. 004346 (Cloud)_cd.scwdp.zip folder       - Final WebDeploy package created from Update-SCWebDeployPackage command




Extra Information:

https://www.credera.com/blog/technology-solutions/how-to-deploy-sitecore-to-azure-part-1-environment-setup/
https://doc.sitecore.com/developers/sat/20/sitecore-azure-toolkit/en/web-deploy-packages-for-a-module.html
https://blog.baslijten.com/sitecore-on-azure-create-custom-web-deploy-packages-using-the-sitecore-azure-toolkit/


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 !!!

Thursday, February 13, 2020

For the 5th Consecutive Year, scFootsteps' Chaturanga Ranatunga Wins Sitecore Most Valuable Professional Award 2020

scFootsteps' Chaturanga Ranatunga Wins Sitecore Most Valuable Professional Award
Elite distinction awarded for commitment and dedication to the Sitecore community





Colombo, Sri Lanka — February, 04, 2020 — scFootsteps' Chaturanga Ranatunga, today announced that Chaturanga, Independent Sitecore Consultant has been named a Most Valuable Professional (MVP) in the Technology category for the 5th consecutive year by Sitecore®, the global leader in digital experience management software. Chaturanga Ranatunga was one of only 154 Technology MVPs worldwide to be named a Sitecore MVP this yearnot to mention the only person from Sri Lanka to be named a Sitecore MVP 2020.

Recognizing professionals within the Sitecore community who actively apply their talent and expertise to help others best utilize Sitecore products to deliver premier customer experiences, the MVP program is now in its 14th year. Of more than 13,000 certified developers and over 24,000 active community participants, the 316 MVPs are truly an elite group. This year’s MVPs were selected for the quality, quantity and impact of the contributions they made in 2019, including the sharing of product expertise and mastery of the Sitecore platform to support both partners and customers. 

As a Sitecore Freelance Consultant with more than 10 years of Sitecore development experience and overall 12 years in the software industry, I've thoroughly enjoyed sharing my expertise of Sitecore products, including on this blog and through the other community channels. (scFootsteps - Chaturanga Ranatunga)

 “One of our greatest assets is the highly collaborative Sitecore community, where members share technical knowledge and insights across numerous channels and at events to help each other build greater digital experiences for their organizations and customers,” said Pieter Brinkman, Senior Director of Technical Marketing at Sitecore. “Sitecore MVPs stand out as leaders within the community for their passion and willingness to invest their own time with contributions ranging from educational blogs, videos, podcasts and speaking engagements to community engagement and support on social media and forums. They are an invaluable resource and important part of the Sitecore user experience, for which we are truly grateful.”

“Sitecore MVPs are always at the top of the list to get access to the latest developments and offerings from Sitecore, and we will rely on them heavily when we introduce the new Software as a Service offering later this year. I am looking forward to working on this together with this incredible group.” added Brinkman.

Sitecore’s SaaS offering will make it much easier and faster to build digital experiences, while maintaining the flexibility for Sitecore partners and customers to create differentiated experiences. Once a user is on Sitecore’s SaaS platform, they will always have the most current version of the product with the ease of automatic upgrades.

More information can be found about the MVP Program on the Sitecore MVP site: http://mvp.sitecore.com.