Walkthrough: Upgrading DCRM on Kubernetes
This topic explains how you upgrade DCRM Container in AKS from version 6.0 to 7.0.
Before you perform the upgrade for Container DCRM Container 6.0 to DCRM 7.0, you must have a Sitecore AKS 10.1 deployment with DCRM 6.0 and an up to date backup of the 10.1 database.
This walkhthrough describes how to:
-
Build and push the mssql-upgrade image
-
Perform upgrade
Build and push the mssql-upgrade image
To upgrade DCRM you must build an mssql-upgrade image.
To build and push the mssql-upgrade image:
-
Build the images for DCRM as explained in the Build the mssql-upgrade image section in Walkthrough: Upgrading DCRM on Docker.
-
In a PowerShell window, navigate to the folder containing the Dockerfile and build and tag the image. For example:
RequestResponseshelldocker build . -t sitecore-dcrm-xp1-cm:<imageVersionTag> $registry/sitecore-dcrm-xp1-cm:<newTag>
-
Check that Docker has created the image.
-
Push the created image to your Azure registry. For example:
RequestResponseshelldocker push $registry/sitecore-dcrm-xp1-cm:<newTag>
Perform upgrade
To upgrade to DCRM 7.0 on Sitecore 10.2:
-
Download and extract Sitecore 10.2 Sitecore Container Deployment Package from the Sitecore download page. Extract it to your local workstation with the folder structure intact.
-
Navigate to the upgrade folder for the Windows version and topology you are using, for example,
k8s\ltsc2019\upgrade\xp1
. In thekustomization.yaml
file, update the images section withnewName
andnewTag
of the custom mssql-upgrade image you created and pushed previously. -
In the
configuration
folder, update the secrets files. For more information on the secrets files, see the Installation Guide for Production Environment with Kubernetes available on the Sitecore download page. -
Download the DCRM container deployment 7.0 package from the Sitecore download page. Extract it to your local workstation with the folder structure intact. Copy the
dcrm\k8s\<windows version>\overrides
folder and paste it into the\k8s\<windows version>\
folder in the SXP 10.2 deployment structure. -
In the
secrets
folder in the SXP 10.2 structure, for example,k8s\ltsc2019\overrides\xp1\secrets
, update these secrets files:-
sitecore-data-exchange-staging.txt
-
sitecore-dcrm.txt
-
-
Log in to the Azure CLI and set a subscription.
RequestResponseshellaz login az account set --subscription "Your Subscription"
-
Get the credentials for the Kubernetes cluster that was created with the AKS cluster.
RequestResponseshellzaks get-credentials --resource-group <10.1 resource group>--name <10.1 cluster>
-
To deploy the Sitecore upgrade job, go to the folder where the updated files are, for example
k8s\ltsc2019\upgrade\xp1
, and run this command:RequestResponseshellkubectl apply -k .\
-
To check if the job has completed, run this command:
RequestResponseshellkubectl get pod
-
When the upgrade process is completed, you can delete the Kubernetes upgrade job and upgrade secrets. In the console, go to the upgrade folder from step 2, and run these commands:
RequestResponseshellkubectl delete -f .\ kubectl delete -k .\
Upgrading with a custom mssql-image includes cleaning up DCRM items from the database since DCRM 7.0 has moved to using resources files. This requires rebuilding and upgrading the Sitecore role instances cm, xconnect and xdbsearchworker.
For detailed instructions on how to build and deploy the Sitecore role instances, see the Sitecore Upgrade Container Deployment Guide on the Sitecore download page.