Can anybody comment on best practice for sharing a JBoss tree between multiple instances?
Specifically,
a) JBoss to be unpacked in a common location, e.g /opt/jboss-as-7.X
b) all files under /opt/jboss-as-7.X to be read-only, unmodified original files from the distribution tarball (assume they are owned by root or on a true read-only filesystem)
c) each `instance' will have a $JBOSS_HOME, for instance-specific config and dynamic content, for example,
/usr/local/jboss/instance1
/usr/local/jboss/instance2
Various solutions come to mind, for example:
In each $JBOSS_HOME, there would presumably be symlinks to static content, e.g.
/usr/local/jboss/instance1/modules -> /opt/jboss-as-7.X/modules
and there would be copies of things that are dynamic
cp -R /opt/jboss-as-7.X/standalone /usr/local/jboss/instance1
instances would be started with a custom RUN_CONF
RUN_CONF=/usr/local/jboss/instance1/custom/standalone.conf \
JBOSS_HOME=/usr/local/jboss/instance1 \
/opt/jboss-as-7.X/bin/standalone.sh
Looking inside standalone.sh, it appears possible to avoid any symlinks by using JBOSS_MODULEPATH, JBOSS_LOG_DIR, as well
Can anyone comment on the recommended way to do this, or any best practices for such deployments?