sciencehistory / chf-sufia

sufia-based hydra app
Other
9 stars 4 forks source link

README

Build Status

Description

The Sufia-based application powering the Science History Institute's digital collections site at https://digital.sciencehistory.org

Dependencies

All system setup for development and production machines is managed and documented via ansible playbooks that use the roles defined in https://github.com/curationexperts/ansible-hydra.

Development

One way to do development might be to set up a ubuntu VM and use the ansible scripts. But these are instructions for setting it up on an OSX dev box, without a VM.

Load default Workflow and add default Admin Set

After Fedora and Solr are running, load the default workflow and create the default administrative set. Both of these need to be run any time the app is deployed to a new environment:

rake curation_concerns:workflow:load
rake sufia:default_admin_set:create

Create sample data

Running tests locally

You also need a hydra and a fedora server running to run tests. You can:

Other docs

See docs subdir.

Deployment

bundle exec cap [target machine] deploy

See more at: https://chemheritage.atlassian.net/wiki/spaces/HDCSD/pages/5668869/Deployment+Capistrano

Maintenance mode

Maintenance mode makes the entire app unavailable.

bundle exec cap staging maintenance:enable REASON="a test of maintenance mode" UNTIL="12pm Eastern Time"

bundle exec cap staging maintenance:disable

Remote rake tasks

Run a rake task with downtime:

TASK=chf:data_fix:library_division REASON="testing things" UNTIL="12pm Eastern Time" bundle exec cap staging invoke:rake:with_maintenance

Will turn maint mode on for you, run task, turn it back off -- even if task fails. If you want to leave it on if task fails, SAFE_MAINT=false.

Or to just run a rake task on a remote server without maint mode:

cap staging invoke:rake TASK=chf:data_fix:whatever

Run Tests

bundle exec rspec

Run tests continuously using Guard

bundle exec guard -p -l 10