CMDBUILD 3.1 or 3.1.1 Enable clustering

After installation many folks feel the urge to make their setup more reliable and resilient by clustering the crap out of it, and so with cmdbuild.

The Clustering features need to be enabled once the nodes are installed and deployed.

So essentially you install postgres (as a single instance or as a cluster), after that you install tomcat and cmdbuild on all nodes.
At the end of the install script that you can check out at this url: https://blog.giuseppeurso.net/cmdbuild-3-1-1-on-centos-7/, you will find 3 interesting lines:

bash ${install_folder}/tomcat/webapps/cmdbuild/cmdbuild.sh dbconfig create empty -configfile ${install_folder}/tomcat/conf/cmdbuild/database.conf

With this first api call (sort of), cmdbuild will access the db server, create the database and all the tables and data needed for cmdbuild to functioning.

For this reason when deploying the remaining cmdbuild nodes, this last operation won’t be necessary, because the database is already there.

I felt like sharing this with you although it is not directly related with the cluistering thing, but IMHO it helps understanding the big picture.

In order to enable the clustering features (aka sessions in the database), you will have to run two commands: of which the first one will enable the cluestering itself, and the second will instruct cmdbuild about the nodes of the cluster.

# Enable cluster
/opt/tomcat/webapps/cmdbuild/cmdbuild.sh restws -username admin -password admin -url http://localhost:8080/  setconfig org.cmdbuild.cluster.enabled true

And

# Add cluster nodes
/opt/tomcat/webapps/cmdbuild/cmdbuild.sh restws -username admin -password admin -url http://localhost:8080/  setconfig org.cmdbuild.cluster.nodes 10.0.0.50,10.0.0.51,10.0.0.52

Instead of IP addresses you can use fqdns.

This should be all.

Let me know how it goes.

 
(Visited 4 times, 1 visits today)

Author: Giuseppe Urso

Giuseppe lives in Haarlem now with his shiny dog, Filippa In 1982 received his first home computer, a Commodore 64, followed by Datasette and a 1541 Floppy Disk Drive. In 1999 he installed his first Linux distro (LRH6). In 2006 he switched to Debian as favourite OS. Giuseppe Urso actively sustains the Free Software Fundation and his founder Richard Mattew Stallman, he speaks to people trying to convince them to join the fight now, and about how important is to use Free Software only. He has a job as Infra Specialist at Hippo Enterprise Java Cms an Open Source Enterprise class Content Management System, one of the coolest company ever, in Amsterdam. He's always ready to install Debian on other people computers for free.

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.