Walkthrough: Adding SFMCBDE to Sitecore in Azure Kubernetes Service
How to install Sitecore Connect for Salesforce Marketing Cloud Behavioral Data Exchange in Azure Kubernetes Service, with or without the Tenant Service component.
You can add the Sitecore Connect for Salesforce Marketing Cloud Behavioral Data Exchange (SFMCBDE) connector in Azure Kubernetes Service (AKS), with or without the Tenant Service.
If you are going to use the Activity for Marketing Automation or Activity for Sitecore Sync functionality, you must deploy SFMCBDE with the Tenant Service.
This walkthrough describes how to:
Build images and push them to Azure.
Prepare files and folders for deployment.
Deploy the containers using kubectl commands.
Update your Solr indexes.
Note
The only topology that is supported for SFMCBDE in AKS is XP1
. The XM1
topology is not supported.
To build the images for SFMCBDE and push them to Azure:
Build the images for SFMCBDE as explained in Walkthrough: Preparing to install SFMC Behavioral Data Exchange in a container environment.
If you are installing the Tenant Service, update the following value in the
web.config
file with the Tenant Service URL for your installation:<add name="Access-Control-Allow-Origin" value="http://<Tenant Service url>" xdt:Locator="Match(name)" xdt:Transform="SetAttributes(value)" />
For more information, see the Sitecore documentation on building images.
If you are installing the Tenant Service, build the images for the SFMCBDE Tenant Service as explained in Walkthrough: Installing SFMC Behavioral Data Exchange in Docker with the Tenant Service.
Open the Windows console, and use the
docker tag
command to tag the images. For example:docker tag sfmcce/sitecore-xp1-cm:10.1.0.005207.643-10.0.17763.1757-ltsc2019 $registry/modules/sitecore-sfmcbde-xp1-cm:sfmcbde
In the console, use the
docker push
command to push the images to your Azure registry. For example:docker push $registry/modules/sitecore-sfmcbde-xp1-cm:sfmcbde
To prepare files and folders in your installation for deployment:
If you are not installing the Tenant Service, download the SFMCBDE container deployment package from the Sitecore download page. If you are installing the Tenant Service, download the SFMCBDE-TS container deployment package. Extract the package you chose to a folder on your local workstation.
Navigate to the
SFMCBDE\k8s\<version>
folder, for example,SFMCBDE\k8s\ltsc2019
. Copy theoverrides
subfolder to the Sitecore Experience Platform (SXP) container deployment package folderk8s\<version>
(on the same level as thexp1
folder).In the SXP container deployment package, in each of the
overrides\xp1
andoverrides\xp1\secrets
folders, locate thekustomization.yaml
file. In each file, update thebases
parameter with the appropriate folder names for your installation, for example,../../xp1
.Note
The
bases
parameter contains the placement of the original Sitecore container deployment files that thekustomization.yaml
files override.In the
overrides\xp1\secrets
folder, in thesitecore-salesforce-bde-connection-string.txt
file, replace the content with the connection string you prepared in Walkthrough: Preparing to install SFMC Behavioral Data Exchange in a container environment.
The rest of the procedure depends on whether you are installing the Tenant Service or not.
If you are not installing the Tenant Service:
In each of the
kustomization.yaml
files, in theimages:
section, update thenewName
andnewTag
parameters with the values for them
,xdbcollection
,xdbsearch
,xdbsearchworker
, andxdbautomationworker
images you pushed to the Azure Registry.In the Sitecore container deployment package, open the
overrides\xp1\kustomization.yaml
file and remove thecd
andid
images.
If you are installing the Tenant Service:
Prepare the Tenant Service configuration. For information on how to do this, see the Add Tenant Service module to Sitecore in Azure Kubernetes Service section in the Installation Guide for Data Exchange Tenant Web Service on the Sitecore download page.
In the folder where you extracted the SFMCBDE-TS container deployment package, navigate to the
TenantService.SFMCBDE\k8s\<version>
folder, for example,TenantService.SFMCBDE\k8s\ltsc2019
. Copy the content of theoverrides
subfolder to the Sitecore Experience Platform (SXP) container deployment package folderk8s\<version>\overrides\xp1
. If some of the files already exist in the targetoverrides
folder, update them with the new content.In the SXP container deployment package, in each of the
overrides\xp1
andoverrides\xp1\secrets
folders, locate thekustomization.yaml
file. In each of the kustomization.yaml files, in theimages:
section, update thenewName
andnewTag
parameters with the values for thecm
,cd
,id
,xdbcollection
,xdbsearch
,xdbsearchworker
,xdbautomationworker
, andtenantservice
images you pushed to the Azure Registry.In the
overrides\xp1\secrets
folder, update thesitecore-tenant-connection-string.txt
file with the client ID and client secret for your Sitecore Identity Server.
Note
After you create the tenant in Sitecore, you can update the Tenant Service endpoint ID in the TENANT_SERVICE_CONFIG_EXECUTE_URL
variable in the patch-ts.yaml
file. If you do this you must then redeploy the Tenant Service.
Prepare the AKS cluster configuration and deploy the ingress controller. For information on how to do this, see the Installation Guide for Production Environment for Kubernetes which is available on the Sitecore download page.
To deploy the containers and the necessary Kubernetes components:
Open the Windows console, and navigate to the folder containing the xp1 and overrides folders.
Deploy the secrets. Use this command:
kubectl apply -k ./overrides/xp1/secrets/
Run the
external
folder. Use this command:kubectl apply -k ./xp1/external/
Wait for all containers to have the status Ok/Running. You can check the status with this command:
kubectl get pods -o wide
Run the
init
folder. Use this command:kubectl apply -k ./overrides/xp1/init/
Wait for all containers to have the status Completed. You can check the status with this command:
kubectl get pods
To create persistent volumes, run this command:
kubectl apply -f ./xp1/volumes/azurefile
Run the Sitecore containers with the SFMCBDE changes. Use this command:
kubectl apply -k ./overrides/xp1/
Wait for all containers to have the status Ok/Running. You can check the status with the
kubectl get pods
command.Update the local host file. For information on how to do this, see the Installation Guide for Production Environment for Kubernetes, which is available on the Sitecore download page.
When the containers have been deployed, rebuild your search indexes.