This is the Rails / Blacklight application for the Schoenberg Database of Manuscripts.
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
- The SDBM Rails app
- Solr
- MySQL
- RabbitMQ -- queue for Jena updates
- Jena Fuseki -- RDF/SPARQL server
- Delayed Job -- background job processing (Rails image)
- Interface -- service for updating Jena (listens to RabbitMQ queue)
- Nginx -- reverse proxy
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/.
To stop the development environment, from the vagrant directory run:
vagrant halt
To destroy the development environment, from the vagrant directory run:
vagrant destroy -f
You may ssh into the Vagrant VM by running:
vagrant ssh
Once your vagrant environment is set up you can ssh into the vagrant box to interact with the application:
- Enter the Vagrant VM by running
vagrant sshin the/vagrantdirectory - Start a shell in the
sdbmcontainer:
docker exec -it $(docker ps -q -f name="sdbmss_app") sh
To exit the shell:
exit
To further exit the vagrant environment:
exit
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:
- Copy static assets into the Rails app
- Load the database
- Set up Solr
- Index the database in Solr
- 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)
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.shWhen 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 :-)