This document details setting up a READ-ONLY INSTALL ZFS for CEM.
This process depends on CEM being set up for 2 separate ZFS filesystems, one for binary data(readonly) and one for configuration data(read/write). The binary ZFS is used to house the binary modules used in USS for CEM. The configuration ZFS is what holds configuration and log data as well as temporary expansions of the binary java files used in the CEM GUI.
CEM 6.0
N/A
After making the needed modifications to the deployed tomcat directories, the tomcat task should be able to run under a readonly ZFS filesystem with the pieces that have configuration parameters residing in a read/write ZFS.
Inside of the read/write mounted config directory, make sure there is a webapps as well as a
logs directory, both defined with necessary permissions for tomcat to write to it.
Steps 2 and 3 will need to happen when the main CEM directory is mounted read/write. after the files in these steps
are modified, it can be mounted readonly.
1. Edit <CEME_HLQ>.<CEME_MLQ>.CUSTOM.CFGLIB(CEMETOME) search for the line
#IJO="$IJO -verbose:class"
and after it insert:
IJO="$IJO -Dcem.config.path=${CEM_CONFIG_PATH}"
This sets up the config directory as as variable addressable in other configuration files.
2. In the <CEM_ZFS_MOUNTPOINT>/tomcat/conf directory, edit the logging.properties file and change the following lines:
1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
4host-manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
to:
1catalina.org.apache.juli.AsyncFileHandler.directory = ${cem.config.path}/logs
2localhost.org.apache.juli.AsyncFileHandler.directory = ${cem.config.path}/logs
3manager.org.apache.juli.AsyncFileHandler.directory = ${cem.config.path}/logs
4host-manager.org.apache.juli.AsyncFileHandler.directory = ${cem.config.path}/logs
3. In <CEM_ZFS_MOUNTPOINT>/tomcat/conf directory, edit context.xml to change the following line:
<Context>
to:
<Context workDir="${cem.config.path}/webapps">
4. Create symbolic links for the 4 war files needed for CEM into the config ZFS:
ln -s <CEM_ZFS_MOUNTPOINT>/cai/cacem/cem/CA/CEMWS <CEM_CONFIG_ZFS_MOUNTPOINT>/webapps/cemws.war
ln -s <CEM_ZFS_MOUNTPOINT>/cai/cacem/cem/CA/CEMUI <CEM_CONFIG_ZFS_MOUNTPOINT>/webapps/cemui.war
ln -s <CEM_ZFS_MOUNTPOINT>/cai/cacem/cem/CA/CEMREST <CEM_CONFIG_ZFS_MOUNTPOINT>/webapps/cemrest.war
5. In <CEM_ZFS_MOUNTPOINT>/tomcat/webapps/cemws/WEB-INF/classes edit the logback.xml file to change all instances of:
INSTALL_HOME
to
CEM_CONFIG_PATH
6. Edit <CEME_HLQ>.<CEME_MLQ>.CUSTOM.CFGLIB(CEMESRVX) and change:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
to:
<Host name="localhost" appBase="${cem.config.path}/webapps
unpackWARs="true" autoDeploy="true">
Also:
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
And change it to:
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="${cem.config.path}/logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />