Walkthrough: Installing SFMC Behavioral Data Exchange in Docker with the Tenant Service
To use the Activity for Marketing Automation and Sitecore Sync functionality in Sitecore Connect for Salesforce Marketing Cloud Behavioral Data Exchange (SFMCBDE), you must deploy a Tenant Service.
This walkthrough describes how to:
- Prepare the installation files for the Tenant Service.
- Build the Docker images for the Tenant Service.
Prepare the installation files for the Tenant Service
To prepare the files you need for the installation:
-
Complete the steps in Walkthrough: Preparing to install SFMC Behavioral Data Exchange in a container environment.
-
Download the SFMCBDE-TS container deployment package from the Sitecore download page. Extract it to your workstation with the folder structure intact.
-
Navigate to the folder into which you extracted the package. Navigate to the
TenantService.SFMCBDEfolder for the Windows version and topology you are using, for example,TenantService.SFMCBDE\compose\ltsc2019\xp1. -
Open the
.env-examplefile in an editor. Copy all the variables to the clipboard. -
Go to the Sitecore container deployment folder on your local machine. Go to the folder for the Windows version and topology you are using, for example,
compose\ltsc2019\xp1. -
Open the
.envfile in an editor, and paste in the variables from the.env-examplefile. Update the variables according to your installation. Save the.envfile.NoteAfter you create the tenant in Sitecore, you can update the TENANT_SERVICE_CONFIG_EXECUTE_URL variable in the
.envfile with the Tenant Service endpoint ID. When you do this, you must then redeploy the Tenant Service. -
From the
TenantService.SFMCBDE\compose\<version>\<topology>folder, copy thetenant-service.override.ymlfile to the Sitecore container deploymentcompose\<version>\<topology>folder (where thedocker.compose.ymlfile is).
Build the Docker images for the Tenant Service
When you have prepared the installation files and the Docker image files for the SFMCBDE roles, you must add Docker files for each Tenant Service role, and build the Docker images.
To build the images:
-
In the
module\cmfolder, in theDockerfilefile, before theinvoke-XdtTransform.ps1command, add the following instructions: -
In the
modulefolder, create these subfolders:tenantservicecdid
-
In each subfolder, create a new file and name it
Dockerfile. -
In the
tenantservicefolder, create a new subfolder and name itConfig. In theConfigsubfolder, create a new file and name itUpdate-ConfigJson.ps1. -
In the
Update-ConfigJson.ps1file, enter the following code, and then save the file:NoteThis script updates the
config.jsonfile in the Tenant Service. It is run by theDockerfilefile for thecmimage. -
In the
tenantservicefolder, in theDockerfilefile, enter the following instructions: -
In the
cdfolder, in theDockerfilefile, enter the following instructions: -
In the
idfolder, in theDockerfilefile, enter the following instructions: -
In the
compose\<version>\<topology>\docker-compose.override.ymlfile, add build instructions for theidandcdroles. If you are using, for example, the XP1 topology, the file will look like this: -
In the
compose\<version>\<topology>\tenant-service.override.ymlfile, add build instructions for thetenant-servicerole. For example: -
In the
compose\<version>\<topology>\.envfile, add the asset image version. For example:NoteYou can find the image version in the Sitecore Docker Images repository.
-
In the Windows console, go to the folder containing the
docker-compose.override.ymlfile. Run the commanddocker-compose -f docker-compose.yml -f docker-compose.override.yml -f tenant-service.override.yml up –detach. -
When the Docker compose command has finished, rebuild your search indexes.
To test if the Tenant Service is running, follow the Deploy the Tenant Service container section of the Installation Guide for Data Exchange Tenant Web Service, which is available on the Sitecore download page.