-
Notifications
You must be signed in to change notification settings - Fork 5
Running the Hydra web server
-
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
-
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
- 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/
-
Stopping the rails server
ctrl-c
will stop the rails server
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
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.
-
All of the template files are located at
/opt/rails/ora-hydra/app/views
On github - https://github.com/BDLSS/oraingest/tree/master/app/views
-
The images, css and javascript files are located at
/opt/rails/ora-hydra/app/assets
On github - https://github.com/BDLSS/oraingest/tree/master/app/assets
-
If you add a new set of javascript files, you need to tell rails to use it
In the file /opt/rails/ora-hydra/app/assets/javascripts/application.js add the line
`//= require dirname` to add a directory and make all files within that directory available
`//= require filename` #to require one single file
-
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.