Quartz has not been pre-set yet in Platform Tomcat package. Temporarily you will have to configure it yourself. Follow Quartz scheduler in cluster mode, Platform Documentation 4.0.
Install Platform package by following Installation and Startup.
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.
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
in JBoss (instead of standalone-exo.xml
).
In cluster mode, there is a datasource of which JNDI name is exo-quartz
that you can find in the file.
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 $PLATFORM_JBOSS_HOME/standalone/configuration/gatein/quartz/dbTables
.
For Tomcat, follow
Quartz scheduler in cluster mode, Platform Documentation 4.0 to set up Quartz.
Set org.quartz.properties
to the path of the file quartz.properties
.
This file is ready-made in the package, you do not need to create or modify it.
In JBoss, edit standalone/configuration/standalone-exo-cluster.xml
:
<sytem-properties>
<property name="org.quartz.properties" value="standalone/configuration/gatein/quartz/quartz.properties"/>
</system-properties>
In Tomcat, edit exo.properties
(See
Configuration overview if you have not created this file yet):
org.quartz.properties=${exo.conf.dir}/quartz/quartz.properties
Share a folder on the network that can be accessed from all nodes.
Assuming that the folder path is: /mnt/nfs/shared/data
.
In JBoss, 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>
In Tomcat, edit setenv-customize.sh
file (.bat for Windows, see
Customizing environment variables):
EXO_DATA_DIR="/mnt/nfs/shared/data"
Configure exo.cluster.node.name
property. Use a different name for each node.
In JBoss, edit this property in the standalone-exo-cluster.xml
file:
<system-properties>
<property name="exo.cluster.node.name" value="exo-node1"/>
</system-properties>
In Tomcat, add the property in exo.properties
:
exo.cluster.node.name=exo-node1
Set bind_addr
to the node IP, in exo.properties
(for 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
Configure CometD Oort URL. Replace localhost in the following examples with the IP or host name of the node.
In JBoss, edit standalone-exo-cluster.xml
:
<property name="exo.cometd.oort.url" value="http://localhost:8080/cometd/cometd"/>
In Tomcat, edit exo.properties
:
exo.cometd.oort.url=http://localhost:8080/cometd/cometd
CometD is used to perform messaging over the web, and Oort is a CometD extension that supports clustering. The configuration is necessary to make the On-site Notification work properly.
Configure CometD group port. This step is optional.
CometD Oort nodes will automatically join others in the same network and the same group,
so to prevent stranger nodes from joining your group, you might specify your group with a port
that is different from the default port (5577
).
The situation is likely to happen in a testing environment.
In JBoss, edit standalone-exo-cluster.xml
file:
<!-- Configure the same port for all nodes in your cluster -->
<property name="exo.cometd.oort.multicast.groupPort" value="5579"/>
In Tomcat, edit exo.properties
file:
# Configure the same port for all nodes in your cluster exo.cometd.oort.multicast.groupPort=5579
Only in Tomcat, configure the following:
In setenv-customize.sh (.bat for Windows)
:
EXO_PROFILES="all,cluster"
In exo.properties
:
gatein.jcr.config.type=cluster gatein.jcr.index.changefilterclass=org.exoplatform.services.jcr.impl.core.query.ispn.ISPNIndexChangesFilter # Default JCR indexing is local so you need to use a different folder for each node. # With the value below, you do not have to create the folder. exo.jcr.index.data.dir=gatein/data/jcr/index
Start the servers. You must wait until node1 is fully started, then start node2.
In JBoss, you need to indicate the configuration file with -c option: ./bin/standalone.sh -b 0.0.0.0 -c standalone-exo-cluster.xml (.bat for Windows).
Only in JBoss, 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 a different port-offset in each start command.
If you run two nodes in the same machine for testing, change the default ports of node2 to avoid port conflict.
In Tomcat, ports are configured in conf/server.xml
.
In JBoss, use -Djboss.socket.binding.port-offset
option mentioned above.
To configure a front-end for your nodes, follow Setting up Apache front-end.
To configure load balancing, follow Setting up mod_jk.