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.yml
file to theSCCH\compose\<version>\<topology>
folder you created in Step 2. -
In the
SCCH
folder, navigate to the folder for your Windows version and topology you are using, for example,compose\ltsc2019\xp1
. Open the.env
file in a text editor. At the bottom of the file, add a definition for the SCCH image. For example: -
In the folder where you extracted the SCCH package, open the
.env-example
file in a text editor, and copy all the contents. -
At the bottom of the
.env
file from Step 4, after the SCCH image data, paste in the contents from the.env-example
file. Save the.env
file.
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 Modules.
To build the images:
-
In the
SCCH
folder, 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
module
folder, create the following subfolders:-
cm
-
cd
NoteYou only have to create the
cd
subfolder if you are deploying to an XP1 or XM1 topology. -
mssql
NoteYou only have to create the
mssql
subfolder if you are deploying to Sitecore 10.1.3 on Docker. -
mssql-init
NoteYou only have to create the
mssql-init
subfolder if you are deploying to Sitecore 10.1.3 on Kubernetes.
-
-
In each subfolder, create a new file and name it
Dockerfile
. -
In the
cm
folder, in theDockerfile
file, enter the following instructions:RequestResponseshell# 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
cd
folder, in theDockerfile
file, enter the following instructions:RequestResponseshell# 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
mssql
folder, in theDockerfile
file, enter the following instructions:RequestResponseshell# 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-init
folder, in theDockerfile
file, enter the following instructions:RequestResponseshell# 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.yml
file for edit, and add the following instructions for thecm
image:RequestResponseshellcm: 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
cd
image:RequestResponseshellcd: 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
mssql
image:RequestResponseshellmssql: 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-init
image:RequestResponseshellmssql-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.yml
file is. Run the following command:RequestResponseshelldocker-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 documentation.