dcdiana / open-doors-temp-site

Temporary import sites for semi-automated Open Doors imports

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Open Doors Temp Site

Temporary import sites for semi-automated Open Doors imports.

Overview

The Open Doors project is dedicated to preserving at-risk fanworks. Part of that work involves importing works into Archive of Our Own from external archives which are being closed down.

Due to the variety of formats in external websites, some of which are completely incompatible with Archive of Our Own's importing process, some archives are imported using a semi-automated process involving two technical stages after the initial Open Doors processes:

  1. The metadata and works are extracted from a backup of the old archive and converted into standardised MySQL tables (see Open Doors Code which houses the scripts used for this stage)
  2. The standardised data is hosted in a temporary website accessible to import operators and which allows them to perform the import in stages, verifying imported works as they go along. This repository houses the Rails application used to create those sites.

Running it locally

Requirements:

  • Ruby 2.2.5 (this will be kept in sync with the version used by the otwarchive project)
  • MySQL 5.7
  • Bundler

See Rails Getting Started Guide for instructions on installing and configuring Rails.

Once this is done, you can install dependencies and run the Rails application from the command line:

$ cd path/to/this/repo
$ bundle install
$ bin/rails server

In your browser, navigate to http://localhost:3010 to view the temp site.

Deployment

Before you proceed, you will need to install Ansible (https://www.ansible.com/).

  1. Create a file called hosts with the following contents:
[otw]
[[SERVER_NAME]] ansible_ssh_user=[[SERVER_USER]]

Where SERVER_NAME and SERVER_USER are the server and user provided by Systems.

  1. Make a copy of variables.yml.example as variables.yml and fill it in with the details of the site you're creating.

  2. Make a copy of config/secrets.yml.example as config/secrets.yml (you'll probably need to have one for development anyway - make sure it has a valid production section)

  3. Run

$ cd scripts/ansible
$ ansible-playbook deploy-site.yml -i hosts --extra-vars "@variables.yml"

About

Temporary import sites for semi-automated Open Doors imports


Languages

Language:Ruby 58.8%Language:HTML 24.7%Language:Shell 12.9%Language:CSS 2.6%Language:JavaScript 1.0%