Enabling the CMP connector in a local development environment

To use Sitecore Content Management Platform (CMP) in a local SitecoreAI development environment running in a Docker container, you must configure and enable the CMP connector.

Prerequisites

Before you enable the CMP connection, you must have:

Configure and enable the CMP connector in your local development environment

To configure and enable the CMP connector in your local development environment, you must add the relevant variables to your .env file.

To configure and enable the CMP connector:

  1. Clone the source control repository linked to your SitecoreAI environment.

  2. In your SitecoreAI repository folder, open the .env file and add the following variables:

    Variable

    Value

    Description

    Sitecore_CMP_ContentHub

    ClientId={client_id};ClientSecret={client_secret};UserName={username};Password={password};URI={uri};

    Example: Sitecore_CMP_ContentHub=ClientId=App;ClientSecret=a51a8fb6-4f57-1234;UserName=john;Password=hunter2;URI=https://example.com/;

    The Client ID and Client Secret of the connector's OAuth client.

    The username and password of the user you created in Content Hub.

    uri of your Content Hub instance.

    Sitecore_CMP_Service_ServiceBusEntityPathIn

    Azure Service Bus connection string with incoming topic

    The Hub out value of the M Azure Service Bus you created.

    Sitecore_CMP_Service_ServiceBusEntityPathOut

    Azure Service Bus connection string with outgoing topic

    The Hub in value of the M Azure Service Bus you created.

    Sitecore_CMP_Service_ServiceBusSubscription

    Subscription name

    The Name of the M Azure Service Bus you created.

    SITECORE_AppSettings_cmpEnabled__define

    yes

    By default, the CMP connector is disabled. To enable the connector, set this value to yes.

  3. Open the docker-compose.override.yml file, and add the following key-value pairs to the services > cm > environment attribute:

    RequestResponse
    Sitecore_ConnectionStrings_CMP_dot_ContentHub: ${Sitecore_CMP_ContentHub}
    Sitecore_ConnectionStrings_CMP_dot_ServiceBusEntityPathIn: ${Sitecore_CMP_Service_ServiceBusEntityPathIn}
    Sitecore_ConnectionStrings_CMP_dot_ServiceBusEntityPathOut: ${Sitecore_CMP_Service_ServiceBusEntityPathOut}
    Sitecore_ConnectionStrings_CMP_dot_ServiceBusSubscription: ${Sitecore_CMP_Service_ServiceBusSubscription}
    SITECORE_AppSettings_cmpEnabled__define: ${SITECORE_AppSettings_cmpEnabled__define}
  4. In the repository folder, open a Windows console and run the following command:

    RequestResponse
    docker compose up -d
    Note

    For information on setting up your local environment see Set up your full-stack SitecoreAI local development environment

    When your environment is running, you can configure items for content import and then create a trigger for your M Azure Service Bus action.

Do you have some feedback for us?

If you have suggestions for improving this article,