Giter Site home page Giter Site logo

mohideen / arclight-prototype Goto Github PK

View Code? Open in Web Editor NEW

This project forked from umd-lib/arclight-prototype

0.0 2.0 0.0 99 KB

Prototype ArcLight Rails application

Dockerfile 0.46% Ruby 65.73% JavaScript 1.47% CSS 0.82% HTML 8.69% Shell 1.30% XSLT 21.52%

arclight-prototype's Introduction

ArcLight Prototype Application

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.

Running in Vagrant

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]:umd-lib/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

Running in Docker

Clone the repo

git clone [email protected]:umd-lib/arclight-prototype.git
cd arclight-prototype

Setup Solr

# Download the solr zip to `dist` directory with name `solr.zip`
curl -o dist/solr.zip http://lib-solr-mirror.princeton.edu/dist/lucene/solr/7.5.0/solr-7.5.0.zip

# Setup
bundle install
solr_wrapper -v --config .solr_wrapper.yml --solr_zip_path dist/solr.zip  --instance_directory solr/instance --persist

Build the Docker image:

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.

Application URLs

For both the Vagrant and Docker methods of running this application, the default URLs are:

Loading Sample Data

The following are derived from the https://github.com/sul-dlss/arclight/wiki/Indexing-EAD-in-ArcLight

Vagrant

  1. In the "arclight-prototype" directory on the host machine, create an "eads" directory:
mkdir eads
  1. Copy any EAD files into the "eads" directory.

  2. SSH into the Vagrant machine:

vagrant ssh
  1. Switch the the "/vagrant" directory:
cd /vagrant
  1. 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

Docker

  1. On the host, access the terminal in the Docker container:
docker exec -it arclight /bin/bash
  1. Create an "eads" directory:
mkdir eads
  1. In a separate terminal, copy EAD files into a running Docker container, use:
docker cp <EAD FILE> arclight:/home/arclight/eads

This will copy the file from the host to the ~/eads.

  1. 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

arclight-prototype's People

Contributors

brialparker avatar dsteelma-umd avatar mohideen avatar notmarian avatar peichman-umd avatar wallberg avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.