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:
-
A user in Sitecore Content Hub that has the relevant user rights.
-
An OAuth client for the connector.
-
An M Azure Service Bus action. If you already enabled the CMP connector in an environment deployed to SitecoreAI, you can reuse the M Azure Service Bus action you created previously.
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:
-
Clone the source control repository linked to your SitecoreAI environment.
-
In your SitecoreAI repository folder, open the
.envfile and add the following variables:Variable
Value
Description
Sitecore_CMP_ContentHubClientId={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
usernameandpasswordof the user you created in Content Hub.uriof your Content Hub instance.Sitecore_CMP_Service_ServiceBusEntityPathInAzure Service Bus connection string with incoming topic
The Hub out value of the M Azure Service Bus you created.
Sitecore_CMP_Service_ServiceBusEntityPathOutAzure Service Bus connection string with outgoing topic
The Hub in value of the M Azure Service Bus you created.
Sitecore_CMP_Service_ServiceBusSubscriptionSubscription name
The Name of the M Azure Service Bus you created.
SITECORE_AppSettings_cmpEnabled__defineyesBy default, the CMP connector is disabled. To enable the connector, set this value to
yes. -
Open the
docker-compose.override.ymlfile, and add the following key-value pairs to theservices>cm>environmentattribute:RequestResponseSitecore_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} -
In the repository folder, open a Windows console and run the following command:
RequestResponsedocker compose up -dNoteFor 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.