7.1. Setting up eXo Platform cluster

Note

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:

    
    <sytem-properties>
        <property name="org.quartz.properties" value="standalone/configuration/gatein/quartz/quartz.properties"/>
    </system-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:

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

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

    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:

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

    exo.jcr.cluster.jgroups.udp.bind_addr=192.168.1.100
    exo.idm.cluster.jgroups.udp.bind_addr=192.168.1.100
  9. Start the servers.

    • Start node1:

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

      ./bin/standalone.sh -b 0.0.0.0 -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