This repository contains a minimal ArcLight Rails application. It was created using the Arclight generator, as described in Getting started: creating a new ArcLight app.
Note: We've had issues with running the Vagrant on Mac OS X. The VirtualBox version appears to be critical. The following versions are believed to work:
- Mac OS X (Mojave): VirtualBox v5.2.22
- Mac OS X (High Sierra): VirtualBox 5.1.30
Clone the repo and start up the Vagrant box:
git clone [email protected]:peichman-umd/arclight-prototype.git
cd arclight-prototype
vagrant up
Start Solr:
vagrant ssh
cd /vagrant
solr_wrapper --version 7.3.0
In a separate terminal, start the ArcLight Rails app:
vagrant ssh
cd /vagrant
rails s
Clone the repo and build the Docker image:
git clone [email protected]:peichman-umd/arclight-prototype.git
cd arclight-prototype
docker build . -t arclight
Start a Docker container from this image:
docker run --rm -p 3000:3000 -p 8983:8983 --name arclight -it arclight
To connect to the running container and start a bash session:
docker exec -it arclight /bin/bash
It may also be helpful to connect via a Rails console:
docker exec -it arclight rails c
Note: There is currently no persistence of data from one container to another.
That is, every time you run docker run
it will create a fresh, empty Solr core.
For both the Vagrant and Docker methods of running this application, the default URLs are:
- Solr: http://localhost:8983
- ArcLight App: http://localhost:3000
The following are derived from the https://github.com/sul-dlss/arclight/wiki/Indexing-EAD-in-ArcLight
- In the "arclight-prototype" directory on the host machine, create an "eads" directory:
mkdir eads
-
Copy any EAD files into the "eads" directory.
-
SSH into the Vagrant machine:
vagrant ssh
- Switch the the "/vagrant" directory:
cd /vagrant
- Run the following command to load the file:
FILE=./eads/<EAD_FILE_NAME> REPOSITORY_ID=<REPO_ID> bundle exec rake arclight:index
where <EAD_FILE_NAME> is the name of the file, and <REPO_ID> is the name of the repositort from the "config/repositories.yml" file:
For example, to load the EAD file "0037.LIT_20181213_170001_UTC__ead.xml" into the "umd" repository, command would be:
FILE=./eads/0037.LIT_20181213_170001_UTC__ead.xml REPOSITORY_ID=umd bundle exec rake arclight:index
- On the host, access the terminal in the Docker container:
docker exec -it arclight /bin/bash
- Create an "eads" directory:
mkdir eads
- In a separate terminal, copy EAD files into a running Docker container, use:
docker cp <EAD FILE> arclight:~/eads
This will copy the file from the host to the ~/eads.
- In the Docker container terminal, run the following command to load the file:
FILE=./eads/<EAD_FILE_NAME> REPOSITORY_ID=<REPO_ID> bundle exec rake arclight:index
where <EAD_FILE_NAME> is the name of the file, and <REPO_ID> is the name of the repository from the "config/repositories.yml" file:
For example, to load the EAD file "0037.LIT_20181213_170001_UTC__ead.xml" into the "umd" repository, command would be:
FILE=./eads/0037.LIT_20181213_170001_UTC__ead.xml REPOSITORY_ID=umd bundle exec rake arclight:index