Local Configuration File Settings

There are four files directly within the quarkcat/ directory that you must edit to reflect your local environment: setenv.sh, .vdsrc, deploy-from-svn, and internal-deploy-from-svn. In addition, there are two files within the quarkcat/sw/local-settings/ directory that must be edited.

In all:
  • quarkcat/setenv.sh
  • quarkcat/.vdsrc
  • quarkcat/deploy-from-svn
  • quarkcat/internal-deploy-from-svn
  • quarkcat/sw/local-settings/build.properties
  • quarkcat/sw/local-settings/common/resources/classes/elab.properties

setenv.sh

A file called setenv.sh is frequently used to set Tomcat parameters, typically found in CATALINA_HOME/bin/ or CATALINA_BASE/bin/, for whatever value of those variables a particular instance of Tomcat is using. It's unclear exactly what relation the file quarkcat/setenv.sh has to those files; since it also sets VDS variables, I'm pretty sure it's not an out-of-the-box config file for Tomcat. Nevertheless, it does set Java and Tomcat parameters, including CATALINA_HOME. I think normal setenv.sh scripts can't set CATALINA_HOME and don't need export directives, leading me to suspect that the original e-Lab authors named this file only by analogy to the standard Tomcat config file.

  • Change HOME and TMPDIR at the top to the respective locations on your local machine, most probably
HOME=/home/quarkcat  ->  HOME=/home/<your username>/quarkcat
TMPDIR=/home/quarkcat/tmp  ->  TMPDIR=/home/<your username>/quarkcat/tmp

  • CATALINA_HOME should be set to the symlink quarkcat/sw/tomcat that points to the main Tomcat installation. I imagine setting this variable directly to the main installation directory would also work.

  • Make sure JAVA_HOME points to the directory where your JVM is installed. On Ubuntu, this will look something similar to
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/

deploy-from-svn

This is the script that we execute to deploy the website from the SVN repository to either localhosts or the VMs.

  • The variable ~quarkcat represents quarkcat's home directory. If you're acting as a user other than quarkcat, you'll need to amend ROOT.

  • Change the $USER value on line 15 to your username.

  • Change the final line to reflect the version of Tomcat you use.

internal-deploy-from-svn

When executed, deploy-from-svn quickly passes off to internal-deploy-from-svn, which handles the importation of the website files from the repository.

Change ROOT and HOME at the top if necessary

Make sure that line 32 or 33 reads

svn info http://cdcvs.fnal.gov/subversion/quarknet/$1 >> $LOG || error

and that line 46 or 47 reads

svn co http://cdcvs.fnal.gov/subversion/quarknet/$1 $ROOT/sw/i2u2svn >>$LOG || error

(there may still be some files floating around with outdated URLs here).

.vdsrc

I don't know what this does exactly, but it appears to set parameters needed for the VDS system.

The value

vds.db.*.driver.url     jdbc:postgresql://localhost/i2u2_vds

refers to the local Postgres vds database, so "i2u2_vds" will need to be whatever you called yours. The value of vds.db.*.driver.user should be the Postgres role that accesses this database. There may or not be a value vds.db.*.driver.password, depending on the origin of your file. If your local Postgres user needs a password to access your local vds database (that's up to you), put the password here.

build.properties

This is the file that controls how Ant builds the website out of the files pulled from the repo by internal-deploy-from-svn. Change the filepaths as appropriate to your system.

  • Note that the tomcat symlink doesn't end in a slash (i.e., use .../sw/tomcat, not .../sw/tomcat/) because it's a symlink, not a directory.

  • container.libs should point to the Tomcat Java libraries.

On Ubuntu, the default location for these seems to be /usr/share/tomcat8/lib/. If this isn't true for your system, find tomcat-dbcp.jar, which will be in library directory. If you don't have it, you will need to install the Tomcat common libraries package (tomcat8-common on Ubuntu 16; use dpkg -S tomcat-dbcp.jar to find the right package on Debian-based distributions). This package is typically installed as a dependency when you install Tomcat, though.

The library may be in a location that isn't within the container.home parameter of build.properties, which is given in terms of the symlink directory quarkcat/sw/tomcat. In this case, it's best to create a symlink (say, tomcat/common/lib) that points to the library installation directory. This turned out to be the case for both Fedora 23 and Ubuntu 16.04.

  • container.extra.libs doesn't seem to be used. On i2u2-dev, for instance, this points to a directory that does not exist, and the website is evidently not affected.

elab.properties

quarkcat/sw/local-settings/common/resources/classes/elab.properties

Change i2u2home and environment parameters, as well as userdb.db, userdb.username and userdb.password to whatever accesses the Postgres databases. Change or comment out the notification email addresses at the bottom.

-- Main.JoelG - 2016-07-19

Comments

 
Topic revision: r6 - 2016-09-13, JoelG
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback