Difference between revisions of "GOlr: Installation"
|Line 24:||Line 24:|
To your ~/.bashrc.
To your ~/.bashrc.
Revision as of 19:41, 20 April 2015
These instructions are intended to illustrate how to install the GOlr server software for AmiGO 2 on a Ubuntu 12.04 LTS Desktop. With careful reading, these instructions should be generalizable to other cases.
The following packages are required:
- openjdk-6-jdk (although be believe Java 7 might be an option for OWLTools)
Jetty will need to be setup to start and listen to an external address if you want.
Also, you will need a version of Maven 3 (mvn) to use and build OWLTools if you are trying to load data or produce a schema--the one in Ubuntu for 12.04 is stuck at Maven 2 and not compatible. It is a fairly simple process to download it and make sure that it is in your path.
mkdir -p ~/local/src/java cd ~/local/src/java wget http://apache.cs.utah.edu/maven/maven-3/3.0.4/binaries/apache-maven-3.0.4-bin.tar.gz tar -zxvf apache-maven-3.0.4-bin.tar.gz
Now just make sure that either ~/local/src/java/apache-maven-3.0.4/bin is in your path or explicitly call ~/local/src/java/apache-maven-3.0.4/bin/mvn each time. You'll probably want to add something like:
To your ~/.bashrc.
Also, the default shell limit for maximum user processes may be too small to build OWL tools. In particular, on Ubuntu 14.04, this value is set to 1024. It may be necessary to raise this limit by adding the following line to your .bashrc file:
ulimit -u unlimited
First, we need to download and build OWLTools--it contains the loader code that GO uses for ontology and GAF files, as well as the tools to generate a new Solr schema from AmiGO 2 YAML config files. The code should be self-sufficient and easy to build on a machine with an internet connection.
Please keep in mind that there is really no requirement to use these tools to load a Solr instance for use with AmiGO 2--as long as the meta-information exists and the Solr schema is compliant, anything should work. However, it is recommended that you at least get used to the data workflow with these tools before heading out on your own.
mkdir -p ~/local/src/svn cd ~/local/src/svn svn checkout http://owltools.googlecode.com/svn/trunk/ owltools
cd ~/local/srv/svn/owltools/OWLTools-Parent/ && mvn clean package
Or, without unit tests (much quicker):
cd ~/local/src/svn/owltools/OWLTools-Parent/ && mvn clean package -DskipTests
The owltools binary should now be built, so you'll probably want to add it to your path by adding the following to your ~/.bashrc:
Solr with the GO Solr schema (GOlr)
The "Ubuntu" way
While we have Jetty installed from the Ubuntu repos, we have our own Solr (3.6, the one that comes with Ubuntu 12.04 is ancient) in the GOlr repo. Let's get that first and look at it; even if we don't use the GOlr repo's supplied schema.xml, some of the information in there can be helpful. All GOlr source is in the AmiGO 2 git repo: amigo/golr. If you have not already done so, get the AmiGO 2 repo.
mkdir -p ~/local/src/git cd ~/local/src/git git clone git://github.com/kltm/amigo.git cd amigo/golr
While we can install/handle our Jetty/Solr setup with the Makefile found in this directory, you may find it easier to just look at it and develop your own setup.
The solr.war for Jetty is at:
Deploy this with the make command:
The heavy rollout lifting is done by the emacs script tools/golr.el.
Of course, it's important to remember that the most important end product of this section is to be using a correctly organized schema.xml file in a Solr 3.6 setup. However you accomplish that is fine. For example, the schema.xml file used by GO can be found at:
Alternatively, you can generate a custom one by making sure that OWLTools is in the right place (check your environment and the Makefile) and running:
Also, the solrconfig.xml file in ~/local/src/git/amigo/golr/solr/conf/ might be also be useful in your setup.
The fast-and-dirty(-but-always-works) way
Instead of running Solr in a separate Jetty (or Tomcat) server, an alternative is to get a standalone embedded instance of Solr running.
- Download the latest Solr 3.6.x and unzip the archive in the desired folder.
- In the unpacked archive, delete everything under the folder apache-solr-3.6.2/example/solr/conf and copy over the GOlr config files (schema.xml and solrconfig.xml) from amigo/golr/solr/conf/.
- Finally start Solr from the folder apache-solr-3.6.2/example with:
java -jar start.jar
Loading the data
More memory is always welcome, but less is probably sufficient. The PANTHER section needs some special care. If you leave the PANTHER flags in the Makefile as they are now, you will need to make sure that they are there. Without checking out the whole (very large) tree, as a GOC member:
cd ~/local/src/svn svn checkout svn+ssh://firstname.lastname@example.org/share/go/svn/trunk/experimental/trees/panther_data panther_data mkdir -p ~/local/src/svn/geneontology.org/trunk/experimental/trees/ mv panther_data ~/local/src/svn/geneontology.org/trunk/experimental/trees/
Or something similar--you just need the tree data in the right spot. These are optional and can be left out entirely if you don't need it.
As an example, we will use the Makefile profile to do a standard load:
And that should be it.
Remember that if you are using a caching server on the frontend that you will need to purge the caches.
All Glory to the Makefile (Important!)
For some time now, all day-to-day development, handling, distribution, and loading of AmiGO_2 and GOlr have been handled with the Makefiles in amigo/Makefile and amigo/golr/Makefile respectively. If it cannot be done by changing your environment variables and rerunning the target that you want, you might want to reconsider what you're doing. For example, a quick Solr optimize at a different URL with a lower amount of memory might look like:
OWLTOOLS_MAX_MEMORY=5G SOLR_URL=http://localhost:9000/solr/ make load-optimize
While the Makefiles are not yet fully documented (will add them to our NaturalDocs real soon now), they may be worth perusing. This is issue: https://github.com/kltm/amigo/issues/26