1. Introduction
  2. Preparing for installation
    1. Set up your environment
    2. Downloading the source code
    3. (Optional) Close running services if upgrading labcas-backend
    4. (Optional) Remove existing legacy JARs from labcas-backend CAS components
  3. Installation
    1. Build and install
  4. Initiating the LabCAS-backend
  5. Test LabCAS-backend
    1. Crawl and ingest new products into LabCAS CAS-FileManager



This deployment guide will help you build, install, configure, and run the below components. All of these components together, constitute "LabCAS backend".

  1. core
    1. File Manager
    2. Crawler
    3. Tomcat server + webapps
    4. Misc. scripts, environment variables, and directories to support the above items
  2. webapp
    1. crawlerinvoker webapplication - a webapp allowing invocation of the LabCAS crawling process over REST
    2. curator webapplication - a customized OODT Curator web-application for LabCAS needs
  3. solr

Preparing for installation

Set up your environment

  1. Ensure there is a deployment directory for LabCAS backend
      mkdir /usr/local/labcas
  2. Ensure there is a LabCAS staging-area for products set up
      mkdir /data/staging
  3. Ensure there is a LabCAS archive-area for products set up
      mkdir /data/archive
  4. Ensure the following environment variables have been set up for all users. NOTE: we've used the method of setting up env vars for all users upon login within /etc/profile.d/labcas.sh, you are free to use your own implementation however
      echo "export LABCAS_HOME=/usr/local/labcas" >> /etc/profile.d/labcas.sh
      echo "export LABCAS_STAGING_HOME=/data/staging" >> /etc/profile.d/labcas.sh
      echo "export LABCAS_ARCHIVE_HOME=/data/archive" >> /etc/profile.d/labcas.sh
      echo "export LABCAS_FM_URL=http://localhost:9000" >> /etc/profile.d/labcas.sh
      echo "export LABCAS_SOLR_URL=http://localhost:8081/solr" >> /etc/profile.d/labcas.sh

Downloading the source code


  1. Navigate to a directory where you will place the labcas-backend codebase, such as ~/src. If this directory does not exist, feel free to create it
    1. cd ~/src
  2. Check out the LabCAS-backend code from revision control. NOTE: the latest code from the trunk is shown below, but you would most likely want to check out a specific tagged version
    1. svn export http://tumor.jpl.nasa.gov/repo/edrn/labcas/backend/trunk labcas-backend

    (Optional) Close running services if upgrading labcas-backend

    1. Shut down all LabCAS-backend services
      1. cd $LABCAS_HOME; ./stop.sh

      (Optional) Remove existing legacy JARs from labcas-backend CAS components

      1. Remove existing labcas-backend JARs from deployment directories
        1. rm $LABCAS_HOME/filemgr/lib/labcas-backend-*.jar; 
          rm $LABCAS_HOME/crawler/lib/labcas-backend-*.jar;


      Building and install

      1. Navigate to the labcas-backend code directory
        1. cd ~/src/labcas-backend
      1. Build and Install the LabCAS-backend.
        1. NOTE: This step will build and install all required components to $LABCAS_HOME, so ensure this environment variable is set!
        2. NOTE: LabCAS-backend v0.4.2 depends on OODT 0.5. Currently this version of OODT is tagged but not yet released, so please build and install this tagged version of OODT prior to installing LabCAS-backend
        3. NOTE: A customized version of OODT FM is required, thus you will need to install the JAR
          1. mvn install:install-file -DgroupId=org.apache.oodt -DartifactId=cas-filemgr-dynamic-datasets-labcas-0.7-SNAPSHOT -Dversion=0.7-SNAPSHOT -Dpackaging=jar -Dfile=core/src/main/conf/filemgr/dist/cas-filemgr-dynamic-datasets-labcas-0.7-SNAPSHOT.jar
          mvn install

          Initiating the LabCAS-backend

          Turn on LabCAS-backend services

            cd $LABCAS_HOME

          Start Tomcat service separately:

          On host labcas.jpl.nasa.gov you MUST start Tomcat as user 'apache' on your own via /usr/local/proteome/labcas/tomcat/bin/startup.sh

          Test LabCAS backend

          Crawl and ingest new products into LabCAS CAS-FileManager

          1. (Optional) Ensure valid dataset directories containing products are available under $LABCAS_STAGING_HOME. Specifically, this means the following hold true:
            1. One or more directories are located within $LABCAS_STAGING_HOME
            2. Within each of the directories in (1), a dataset metadata file describing the dataset-level metadata for staged products is located within the directory. Additionally, this metadata file has the SAME name as the name of the directory (ie. directory-path=/data/staging/DATASET-001 and metadata-file-path=/data/staging/DATASET-001/DATASET-001.xml)
            3. Products are available within each of the directories in (2)
          2. Navigate to LabCAS crawler
            1. cd $LABCAS_HOME/crawler/bin
          3. Launch the crawler to crawl and ingest new products within the staging-area. Dataset ID is optional, but can point to a specific directory within your staging area to crawl.
            1. ./crawl_labcas_staging_area.sh [DATASET_ID]