Walkthrough: Upgrading SFCRM on Docker


How to upgrade the Sitecore Connect for Salesforce CRM connector from 6.0 to 7.0 on Docker

This section explains how to upgrade from Sitecore Connect for Salesforce CRM (SFCRM) 6.0 to SFCRM 7.0 on a container platform.


You must upgrade your SXP installation to 10.2 and your SFCRM installation to 7.0 at the same time.

Before you perform the upgrade for SFCRM container to version 7.0, you must have the following:

  • Sitecore Experience Platform (SXP) 10.1 deployed on Docker

  • SFCRM 6.0 deployed on Docker

  • An up to date back up of the current mssql database

This walkthrough describes how to:

  • Build new docker images for SXP 10.2 and SFCRM 7.0.

  • Build an mssql-upgrade image.

  • Perform the upgrade.

To build the SXP 10.2 and SFCRM 7.0 Docker images:

  1. Download the Sitecore Experience Platform container deployment 10.2 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, SFCRM7.

  2. Download the SFCRM container deployment 7.0 package from the Sitecore download page. Extract it to your local workstation with the folder structure intact. Copy the files in the sfcrm\compose\<windows version>\<topology> folder and paste them into the \compose\<windows version>\<topology> folder in the SXP 10.2 deployment structure.

  3. Navigate to your Sitecore 10.1 container deployment folder. Copy the databases from the mssql-data folder and paste them in the Sitecore 10.2 container deployment mssql-data folder.

  4. To deploy Sitecore 10.2, open a PowerShell window with administrator rights, navigate to the SC 10.2 Container deployment folder, and run the following commands:

    docker-compose build
    docker-compose up
  5. Verify that Sitecore Container 10.2 is up and running successfully.

You use a custom mssql-upgrade image to upgrade a Sitecore solution that has SFCRM 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:

  1. From the Resource files for Modules 1.0.0 section on the Sitecore download page, download the SFCRM Connect Upgrade resources 1.0.0 package. Extract it to a folder on your local machine.

  2. From the upgrade resources, copy the Salesforce CRM Connect Upgrade resources 1.0.0\6.0.0\Data folder and paste it into the upgrade folder for the Windows version and topology you are using, for example, ltsc2019\upgrade\xp1.

  3. In the Salesforce CRM Upgrade resources 1.0.0\6.0.0 folder, create a docker file and name it Dockerfile. In the file, add instructions to point its base image to the 10.2 mssql-upgrade image. The completed file looks, for example, like this:

    ARG BASE_IMAGE= ${SITECORE_DOCKER_REGISTRY} /sxp/sitecore-xp1-mssql-upgrade : tag
    SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
    # Add SFCRM module
    COPY <Data folder local path> "C:\data\ResourceItems\10.1\modules"


    In 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 6.0.0\Data folder in the folder you created in Step 1.

  4. To build the mssql-upgrade image, open a PowerShell window, navigate to the folder where you placed the Dockerfile, and run the following command:

    docker build . -t "<imageName>:<available port number>”
  5. Verify that Docker has created an image with the name you specified.

To perform the upgrade:

  1. On your local machine, in a PowerShell window, navigate to the Sitecore Container Deployment 10.2 folder. Navigate to the upgrade folder for the Windows version and topology you are using, for example, ltsc2019\upgrade\xp1.

  2. 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.


    For 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.

  3. In the docker-compose.upgrade.yml file, update the image setting with the mssql-upgrade image you created previously.

  4. Open a new PowerShell window with administrator rights. Navigate to the upgrade directory.

  5. To perform the upgrade, run this command:

    docker-compose.exe -f .\docker-compose.upgrade.yml --env-file .\upgrade.env up
  6. To check the status of the upgrade, run this command:

    docker-compose.exe -f .\docker-compose.upgrade.yml --env-file .\upgrade.env ps
  7. 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:

    docker-compose.exe -f .\docker-compose.upgrade.yml --env-file .\upgrade.env down