Skip to content

upenn-libraries/sdbmss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SDBM -- Schoenberg Database of Manuscripts

This is the Rails / Blacklight application for the Schoenberg Database of Manuscripts.

Developing

Working with the Vagrant environment

In order to use the integrated development environment you will need to install Vagrant [do not use the Vagrant version that may be available for your distro repository - explicitly follow instructions at the Vagrant homepage] and the appropriate virtualization software. If you are running Linux or Mac x86 then install VirtualBox, if you are using a Mac with ARM processors then install Parallels.

You may need to update the VirtualBox configuration for the creation of a host-only network. This can be done by creating a file /etc/vbox/networks.conf containing:

* 10.0.0.0/8

Vagrant Services

  1. The SDBM Rails app
  2. Solr
  3. MySQL
  4. RabbitMQ -- queue for Jena updates
  5. Jena Fuseki -- RDF/SPARQL server
  6. Delayed Job -- background job processing (Rails image)
  7. Interface -- service for updating Jena (listens to RabbitMQ queue)
  8. Nginx -- reverse proxy

Starting

From the vagrant directory run:

if running with Virtualbox:

vagrant up --provision

if running with Parallels:

vagrant up --provider=parallels --provision

This will run the vagrant/Vagrantfile which will bring up an Ubuntu VM and run the Ansible script which will provision a single node Docker Swarm behind nginx with a self-signed certificate to mimic a load balancer. Your hosts file will be modified; the domain sdbm-dev.library.upenn.edu will be added and mapped to the Ubuntu VM. Once the Ansible script has completed and the Docker Swarm is deployed you can access the application by navigating to https://sdbm-dev.library.upenn.edu/.

Stopping

To stop the development environment, from the vagrant directory run:

vagrant halt

Destroying

To destroy the development environment, from the vagrant directory run:

vagrant destroy -f

SSH

You may ssh into the Vagrant VM by running:

vagrant ssh

Interacting with the Rails Application

Once your vagrant environment is set up you can ssh into the vagrant box to interact with the application:

  1. Enter the Vagrant VM by running vagrant ssh in the /vagrant directory
  2. Start a shell in the sdbm container:
docker exec -it $(docker ps -q -f name="sdbmss_app") sh

To exit the shell:

exit

To further exit the vagrant environment:

exit

First-time setup

There are number of initial setup steps required to run this SDBM that are handled by a bash script setup.sh stored in the rails_app/dev folder and run from the vagrant environment. The setup script does the following:

  1. Copy static assets into the Rails app
  2. Load the database
  3. Set up Solr
  4. Index the database in Solr
  5. Set up Jena

First get the SDBM data files from the SDBM Data folder on SharePoint (by permission only):

  • sdbm_data.tgz (120MB)
  • sdbm.sql.gz (33MB)

Copy the files to the development environment

Download the files and copy them to the sdbmss/rails_app/dev directory. Then run the vagrant environment:

vagrant ssh

The files that you put in the dev directory will be automatically copied over to a directory in the docker shell. Make sure you see the files there:

ls /sdbmss/rails_app/dev/

To perform these setup actions, first navigate to the dev folder within the vagrant environment, and then run the bash script. This should take about 5 minutes.

vagrant ssh # if needed
cd /sdbmss/rails_app/dev
bash setup.sh

Check Jena log

When the setup script is finished running, check the Jena log to see if the service starts correctly:

docker service logs sdbmss_jena --since 5m -f

The log should look something like the output below:

sdbmss_jena.1.c08kinpat2hp@sdbm-manager    | Waiting for Fuseki to finish starting up...
sdbmss_jena.1.c08kinpat2hp@sdbm-manager    | [2025-10-06 18:04:55] Server     INFO  Apache Jena Fuseki 3.14.0
sdbmss_jena.1.c08kinpat2hp@sdbm-manager    | [2025-10-06 18:04:55] Config     INFO  FUSEKI_HOME=/jena-fuseki
sdbmss_jena.1.c08kinpat2hp@sdbm-manager    | [2025-10-06 18:04:55] Config     INFO  FUSEKI_BASE=/fuseki
sdbmss_jena.1.c08kinpat2hp@sdbm-manager    | [2025-10-06 18:04:55] Config     INFO  Shiro file: file:///fuseki/shiro.ini
sdbmss_jena.1.c08kinpat2hp@sdbm-manager    | [2025-10-06 18:04:55] Config     INFO  Configuration file: /fuseki/config.ttl
sdbmss_jena.1.c08kinpat2hp@sdbm-manager    | [2025-10-06 18:04:55] Config     INFO  Load configuration: file:///fuseki/configuration/sdbm.ttl
sdbmss_jena.1.c08kinpat2hp@sdbm-manager    | [2025-10-06 18:04:55] Config     INFO  Register: /sdbm
sdbmss_jena.1.c08kinpat2hp@sdbm-manager    | [2025-10-06 18:04:55] Server     INFO  Started 2025/10/06 18:04:55 UTC on port 3030
sdbmss_jena.1.c08kinpat2hp@sdbm-manager    | Fuseki is available :-)

About

Schoenberg Database of Manuscripts, on Rails/Blacklight

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 9