Walkthrough: Preparing to install the SCCH connector module in a container environment
To prepare for adding the Sitecore Connect for Content Hub (SCCH) connector to your installation, regardless of whether you are deploying to Docker or Azure Kubernetes service, follow the steps in this walkthrough.
This walkthrough describes how to:
-
Prepare the installation files
-
Build the Docker images
Prepare the installation files
To prepare the files required for the installation:
-
Download the SCCH container deployment package from the Sitecore download page. Extract it to your local workstation with the folder structure intact.
-
Download the Sitecore Experience Platform container deployment 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,
SCCH. -
In the folder where you extracted the SCCH package in Step 1, navigate to the folder for the Windows version and topology you are using, for example,
SCCH\compose\ltsc2019\xp1. Copy thedocker-compose.override.ymlfile to theSCCH\compose\<version>\<topology>folder you created in Step 2. -
In the
SCCHfolder, navigate to the folder for your Windows version and topology you are using, for example,compose\ltsc2019\xp1. Open the.envfile in a text editor. At the bottom of the file, add a definition for the SCCH image. For example:RequestResponseSCCH_IMAGE= scr.sitecore.com/sxp/modules/sitecore-chub-assets:5.2.0-<target-OS-to-deploy> -
In the folder where you extracted the SCCH package, open the
.env-examplefile in a text editor, and copy all the contents. -
At the bottom of the
.envfile from Step 4, after the SCCH image data, paste in the contents from the.env-examplefile. Save the.envfile.
Build the Docker images
When you have prepared the installation files, you must create Docker files for each role and build the Docker images.
For more information on image assets, see the documentation on how to Add Sitecore ModulesAdd Sitecore Modules.
To build the images:
-
In the
SCCHfolder, navigate to the folder for your Windows version and topology you are using, for example,compose\ltsc2019\xp1. Create a subfolder and name itmodule. -
In the
modulefolder, create the following subfolders:-
cm -
cdNoteYou only have to create the
cdsubfolder if you are deploying to an XP1 or XM1 topology. -
mssqlNoteYou only have to create the
mssqlsubfolder if you are deploying to Sitecore 10.1.3 on Docker. -
mssql-initNoteYou only have to create the
mssql-initsubfolder if you are deploying to Sitecore 10.1.3 on Kubernetes.
-
-
In each subfolder, create a new file and name it
Dockerfile. -
In the
cmfolder, in theDockerfilefile, enter the following instructions:RequestResponse# escape=` ARG BASE_IMAGE ARG SCCH_IMAGE ARG TOOL_IMAGE FROM ${SCCH_IMAGE} as scch FROM ${TOOL_IMAGE} as tooling FROM ${BASE_IMAGE} SHELL [“powershell”, “-Command”, “$ErrorActionPreference = ‘Stop’; $ProgressPreference = ‘SilentlyContinue’;”] WORKDIR C:\inetpub\wwwroot # Add SCCH module COPY --from=scch \module\cm\content .\ # Add tools from sitecore-docker-tools-assets COPY --from=tooling \tools\ C:\tools\ # Apply SCCH transformation files RUN C:\tools\scripts\Invoke-XdtTransform.ps1 -Path C:\inetpub\wwwroot -XdtPath \inetpub\wwwroot\App_Data\Transforms\scch\xdts -
If you are deploying an XP1 or XM1 topology, in the
cdfolder, in theDockerfilefile, enter the following instructions:RequestResponse# escape=` ARG BASE_IMAGE ARG SCCH_IMAGE ARG TOOL_IMAGE FROM ${SCCH_IMAGE} as scch FROM ${TOOL_IMAGE} as tooling FROM ${BASE_IMAGE} SHELL [“powershell”, “-Command”, “$ErrorActionPreference = ‘Stop’; $ProgressPreference = ‘SilentlyContinue’;”] WORKDIR C:\inetpub\wwwroot # Add SCCH module COPY --from=scch \module\cm\content .\ # Copy SCCH transformation files COPY --from=scch \module\transforms\ C:\transforms\ # Add tools from sitecore-docker-tools-assets COPY --from=tooling \tools\ C:\tools\ # Apply SCCH transformation files RUN C:\tools\scripts\Invoke-XdtTransform.ps1 -Path C:\inetpub\wwwroot -XdtPath \inetpub\wwwroot\App_Data\Transforms\scch\xdts RUN C:\tools\scripts\Invoke-XdtTransform.ps1 -Path C:\inetpub\wwwroot -XdtPath \transforms\cd -
If you are deploying to Sitecore 10.1.3 in Docker, in the
mssqlfolder, in theDockerfilefile, enter the following instructions:RequestResponse# escape=` ARG BASE_IMAGE ARG SCCH_IMAGE FROM ${SCCH_IMAGE} as scch FROM ${BASE_IMAGE} SHELL [“powershell”, “-Command”, “$ErrorActionPreference = ‘Stop’; $ProgressPreference = ‘SilentlyContinue’;”] # Copy SCCH dacpac files COPY --from=scch C:\module\db C:\resources\scch_data # Copy SCCH tool files COPY --from=scch C:\module\tools\ C:\scch\ # Deploy SCCH dacpac files RUN C:\scch\Set-DbContainmentLevel.ps1 -moduleDacpacSource C:\resources\scch_data -isContainer $true; ` Remove-Item -Path C:\scch -Recurse -Force; ` C:\DeployDatabases.ps1 -ResourcesDirectory C:\resources\scch_data; ` Remove-Item -Path C:\resources\scch_data -Recurse -Force; -
If you are deploying to Sitecore 10.1.3 in Kubernetes, in the
mssql-initfolder, in theDockerfilefile, enter the following instructions:RequestResponse# escape=` ARG BASE_IMAGE ARG SCCH_IMAGE FROM ${SCCH_IMAGE} as scch FROM ${BASE_IMAGE} SHELL [“powershell”, “-Command”, “$ErrorActionPreference = ‘Stop’; $ProgressPreference = ‘SilentlyContinue’;”] # Copy SCCH dacpac files COPY --from=scch C:\module\db C:\resources\scch_data # Copy SCCH tool files COPY --from=scch C:\module\tools\ C:\scch\ # Prepare SCCH dacpac files RUN C:\scch\Set-DbContainmentLevel.ps1 -moduleDacpacSource C:\resources\scch_data -isContainer $true; ` Remove-Item -Path C:\scch -Recurse -Force;# escape=` ARG BASE_IMAGE ARG DCRMCNN_IMAGE FROM ${DCRMCNN _IMAGE} as dcrm FROM ${BASE_IMAGE} SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] # Deploy DCRM Staging database file COPY --from=dcrm C:\module\db C:\resources\dcrm -
Navigate to the
SCCH\compose\<version>\<topology>folder. Open thedocker-compose.override.ymlfile for edit, and add the following instructions for thecmimage:RequestResponsecm: image: sitecore-chub-${TOPOLOGY}-cm:${SITECORE_VERSION} build: context: ./module/cm args: BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-${TOPOLOGY}-cm:${SITECORE_VERSION} SCCH_IMAGE: ${SCCH_IMAGE} TOOL_IMAGE: ${TOOL_IMAGE} -
If you are deploying to an XP1 or XM1 topology, add these instructions for the
cdimage:RequestResponsecd: image: sitecore-chub-${TOPOLOGY}-cd:${SITECORE_VERSION} build: context: ./module/cd args: BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-${TOPOLOGY}-cd:${SITECORE_VERSION} SCCH_IMAGE: ${SCCH_IMAGE} TOOL_IMAGE: ${TOOL_IMAGE} -
If you are deploying to Sitecore 10.1.3 in Docker, add these instructions for the
mssqlimage:RequestResponsemssql: image: sitecore-chub-${TOPOLOGY}-mssql:${SITECORE_VERSION} build: context: ./module/mssql args: BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-${TOPOLOGY}-mssql:${SITECORE_VERSION} SCCH_IMAGE: ${SCCH_IMAGE} -
If you are deploying to Sitecore 10.1.3 in Kubernetes, add these instructions for the
mssql-initimage:RequestResponsemssql-init: image: sitecore-chub-${TOPOLOGY}-mssql-init:${SITECORE_VERSION} build: context: ./module/mssql-init args: BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-${TOPOLOGY}-mssql-init:${SITECORE_VERSION} SCCH_IMAGE: ${SCCH_IMAGE} -
In the Windows console, go to the
SCCH\compose\<version>\<topology>folder where thedocker-compose.override.ymlfile is. Run the following command:RequestResponsedocker-compose build -
If you are deploying to Docker, continue with the instructions in Add the SCCH connector module to Sitecore in Docker.
If you are deploying to Kubernetes, continue with the instructions in Walkthrough: Adding the SCCH connector module to Sitecore in Azure Kubernetes Service.
Some modifications to Sitecore deployments, such as adding connection strings or changing the web configuration files, require you to use configuration transforms to change the configuration files. For information on how to apply configuration transforms, see the Sitecore container development documentationcontainer development documentation.