Skip to content

Latest commit

 

History

History
118 lines (84 loc) · 4.47 KB

README.md

File metadata and controls

118 lines (84 loc) · 4.47 KB

DAMSPAS-RD

"Frankly, my dear, I don't GIVE A DAMS!"

R&D project for a future DAMS5. A digital collections application for the UC San Diego Library built using the Hydra framework, specifically using the Hyrax front-end, and the Fedora Repository.

Coverage Status Dependency Status

Prerequisites

The following software are required:

  1. Solr
  2. Fedora Commons digital repository
  3. A SQL RDBMS (MySQL, PostgreSQL), though note that SQLite will be used by default if you're looking to get up and running quickly.
  4. Redis, a key-value store. The redlock gem requires Redis >= 2.6.
  5. ImageMagick with JPEG-2000 support.
  6. LibreOffice
  7. FITS version 0.8.5.
  8. FFMPEG

Please visit Curation Concerns for installation guide.

Check out DAMSPAS from GIT

  1. Clone Project: git clone https://github.com/ucsdlib/damspas-rd
  2. Open Project: cd damspas-rd
  3. Install gems: bundle install
  4. Update DB: bundle exec rake db:migrate
  5. Edit config/browse_everything_providers.yml file_system home for server side files ingest.

Start Redis

redis-server

Running Tests

# Start the test servers
rake hydra:test_server

Or do it in the following steps:

solr_wrapper -p 8985 -d solr/config/ --collection_name hydra-test

# in another window
fcrepo_wrapper -p 8986 --no-jms
# run the test suits
bundle exec rake spec

Running damspas-rd (demo only)

rake hydra:server

Or do it in the following steps:

solr_wrapper -p 8983 -d solr/config/ --collection_name hydra-development

# in another window
fcrepo_wrapper -p 8984 --no-jms

# and in another window
rails s

Go to http://localhost:3000/ and register to start

Start Sidekiq in another window

bundle exec sidekiq

Adding an admin role to the last user

rake add_admin_role

Import Local Authority records for control values

bin/import-authorities

Create an admin set to start ingest

rake hyrax:default_admin_set:create

Deployment

Deployment is handled via ansible, allows rollback and can be used to provision new machines

./bin/deploy production 
./bin/rollback production 

Provisioning and testing of provisioning

The following 4 scripts are provided to make server maintanence easier. Each can be run in both production and development mode (see note about development).

./bin/deploy - Deploy a release to the servers. Can be production or development ./bin/provision - Run the configuration script, which will attempt to install and configure all software. Configuration is idempotent, so running it on a configured server is acceptable. Can be run in production or development ./bin/cleanup - development only. This script closes down the docker images used by the scripts to test provisioning ./bin/rollback - Roll back the last deploy. Can be production or development

Development environment for ansible scripts

In order to facilitate development and modification of the ansible scripts, a development config has been established. This requires Docker be running on the dev machine and that the proper docker python packages are installed. If using ansible >= 2.4 install python packages with "pip install docker docker-compose". For older versions of ansible "pip install docker-py". Please note that docker-py and docker-compose Python packages do not get along.

If you run in to problems with systemd (specifically hanging process starts or restarts) then you may need to update the docker image. Systemd upgrades can not be done on the fly in a running docker instance, see: geerlingguy/ansible-role-security#21 To do an update run "docker rmi notch8/systemd" then run the ./bin/provision development as normal. This will clear your existing containers. Note that all containers must be stopped to do this, so you may want to run ./bin/cleanup development first.