Skip to content

Running the Hydra web server

Anusha Ranganathan edited this page Apr 30, 2015 · 1 revision

Server setup of hydra1ltd-dev

  • The code base is located at /opt/rails/ora-hydra

  • rvm is installed in a multi user setup at /usr/local/rvm

  • The code has been cloned from https://github.com/BDLSS/oraingest.git

  • All developers have been added to the group devs, which also has rwx rights at /opt/rails/ora-hydra

Running the rails server

  1. Make sure Jetty is running

    Before starting the rails server, ensure jetty is running and solr and fedora are responsive

    URLs to check: http://localhost:8983/solr and http://localhost:8983/fedora/objects

links2 http://localhost:8983/solr     # press q to quit links 
links2 http://localhost:8983/fedora/objects

If the pages are returning a service not available, start jetty

rake jetty:start
  1. starting the rails server
cd /opt/rails/ora-hydra
rails server

This will run the rails server interactively on the shell.

You should see some 6 lines of output

Hydra should be now available at http://hydra1ltd-dev.bodleian.ox.ac.uk:3000/

  1. Stopping the rails server

    ctrl-c will stop the rails server

Using screen to run rails

I run the server in screen so you can

  • keep the shell active through network disruption
  • Disconnect and re-connect from different locations

To see a list of all screen sessions running screen -ls

To resume the screen session (assuming there's just one) screen -r

Guide to using screen

Note on screen multi-user setup (or the lack of it)

  • I have currently not setup screen in multi-user mode using ACLs

  • At this moment, it would be better for you to login using just one account and access the screen session of that user.

Some notes on the hydra ux files

`//= require dirname` to add a directory and make all files within that directory available

`//= require filename` #to require one single file

Next steps

  • You can fork the github repo https://github.com/BDLSS/oraingest to your account

  • Change the remote origin in /opt/rails/ora-hydra/.

    • This link has good instructions on how to do it.
  • You should now be able to push any changes made into your github repository

  • Issue a pull request when you are ready to hand over code.

  • If I've made changes which will be of help tp you, I'll let you know and you can fetch changes made upstream. I could also send you a downstream pull request I guess, though I haven't done that.