curationexperts / goldenseal

WUSTL hydra repo
http://www.curationexperts.com
Other
2 stars 4 forks source link

Goldenseal -- Hydrastis canadensis

Build Status

Development Installation

Prerequisites:

Setup:

bin/setup
rake jetty:clean
rake curation_concerns:jetty:config
rake jetty:start

Config:

Background Jobs

To start the redis server:

redis-server /usr/local/etc/redis.conf

To see the status of recent jobs in the browser console:

resque-web -N curation_concerns:development

To start worker(s) to run the jobs:

QUEUE=* VERBOSE=1 rake resque:work

Run the test suite

Run the rails server

Production Installation

We recommend using Ansible to create production instances of Goldenseal. Download https://github.com/acozine/sufia-centos/releases/tag/0.1 and symlink the roles subdirectory of the sufia-centos code into the ansible subudirectory of the Goldenseal code:

sudo ln -s /path/to/sufia-centos/roles /path/to/goldenseal/ansible/roles

Review/modify ansible/ansible_vars.yml. If you're not creating your server on EC2, comment out the launch_ec2 and ec2 roles in ansible/ansible-ec2.yml, boot your server, add your public key to the centos user's authorized_keys file, add a disk at /opt if desired, then run the ansible scripts with:

ansible-playbook ansible/ansible-ec2.yml --private-key=/path/to/private/half/of/your/key

Versions:

We have tested Goldenseal with the following versions of its dependencies:

Importing Records

Importing records with TEI or VRA files

TEI files can be parsed to create Audio, Video, or Text records. VRA records can be parsed to produce Image records. The instructions are basically the same either way.

script/import -t TYPE -p PATH -v [VISIBILITY] -a [ADMIN_SET_ID]
Argument Description Requirement
-t The type of record(s) to create. Valid options are: ["Text", "Video", "Audio", "Image"]. required
-p The path to the directory where the TEI or VRA files are located. required
-v The visibility level that the imported records will have. Valid options are: ["open", "institution", "private"]. Default value will be "private" if no option is given. optional
-a The ID for the AdminSet that the imported records will belong to. If no option is given, the imported records will not belong to any AdminSet. optional
-h Help: Print usage message for this script optional

Note: The TEI files must be at the top level of the directory and must have a .xml file extension. The importer will assume that any XML files found in the top-level directory are TEI files, and try to parse them. The same is true for VRA records.

Note: Visibility cannot be set to embargo or lease using this script. If you want to create a record with an embargo or lease, please import the record with private visibility, then edit the record using the UI to set the embargo manually.

To see the list of IDs for all AdminSets, run the rake task:

rake admin_set:list

File System Cleanup

tmp/uploads under Rails root dir

The tmp/uploads directory is where uploaded files are temporarily stored before they are ingested into fedora. This directory will continue to grow forever, so we recommend that you write a cron job to periodically clean it out and/or set up disk space monitoring.

You must be sure that all the background jobs have finished using the files before you delete them, so rather than deleting everything under tmp/uploads, we recommend that you only delete files and directories that are more than a few days old.

For a little more background see story #199