Skip to content

Production Installation: Overview

randikathryn edited this page Jan 19, 2014 · 71 revisions

Prerequisites

HydraDAM runs on Linux and these production installation instructions have been tested on Ubuntu and CentOS. They may or may not work on other flavors of unix.

Follow the instructions in the order listed below. We recommend using rvm in single-user development environments, however native installation of ruby in production environments is preferred because of complexities that can arise when using rvm under multiple user contexts.

Steps

  1. Set up prerequisites for these instructions.
  2. Install dependencies (development tools & libraries).
  3. (CentOS) Disable SELinux.
  4. Install ruby 2.0 and rubygems 2.0.
  5. Install java 7.
  6. Install Tomcat.
  7. Install a sql db for Fedora.
  8. Install Fedora.
  9. Install solr 4.2.
  10. Install Redis Redis is the key/value store that connects the jobs generated by the hydraDAM code with the resque workers that execute those jobs.
  11. Install ffmpeg ffmpeg transcodes video and audio files so you can have web-streaming versions of your uploaded content.
  12. Install fits Fits retrieves xml metadata from the files you upload to hydraDAM, which is a painless way to harvest pre-existing metadata like file type.
  13. Clone the git repo & install gems The git repo contains the hydradam-specific code. The gems contain other people's code that we use in hydraDAM. We are standing on the shoulders of giants here.
  14. Install & configure Apache & Passenger Apache and Passenger work together to serve up the hydraDAM web pages. Apache is the generic web server; passenger (https://www.phusionpassenger.com/) manages the multiple processes hydraDAM (a ruby on rails app) generates.
  15. Create the production sql database The production database stores user data and other information related to hydraDAM.
  16. Create and configure the yml files The yml files store the confidential information needed to connect the hydradam code to the other elements of the system, including fedora, solr, and redis.
  17. Configure the rails application to make sure all the parts of the system are working together. This step includes the secret token, the fits path, solr configuration, the temporary transcoding directory, storage management, and more.
  18. Create an admin user You'll need an admin user to review the resque queues and to administer other users' information.
  19. Set up resque pool Resque-pool starts and manages a pool of resque workers that handle jobs like transcoding video files and retrieving metadata with fits, so your users can move on to the next page or the next upload while their jobs are in process.
  20. Test your installation:
    1. Open a browser, navigate to the home page of your application, and log in
    2. Click on the Upload button (right side of screen)
    3. Click on Select files . . .
    4. In the popup window, select a file from your local drive and click OK
    5. Click on Start upload - once the file is uploaded, you'll see the Apply Metadata screen
    6. Change the Title if desired, select a Resource Type, enter a Keyword, enter a Creator, and select a license in the Rights section
    7. Scroll down and click Save - the resque workers will begin transcoding - if you've uploaded a large file, this may take some time
    8. Use the dropdown in the upper right corner to move to your Dashboard
    9. Select your object and confirm that your metadata is correct
    10. Test the Download and Edit links
    11. Celebrate! You have a working HydraDAM

Troubleshooting: finding the logs, administering solr, administering fedora, administering resque-pool

Enhancements/Additions

  1. Log rotation - you may want to rotate the logs for mysql, tomcat, fedora, apache, and the application
  2. Enable/configure email for password resets
  3. Firewall to secure Solr and Fedora
  4. Add FTP functionality Ftp allows you to upload files larger than the http transfer limit. Large video files generally must be uploaded via ftp.
  5. (CentOS) Incorporating SELinux SELinux offers filesystem security by enforcing rules on CentOS servers. In its default configuration, SELinux will interfere with hydradam. You'll need to configure it to allow the processes hydradam needs if you want to use it on your hydradam server.
Clone this wiki locally