Skip to main content

Walkthrough: Adding SFMCBDE to Sitecore in Azure Kubernetes Service

Abstract

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:

  1. Build the images for SFMCBDE as explained in Walkthrough: Preparing to install SFMC Behavioral Data Exchange in a container environment.

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

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

  4. 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
  5. 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:

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

  2. Navigate to the SFMCBDE\k8s\<version> folder, for example, SFMCBDE\k8s\ltsc2019. Copy the overrides subfolder to the Sitecore Experience Platform (SXP) container deployment package folder k8s\<version> (on the same level as the xp1 folder).

  3. In the SXP container deployment package, in each of the overrides\xp1 and overrides\xp1\secrets folders, locate the kustomization.yaml file. In each file, update the bases 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 the kustomization.yaml files override.

  4. In the overrides\xp1\secrets folder, in the sitecore-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:

  1. In each of the kustomization.yaml files, in the images: section, update the newName and newTag parameters with the values for the m,xdbcollection, xdbsearch, xdbsearchworker, and xdbautomationworker images you pushed to the Azure Registry.

  2. In the Sitecore container deployment package, open the overrides\xp1\kustomization.yaml file and remove the cd and id images.

If you are installing the Tenant Service:

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

  2. 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 the overrides subfolder to the Sitecore Experience Platform (SXP) container deployment package folder k8s\<version>\overrides\xp1. If some of the files already exist in the target overrides folder, update them with the new content.

  3. In the SXP container deployment package, in each of the overrides\xp1 and overrides\xp1\secrets folders, locate the kustomization.yaml file. In each of the kustomization.yaml files, in the images: section, update the newName and newTag parameters with the values for the cm, cd, id, xdbcollection, xdbsearch, xdbsearchworker, xdbautomationworker, and tenantservice images you pushed to the Azure Registry.

  4. In the overrides\xp1\secrets folder, update the sitecore-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:

  1. Open the Windows console, and navigate to the folder containing the xp1 and overrides folders.

  2. Deploy the secrets. Use this command:

    kubectl apply -k ./overrides/xp1/secrets/
  3. Run the external folder. Use this command:

    kubectl apply -k ./xp1/external/
  4. Wait for all containers to have the status Ok/Running. You can check the status with this command:

    kubectl get pods -o wide
  5. Run the init folder. Use this command:

    kubectl apply -k ./overrides/xp1/init/
  6. Wait for all containers to have the status Completed. You can check the status with this command:

    kubectl get pods
  7. To create persistent volumes, run this command:

    kubectl apply -f ./xp1/volumes/azurefile
  8. Run the Sitecore containers with the SFMCBDE changes. Use this command:

    kubectl apply -k ./overrides/xp1/
  9. Wait for all containers to have the status Ok/Running. You can check the status with the kubectl get pods command.

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