Set Up CQ Cluster

CQ Clustering

Set Up CQ Cluster

There are various ways you can set up cluster in CQ. Two most common ways are

  • Automatic Cluster Join through UI
  • Manual Cluster Join

In order to understand cluster knowledge of following files are important:

Cluster Join Through UI:

  • In order to add a node to through UI. Go to welcome screen and click on "Clustering" Or go to <HOST>:<PORT>/libs/granite/cluster/content/admin.html
CQ
  • Then enter Master URL http://<HOST>:<PORT>/crx/explorer
  • Then enter UserName, Password.
  • Then click on Join
  • Once nodes are in cluster you can always go back to <HOST>:<PORT>/libs/granite/cluster/content/admin.html to check status of cluster.
  • If you Join cluster through UI. In file system you will see directory structure like /crx-quickstart/crx.XXX in slave node. Which is essentially repository for cluster.

Manual Cluster Join:

  • Assuming that you are creating Shared Nothing cluster.
  • In order to do manual cluster join. First take file system backup of any node in cluster (This mean stop any cluster node and take backup of folder containing quickstart jar file, crx-quickstart folder, And your license file). You can also take online backup (We will cover this later)
  • Put file system (backup) in other machine. (Based on how you took your backup you can restore whole file system)
  • Then go to /crx-quickstart/repository folder and remove cluster_node.id file
  • Open /crx-quickstart/repository/cluster.properties file and add IP address of Master instance in addresses property. You can also do echo "addresses=x.x.x.x" >> crx-quickstart/repository/cluster.properties where x.x.x.x is IP of master instance.
  • Make sure that Cluster_Id is same in both master and slave instance.
  • Start Slave instance.
  • Check log of both master and Slave. In Master Log you should see message saying that slave is connected as soon as slave is started. In slave log you should see the message that connecting to master.