Overview
The cluster setup is based on the Infinispan cluster configuration, via JGroups.
Steps for clustering on the same machine:
- Build fcrepo-webapp.
- Copy fcrepo-webapp/target/fcrepo-webapp.war to a second location, we shall call this fcrepo-webapp2.
- Configure a separate activeMQ port in webapp2:
- Under fcrepo-webapp2/src/main/resource/config/activemq.xml
- Under transport, change the port to a nearby number.
- Pick a different web port for the separate fcrepo-webapp2, as in the exported jetty.port below.
In webapp1, execute:
export MAVEN_OPTS="-Djgroups.tcp.address=127.0.0.1 -Djgroups.tcp.port=7800 -Djgroups.tcpping.initial_hosts=127.0.0.1[7800],127.0.0.1[7801] -Djava.net.preferIPv4Stack=true"
mvn -Djetty.port=8888 jetty:run
In webapp2, execute:
export MAVEN_OPTS="-Djgroups.tcp.address=127.0.0.1 -Djgroups.tcp.port=7801 -Djgroups.tcpping.initial_hosts=127.0.0.1[7800],127.0.0.1[7801] -Djava.net.preferIPv4Stack=true"
mvn -Djetty.port=8889 jetty:run
- Look for the message "Received new cluster view"
Steps for clustering with others:
In fcrepo-webapp:
export MAVEN_OPTS="-Djgroups.tcp.address=<local-ip-address>" -Djgroups.tcpping.initial_hosts='<local-ip-address>[7800],<remote-ip-address-0>[7800],<remote-ip-address-n>[7800]' -Dfcrepo.ispn.numOwners=2 -Djava.net.PreferIPv4Stack=true" mvn -Djetty.port=8889 jetty:run
2 Comments
Justin Coyne
Andrew Woods
Yes, the clustering documentation was removed from the 4.7.4 wiki.