Skip to content

APTrust's third-generation registry, replacing Pharos

License

Notifications You must be signed in to change notification settings

APTrust/registry

Repository files navigation

Registry

APTrust's registry contains metadata about the millions of items we hold on behalf of our depositors in preservation storage. The registry provides web-based and API-based access to the metadata and to information about items currently undergoing ingest and restoration.

This will be the third-generation of our registry software, based on the Gin Web Framework. It will replace our existing Rails application, Pharos, which suffers from performance and maintability problems, which are discussed in more detail in these notes.

Requirements

To run the registry on your local dev machine, you will need the following for ALL operations:

You will also need the following for some Admin operations:

  • Redis 5.07 or higher
  • NSQ version 1.20 or higher

Database Setup

Run the following commands in postgres to create the user and databases:

create user dev_user with password 'password';

create database apt_registry_development owner dev_user;
create database apt_registry_integration owner dev_user;
create database apt_registry_test owner dev_user;

-- This lets dev_user load data from csv files into tables.
-- Required for running tests.
grant pg_read_server_files to dev_user;

Now load the schema into the dev database:

psql -U dev_user -d apt_registry_development -a -f db/schema.sql

If you want more data in your dev DB, we have a copy of the staging database in an undisclosed location.

DBeaver is an excellent free GUI tool for interacting with the database.

Running

APT_ENV=dev go run registry.go

You can change APT_ENV to test if you want to run against the test database, but note that the test DB is regenerated every time we run the test suite.

Testing

APT_ENV=test go test ./...

About

APTrust's third-generation registry, replacing Pharos

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published