7.1. Setting up eXo Platform cluster


Again, in eXo Platform 4, cluster mode is currently supported for JBoss only, so this guideline should not be applied for Tomcat.

As of 4.1, typical configuration can be done all in two files: standalone-exo-cluster.xml and exo.properties. Besides:

  • UDP is the default configuration, instead of TCP.

  • Job Persistence for Quartz is pre-configured, you just need to activate it by the property org.quartz.properties.

  1. Install Platform JBoss package by following Installing JBoss EAP.

  2. Create a copy of the package for each cluster node. Assume that you have two nodes: node1.your-domain.com and node2.your-domain.com.

  3. Configure IDM, JCR and Quartz datasources:

    • Use the same databases for all nodes.

    • Follow Database chapter, but note that the configuration file is standalone-exo-cluster.xml (instead of standalone-exo.xml).

    • As of 4.1, there is a datasource of which JNDI name is exo-quartz that you can find in the file.

  4. Initiate the Quartz database.

    • Use an appropriate SQL script to create tables in the database that you configured for exo-quartz.

    • The scripts are packaged in standalone/configuration/gatein/quartz/dbTables.

  5. Set org.quartz.properties in standalone/configuration/standalone-exo-cluster.xml:

        <property name="org.quartz.properties" value="standalone/configuration/gatein/quartz/quartz.properties"/>
    • If you changed the default name exo-quartz in previous step, you must match it in quartz.properties.

  6. Share a folder on the network that can be accessed from all nodes.

    Assuming that the folder path is: /mnt/nfs/shared/data, edit the system property exo.shared.dir in the standalone-exo-cluster.xml file:

        <property name="exo.shared.dir" value="/mnt/nfs/shared/data"/>
  7. Edit exo.cluster.node.name in standalone-exo-cluster.xml. The default:

        <property name="exo.cluster.node.name" value="exo-node1"/>

    Use a different name for each node. If you do not want to configure this for every node, you can set it later by appending this to the start command:

  8. Set bind_addr to the node IP, in standalone/configuration/gatein/exo.properties (about this file, see Configuration overview). For example:

  9. Start the servers.

    • Start node1:

      ./bin/standalone.sh -b -c standalone-exo-cluster.xml
    • Wait until node1 is fully started, then start node2:

      ./bin/standalone.sh -b -c standalone-exo-cluster.xml

    On Windows, replace standalone.sh with standalone.bat.

    Some other options that you can use in the start command:

    • -Dorg.quartz.properties=path/to/quartz.properties overrides the path in the configuration file.

    • -Dexo.cluster.node.name=a-node-name overrides the node name in the configuration file.

    • -Djboss.socket.binding.port-offset=101

      This is useful in case you set up nodes in the same machine for testing. You will not need to configure the port for every node. Just use different port-offset in each start command.

To configure a front-end for your nodes, follow Setting up Apache front-end.

To configure load balancing, follow Setting up mod_jk.

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus