1. Preparing for installation
    1. Requirements
    2. Downloading the source code
    3. Building necessary components
  2. Installation
    1. Install canary-tools
    2. Adding a cron-tab for canary-tools
  3. Testing canary-tools

Preparing for installation


    1. Subversion client
    2. Sun Java Development Kit (JDK) 1.5.0+
    3. PHP 5.1.6+
      1. SSL support required
    4. eCAS-backend 0.5.0+ installed
    5. SSL certificate for canary.hosting.genelogics installed within JDK keystore

    Downloading the source code


    1. Navigate to a directory of your choosing, such as /usr/local/src
      1. cd /usr/local/src
    2. Check out the canary-tools code
      1. svn co http://tumor.jpl.nasa.gov/repo/edrn/canary/trunk canary-tools


    Install canary-tools

    1. Navigate to the directory where you checked out the canary-tools codebase
      1. cd /usr/local/src/canary-tools
    2. Build and deploy canary-tools to the target destination. NOTE: by default, canary-tools will deploy to /usr/local/canary-tools - you can change to default install directory by opening up the pom.xml, and changing <install.directory>
      1. mvn install
    3. Open canary_sync.sh script and ensure the following environment variables are set within the script.  NOTE: for cron to be able to run the script properly, all environment variables must be FULLY specified to absolute paths. Cron will not know any user-defined environment variables, so you must defined the below environment variables explicitly without referencing other environment variables.
      1. vi /usr/local/canary-tools/canary_sync.sh
      1. JAVA_HOME = <path to your JDK directory or JAVA_HOME>
      2. PHP_HOME = <path to your PHP installation directory>
      3. PATH = <should include JAVA_HOME/bin in your PATH>
      4. CRAWLER_HOME = <path to the ecas crawler installation directory>
      5. CANARY_TOOLS_HOME = <path to the canary-tools directory>
      6. FILEMGR_URL = <url to the ecas file-manager>
      7. DATA_INGEST_DIR = <path to ecas data ingest directory for canary>

    Adding a cron-tab for canary-tools

    1. Edit your crontab file (ensure you are the correct user)
      1. crontab -e
    2. Add an entry for canary sync to be run monthly. NOTE: each invocation of the script will generate a log file within canary-tools/logs
      1. @monthly bash -c "/usr/local/canary-tools/canary_sync.sh &> /usr/local/canary-tools/logs/`date +\%Y-\%m-\%d`.log"

    Testing canary-tools

    1. Take a screen-shot of the current eCAS filemanager contents
      1. On tumor.jpl.nasa.gov, navigate to the URL: http://tumor.jpl.nasa.gov:8080/fmbrowser
      2. Take a screen shot of the current list of product-types and their respective number of products
    2. Run the canary auto-sync script. NOTE: this process takes a long time, so you may want to run it within a tool like screen
      1. cd /usr/local/canary-tools
    3. After canary_sync finishes executing, take another screen-shot of the eCAS filemanager contents, and compare and contrast. Note, you should either see zero, or more product types with associated zero, or more products