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_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. -
Open the
docker-compose.override.ymlfile, and add the following key-value pairs to theservices>cm>environmentattribute: -
In the repository folder, open a Windows console and run the following command:
NoteFor 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.