Running Multiple CMS Instances with Cargo Using a Shared Repository (Local Clustered Setup)

This guide explains how to run multiple Bloomreach Content CMS instances locally with Cargo, using a single shared repository. This setup is useful for local testing of clustered deployments.

Prerequisites

  • Two separate checkouts of the same Bloomreach Content project in different directories.
  • MySQL installed and accessible for use as the repository database.
  • Maven installed.

Steps

  1. Clone the Project Twice

    Check out the same project into two different directories on your local machine.

  2. Configure Tomcat for Multiple Instances

    In one of the checkouts, follow the instructions in Run 2 Bloomreach Content instances of Tomcat simultaneously to configure Tomcat for multiple running instances.

  3. Configure MySQL for Both Instances

    In both checkouts, follow the steps in Use MySQL in a Development Environment to set up MySQL as the repository database.

  4. Update repository.xml for Clustering

    In each project directory, update the repository.xml file to enable clustering. Add the following <Cluster> configuration to both files:

    <Cluster> <Journal class="org.apache.jackrabbit.core.journal.JNDIDatabaseJournal"> <param name="revision" value="${rep.home}/revision.log"/> <param name="url" value="java:comp/env/jdbc/repositoryDS"/> <param name="driver" value="javax.naming.InitialContext"/> <param name="schemaObjectPrefix" value="repository_"/> <param name="schema" value="mysql"/> </Journal> </Cluster>
  5. Start Both Instances with Cargo

    In each project directory, start the CMS instance using:

    mvn -P cargo.run
    

Verification

  • Both CMS instances should start and connect to the shared MySQL repository.
  • Changes made in one instance should be visible in the other, confirming that clustering is working as expected.

Troubleshooting

  • Ensure both instances use the same database and have identical cluster configuration in repository.xml.
  • Check for port conflicts in Tomcat configuration if either instance fails to start.
  • Review the logs for any repository connection errors.
Share Feedback
Page: /build/service-plugins/running-multiple-cms-instances-with-cargo-while-using-one-repository-clustered-setup-local
Section: Build
Category *