OLE and Docstore Server Installation

Kuali Milestone Release 0.3 is now available! Visit OLE in the Cloud: 

Unknown macro: {html}

<A href="http://demo.ole.kuali.org/ole-demo/portal.jsp" mce_href="http://demo.ole.kuali.org/ole-demo/portal.jsp" target="_Blank">DEMO Drive</A>

, or use our online OLE 0.3 Drivers Manual to navigate Kuali OLE with your local installation!

Overview

These instructions provide the necessary steps to install OLE on to a local Linux server under Tomcat running either an Oracle or MySQL database.  While it is possible to install the software locally on a laptop via an IDE, these instructions do not those steps. There are multiple options for installation, but the suggested layout is two schemas/databases.  One for OLE/Rice/KFS and one for the Docstore. The development version of OLE is currently running on two separate applications servers.  One for OLE and one for the Docstore, but a single application server can be used.  

The installation process is in two distinct parts: 

1.  #OLE /Rice/KFS Server Installation

2.  #Docstore/Docsearch server installation

Server Requirements

The installation of the OLE Server requires the following:

Ant (OLE is using 1.7.1)

Maven (OLE is using 2.2.1)

Tomcat (OLE is currently running under Tomcat6 and has only been tested with Tomcat6)

Oracle or MySQL Database. (OLE is using Oracle 11.2.0.2.v3 and MySQL 5.1.57)

The easiest means of installing the software is to have access to root or the ability to sudo  root.

Oracle Requirements

Two empty schemas will be needed.  One for the OLE/Rice/KFS installation and one for the OLE Docstore installation.  Schema name, username, Password, Host Address, Port and SID are needed for installation configuration. The names can be of the sites choosing to meet local naming conventions.

MySQL Requirements

Two empty databases will be needed.  One for the OLE/Rice/KFS installation and one for the OLE Docstore installation.  Database name, username, Password, Host Address and Port are needed for installation configuration. The names can be of the sites choosing to meet local naming conventions.

Tomcat Requirements

The following JAVA_OPTS need to be added to the local configuration file for Tomcat.

JAVA_OPTS="$JAVA_OPTS -Xmx1024m -Xms768m -XX:MaxPermSize=256m -XX:PermSize=256m  -XX:MaxNewSize=256m -XX:NewSize=256m"

JAVA_OPTS="$JAVA_OPTS -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:SurvivorRatio=128 -XX:MaxTenuringThreshold=0 -XX:+UseTLAB"

JAVA_OPTS="$JAVA_OPTS -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled"

JAVA_OPTS="$JAVA_OPTS -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Djava.awt.headless=true"

JAVA_OPTS="$JAVA_OPTS -Dcom.sun.jndi.ldap.read.timeout=60000 -Dcom.sun.jndi.ldap.connect.pool.timeout=30000 -Dcom.sun.jndi.ldap.connect.timeout=10000"

JAVA_OPTS="$JAVA_OPTS -Dnetworkaddress.cache.ttl=60 -Doracle.net.CONNECT_TIMEOUT=10000 -Djava.util.prefs.syncInterval=2000000"

JAVA_OPTS="$JAVA_OPTS -Duser.timezone=-05:00 -Duser.language=en -Duser.region=US"

JAVA_OPTS="$JAVA_OPTS -Dapp.environment=dist"

JAVA_OPTS="$JAVA_OPTS -Dhttp.url=localhost:8080"

JAVA_OPTS="$JAVA_OPTS -Dorg.apache.jackrabbit.repository.home=/opt/docstore -Dorg.apache.jackrabbit.repository.conf=/opt/docstore/repository.xml"

OLE Server Installation

It is suggested the Tomcat server be down during the installation process

Software Checkout

Checkout the software from the OLE SVN repository into a local working directory:

svn co

Unknown macro: {html}

<A href="https://svn.kuali.org/repos/ole/branches/OLE-0.3/ole" mce_href="https://svn.kuali.org/repos/ole/branches/OLE-0.3/ole" target="_Blank">https://svn.kuali.org/repos/ole/branches/OLE-0.3/ole</A>

  <local working directory>

This will checkout a copy of the current distribution onto your machine for local configuration.

Modification of impex-build.properties

Change to the home directory of the installation user (cd ~) and create an impex-build.properties file and add the following options(only options in <> need to be provided):

For Oracle Installations:

import.torque.database.user=<schema/database username>

import.torque.database.schema=<oracle schema name you created for OLE>

