Walkthrough: Upgrading DCRM on Docker
This topic explains how to upgrade from Sitecore Connect for Microsoft Dynamics 365 for Sales (DCRM) 7.0 to DCRM 8.0 on a container platform.
You must upgrade your SXP installation to 10.3 and your DCRM installation to 8.0 at the same time.
Before you perform the upgrade for DCRM container to version 8.0, you must have the following:
-
Sitecore Experience Platform (SXP) 10.8 deployed on Docker
-
DCRM 7.0 deployed on Docker
-
An up-to-date back up of the current DCRM 7.0 container files
This walkthrough describes how to:
-
Build new docker images for SXP 10.3 and DCRM 8.0.
-
Build an mssql-upgrade image
-
Perform the upgrade
Build new Docker images
To build the SXP 10.3 and DCRM 8.0 Docker images:
-
Download the SXP container deployment 10.3 package from the Sitecore download page. Extract it to a new folder on your local workstation with the folder structure intact. Name the new folder, for example,
DCRM8. -
Download the DCRM container deployment 8.0 package from the Sitecore download page. Extract it to your local workstation with the folder structure intact. Copy the files in the
dcrm\compose\<windows version>\<topology>folder and paste them into the\compose\<windows version>\<topology>folder in the SXP 10.3 deployment structure. -
Navigate to your Sitecore 10.2 container deployment folder. Copy the databases from the
mssql-datafolder and paste them in the Sitecore 10.3 container deploymentmssql-datafolder. -
To deploy Sitecore 10.3, open a PowerShell window with administrator rights, navigate to the SC 10.3 Container deployment folder, and run the following commands:
RequestResponsedocker-compose build docker-compose up -
Verify that Sitecore Container 10.3 is up and running successfully.
Build the mssql-upgrade image
You use a custom mssql-upgrade image to upgrade a Sitecore solution that has DCRM installed. To build a custom mssql-upgrade image, you must download the latest Sitecore XP mssql-upgrade image from the container registry and create a custom Dockerfile on top of it.
To build the mssql-upgrade image:
-
From the Resource files for Modules 1.0.0 section on the Sitecore download page, download the Dynamics CRM Connect Upgrade resources 1.0.0 package. Extract it to a folder on your local machine.
-
From the upgrade resources, copy the
Dynamics CRM Connect Upgrade resources 1.0.0\7.0.0\Datafolder and paste it into the upgrade folder for the Windows version and topology you are using, for example,ltsc2019\upgrade\xp1. -
In the
DCRM Connect Upgrade resources 1.0.0\7.0.0folder, create a docker file and name itDockerfile. In the file, add instructions to point its base image to the 10.2 mssql-upgrade image. The file will look, for example, like this:RequestResponseARG BASE_IMAGE= ${SITECORE_DOCKER_REGISTRY} /sxp/sitecore-xp1-mssql-upgrade : tag FROM ${BASE_IMAGE} SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] # Add ? DCRM? module COPY <Data folder local path> "C:\data\ResourceItems\10.2\modules"NoteIn the Dockerfile, ensure that ARG BASE_IMAGE parameter points to the mssql-upgrade image, and that the Data folder local path is set to the 7.0.0\Data folder in the folder you created in step 1.
-
To build the mssql-upgrade image, open a PowerShell window, navigate to the folder where you placed the Dockerfile, and run the following command:
RequestResponsedocker build . -t "<imageName>:<available port number>” -
Verify that Docker has created an image with the name you specified.
Perform upgrade
To perform the upgrade:
-
On your local machine, in a PowerShell window, navigate to the Sitecore Container Deployment 10.3 folder. Navigate to the upgrade folder for the Windows version and topology you are using, for example,
ltsc2019\upgrade\xp1. -
In the topology folder, run the
compose-init.ps1 script. This script updates the environment configuration file with the appropriate values for all the environment variables including the SQL username, SQL password, SQL Server address, and the Sitecore license file.NoteFor more information about running the script to prepare for the deployment, see the Installation Guide for Developer Workstation with Containers on the Sitecore download page.
-
In the upgrade folder, verify that the
upgrade.envfile has the correct details. For more details, see the Upgrade Container Deployment Guide for SXP 10.3.0. -
In the
docker-compose.upgrade.ymlfile, update theimagesetting with the mssql-upgrade image you created previously. -
Open a new PowerShell window with administrator rights. Navigate to the upgrade directory.
-
Verify that the mssql container is up and running.
-
To start the upgrade, run this command:
RequestResponsedocker-compose.exe -f .\docker-compose.upgrade.yml --env-file .\upgrade.env up -
To check the status of the upgrade, run this command:
RequestResponsedocker-compose.exe -f .\docker-compose.upgrade.yml --env-file .\upgrade.env ps -
When the upgrade process is completed, you can clean up your environment.
If you ran the upgrade container in Docker Compose, from the Docker Compose folder for the topology that you upgraded, for example,
sitecore-xp1, run the following PowerShell cmdlet:RequestResponsedocker-compose.exe -f .\docker-compose.upgrade.yml --env-file .\upgrade.env down