This Project is currently in active development
Rails(~> 7.0) engine that sets up the basic data elements and routes for a more data driven JSON API for digital repositories. Implements ActiveStorage for Cloud or local storage for files. Currently all data models have been created with basic routes and json serializers
AdapterBase
class to build extended functionality for the following
Ensure you have the following installed on your development machine
Postgresql ~9.6(v 12 stable is recommended)
Redis
Imagemagick
Ruby >= 3.1
Clone Project
Run bundle install
Setup development dependencies(See the Running guide below)
Check spec/internal/config/database.yml
and make sure your postgres
credentials are correct.
cd
into the spec/internal
directory and:
$ rails curator:setup
-- this will run the database setup scripts for you$ rails generate curator:install
(optional) -- this will add an initializer for customizing Curator.config
settingsCurator requires several additional services:
To set up these services:
ENV
variables (AUTHORITY_API_URL
, SOLR_URL
, AVI_PROCESSOR_API_URL
, INGEST_SOURCE_DIRECTORY
). You can set
these using the spec/internal/.env.#{RAILS_ENV}.sample
files. For development copy/rename the spec/internal/.env.development.sample
to spec/internal/.env
OR spec/internal/.env.development
. You are also required to create an .env
and set the variables listed in the .env.docker.sample
file in the root of curator. These are required to start the docker containersdocker-compose up
This will run docker images of the ark_manager
, bpldc_authority_api
, azurite
as well as internal shared postgres
and redis
containers. On start the ark-manager
and bpldc_authority_api
apps will run bundle exec rails db:prepare
which will wither run pending migrations OR run rails db:setup
. NOTE the postgres container is NOT exposed to the host machine so you will need to run a local instance of postgres for the curator app itself.--connection-string
param. See the Configure Connection String guide to troubleshoot problems you may have.:
az storage container exists --name 'primary' --connection-string 'UseDevelopmentStorage=true'
az storage container exists --name 'derivatives' --connection-string 'UseDevelopmentStorage=true'
{exist: false}
run the following two commands:
az storage container create -n primary --connection-string "UseDevelopmentStorage=true" --public-access off
az storage container create -n derivatives --connection-string "UseDevelopmentStorage=true" --public-access container
4 In the Curator project, start Solr using the following command (see solr_wrapper for more documentation):
$ cd ./spec/internal && solr_wrapper
(development)$ solr_wrapper
(test)Any Input/ Suggestions are appreciated as we develop this. Please contact Ben or Eben.
Solr needs to be running before specs can be run.
Prior to starting Solr, create config directory (only needs to be run once):
# populates spec/internal/solr/conf
$ git submodule init
$ git submodule update --remote
To start Solr in Test mode (use a separate console session):
$ cd spec/internal
$ solr_wrapper --config .solr_wrapper_test
Run the specs:
$ bundle exec rake spec
Special thank you to the Samvera community and Jonathan Rochkind for providing this project with gems and code samples to develop this.
The gem is available as open source under the terms of the MIT License.