import.torque.database.password=<password>

torque.project=ole

torque.schema.dir=<local working directory>/ole-cfg-dbs/rice

torque.output.dir=${torque.schema.dir}/output

torque.schema.dir.2=<local working directory>/ole-cfg-dbs/development

torque.output.dir.2=${torque.schema.dir.2}/output

import.torque.database=oracle

import.torque.database.driver = oracle.jdbc.OracleDriver

import.torque.database.url = jdbc:oracle:thin:@<hostname>:<port>:<SID>

post.import.liquibase.project=ole

post.import.liquibase.xml.directory=<local working directory>/work/db/rice-data

For MySQL Installation:

import.torque.database.user=<database username>

import.torque.database.schema=<mysql db name you created for OLE>

import.torque.database.password=<password>

torque.project=ole

torque.schema.dir=<local working directory>/ole-cfg-dbs/rice

torque.output.dir=${torque.schema.dir}/ouput

torque.schema.dir.2=<local working directory>/ole-cfg-dbs/development

torque.output.dir.2=${torque.schema.dir.2}/output

import.torque.database=mysql

import.torque.database.driver=com.mysql.jdbc.Driver

import.torque.database.url=jdbc:mysql://<host address>:3306/<db name>

post.import.liquibase.project=ole

post.import.liquibase.xml.directory=<local working directory>/work/db/rice-data

Run Impex Script

Change directory to <local working directory>/ole-cfg-dbs/db-impex/impex

Run the Ant build:  ant import

This will run the impex script, creating the OLE/Rice/KFS schemas and initial importing of data.

Modify dist-build.properties

Change directory to the local working directory and edit the dist-build.properties file. Modify the following entries (no <>).:

user.home=<local working directory> i.e. user.home=/opt/ole-src

appserver.url=<application server url>

rice.url=http://<rice host url>/ole-<build environment>

deploy.working.directory=<local working directory>

build.environment=<name of environment i.e. dist or dev or test>

For Oracle

datasource.url=jdbc:oracle:thin:@jdbc:oracle:thin:@<hostname>:<port>:<SID>

datasource.username=<db username>

datasource.password=<db password> 

For MySQL

datasource.url= jdbc:mysql://<host address>:3306/<db name>

datasource.username=<db username>

datasource.password=<db password>

For Oracle

rice.server.datasource.url=jdbc:oracle:thin:@jdbc:oracle:thin:@<hostname>:<port>:<SID>

rice.server.datasource.username=<db username>

rice.server.datasource.password=<db password>

For MySQL

rice.server.datasource.url= jdbc:mysql://<host address>:3306/<db name>

rice.server.datasource.username=<db username>

rice.server.datasource.password=<db password>

For both Oracle and MySQL

ole.docstore.url=http://<docstore url>/ole-docsearch/

ole.docstoreapp.url=http://<docstore url>/oledocstore/document

ole.bibeditor.url=http://<ole server url>/ole-demo/bibEditor

ole.bibeditor.create.url=http://<ole server url>/ole-demo/bibEditor

ole.docsearch.url=http://<docstore url>/ole-docsearch/bib/select

ole.docsearch.app.url=http://<docstore url>/ole-docsearch/

There will be other entries in the file that do not require local modification.

 

Build War File

From the local working directory, enter the following command:

          ant -propertyfile ./dist-build.properties  clean-project dist dist-external

This will create the ole war file ole-<build.enviroment>.war in the local working directory.  It will also create three configuration files:

            skel.zip

            settings.zip

            security.zip

 

Zip Files

The three zipfiles need to be unpacked.  Copy the following into a shell script and execute.  The lines may need to be changed to meet local requirements, but will unpack the files into the location OLE is expecting to find the various configuration options*.  INSTANCE must match the build.enviroment option in the dist-build.properties file.*

INSTANCE=<build environment>

mkdir -p /opt/sa_forms/java/${INSTANCE}/ole

mkdir -p /opt/j2ee/${INSTANCE}/ole

mkdir -p /opt/logs/${INSTANCE}/ole

mkdir -p /opt/work/${INSTANCE}/ole
 

# changing the owner so that tomcat can read/write these directories

chown -R tomcat /opt/sa_forms

chown -R tomcat /opt/j2ee

chown -R tomcat /opt/logs

chown -R tomcat /opt/work

 

# Unpacking as tomcat for proper permissions

sudo -u tomcat unzip -o skel.zip -d /opt/work/${INSTANCE}/ole

sudo -u tomcat unzip -o security.zip -d /opt/sa_forms/java/${INSTANCE}/ole

sudo -u tomcat unzip -o settings.zip -d /opt/j2ee/${INSTANCE}/ole

Copy war file

Copy the ole-<build.environment>.war to your local Tomcat webapps directory for deployment.

Increase the Operating System Max Open Files 

The OLE and document store servers both use a large number of files to manage network connections and the document store.  On each OLE server, you should make the following change:

(NOTE: This is for the flavor of Linux used by the OLE project, the exact commands may differ on your servers.)

Edit /etc/security/limits.d/90-nproc.conf. Add the two "nofile" lines to set the default limit for number of user's processes to prevent accidental fork bombs. See RedHat Bugzilla entry #432903 for reasoning.

/etc/security/limits.d/90-nproc.conf
soft nproc 1024
soft nofile 8096
hard nofile 8096

Restart Tomcat

Restart Tomcat and the OLE application should be available at http://<application url>:<port>/ole-<build environment>  


Docstore Server Installation

It is suggested the Tomcat server be down during the installation process

Software Checkout

Three separate checkouts are necessary for the installation of the document store.  

svn co 

Unknown macro: {html}

<A href="https://svn.kuali.org/repos/ole/branches/OLE-0.3/ole-discovery/OLE-SOLR" mce_href="https://svn.kuali.org/repos/ole/branches/OLE-0.3/ole-discovery/OLE-SOLR" target="_Blank">https://svn.kuali.org/repos/ole/branches/OLE-0.3/ole-discovery/OLE-SOLR</A>

 <local working directory>

svn co 

Unknown macro: {html}

<A href="https://svn.kuali.org/repos/ole/branches/OLE-0.3/DocumentStore" mce_href="https://svn.kuali.org/repos/ole/branches/OLE-0.3/DocumentStore" target="_Blank">https://svn.kuali.org/repos/ole/branches/OLE-0.3/DocumentStore</A>

 <local working directory>

svn co 

Unknown macro: {html}

<A href="https://svn.kuali.org/repos/ole/branches/OLE-0.3/ole-discovery/OLE-DocSearch" mce_href="https://svn.kuali.org/repos/ole/branches/OLE-0.3/ole-discovery/OLE-DocSearch" target="_Blank">https://svn.kuali.org/repos/ole/branches/OLE-0.3/ole-discovery/OLE-DocSearch</A>

 <local working directory>

Solr Installation

Installation of Solr requires the copying of files from the local working directory for the Solr checkout to /opt/docstore/solr.  To accomplish this do the following steps:

  1. mkdir /opt/docstore
  2. mkdir /opt/docstore/solr
  3. cd <local working directory for OLE-SOLR checkout>
  4. cp -R ./ /opt/docstore/solr

The directories for the Solr are now created and the requisite files copied.

Repository.xml Creation

The document store depends on a repository.xml file for configuration. To create the repository.xml and copy the file to the appropriate directory do the following steps

  1. cd <local working directory for DocumentStore checkout>/documentstore-webapp
  2. Modify the repository-dist.properties file. The following entries need to be modified with the values from the schema created for the docstore.
    1. repository.datasource.url=jdbc:oracle:thin:@<Docstore Oracle Hostname>:<port>:<SID>
    2. repository.datasource.username=<username for schema created for the Docstore>
    3. repository.datasource.password=<password>
  3. ant build-repo-config-dist
  4. cp repository.xml /opt/docstore This is the location specified in the Tomcat JAVA_OPTS.

Build and Copy Docstore War File

From the <local working directory for DocumentStore checkout> enter the command:

mvn -Dmaven.test.skip=true package

This will create <local working directory DocumentStore checkout>/documentstore-webapp/target/documentstore-webapp.war

copy this warfile to your Tomcat webapps directory

Build and Copy Docsearch War File

From the <local working directory for OLE-docsearch checkout> enter the command:

ant war

This will create <local working directory for DocumentStore checkout>dist/ole-docsearch.war

copy this warfile to your Tomcat webapps directory

Change Ownership of /opt/docstore Directory

If the software was installed as root, the ownership of the /opt/docstore directory needs to be changed to be owned by the tomcat user.  Example would be:

chown -R tomcat:tomcat /opt/docstore

Start Tomcat Server

Start your local Tomcat server.  During the initial start up process, the docstore application will create the necessary tables in the docstore schema.

Operated as a Community Resource by the Open Library Foundation