gwu-libraries / scholarspace

GWU's Sufia-based repository app for preservation and open access to scholarly output of the GWU community
MIT License
0 stars 0 forks source link
gw-digital-stewardship

GW ScholarSpace Build Status

=================

This is the (new) repository for the George Washington University Libraries' Sufia-based application. The repository for the Sufia 4 based app is located at https://github.com/gwu-libraries/gw-sufia/ .

Installation for Development

(For a recommended Production configuration, scroll down to Installation with Apache, Tomcat 7, and Passenger)

Dependencies

Install

Configure ImageMagick policies

Configure Contact form emailing

In order to enable the contact form page to send email when the user clicks Send, set the following properties in config/initializers/sufia.rb :

Copy config/initializers/setup_mail.rb.template to config/initializers/setup_mail.rb . Set the SMTP credentials for the user as whom the app will send email.

Start a Redis RESQUE pool

    % cd scholarspace

Assign execute permissions to the script if it doesn't already have them:

    % sudo chmod +x script/restart_resque.sh

Run the script:

    % script/restart_resque.sh production

(or script/restart_resque.sh development if working in development mode)

Create the user roles

Run the rake task that creates user roles called admin and content-admin:

    % rake gwss:create_roles

At the rails console, add an initial user to the admin role. Make sure that your admin user has logged in at least once.

    % rails c
    > r = Role.find_by_name('admin')
    > r.users << User.find_by_user_key('YOUR_ADMIN_USER_EMAIL@gwu.edu')
    > r.save 

We will add the content-admin users shortly through the /roles UI.

(Optional) Populate the initial content blocks

Run the rake task that takes the content of the HTML files in config/locales/content_blocks and populates the associated content blocks. Note that for an existing instance, running this rake task will overwrite any chnages you've made to the content blocks!

    % rake gwss:populate_content_blocks

Run the application

    % rails s -p <PORT NUMBER> -b 0.0.0.0

(Optional) Add content-admin users

Installation with Apache, Tomcat 7, and Passenger

Note: Solr, Fedora, PostgreSQL and the GW ScholarSpace application can all be deployed on different servers if desired. If doing so, ensure that firewall ports are opened between the necessary servers and the GW ScholarSpace application server.

Dependencies

Verify that a backup was created in /opt/fedora_backups before proceeding

Install the GW ScholarSpace app:

On the GW ScholarSpace server:

Configure ImageMagick policies

Configure the minter-state file path

Configure the tmp path

Configure Contact form emailing

In order to enable the contact form page to send email when the user clicks Send, set the following properties in config/initializers/sufia.rb :

Copy config/initializers/setup_mail.rb.template to config/initializers/setup_mail.rb . Set the SMTP credentials for the user as whom the app will send email.

Start a Redis RESQUE pool

    % script/restart_resque.sh production

Create the user roles

Run the rake task that creates user roles called admin and content-admin:

    % rake gwss:create_roles RAILS_ENV=production

At the rails console, add an initial user to the admin role. Make sure that your admin user has logged in at least once.

    % rails c
    > r = Role.find_by_name('admin')
    > r.users << User.find_by_user_key('YOUR_ADMIN_USER_EMAIL@gwu.edu')
    > r.save 

We will add the content-admin users later through the /roles UI.

(Optional) Populate the initial content blocks

Run the rake task that takes the content of the HTML files in config/locales/content_blocks and populates the associated content blocks. Note that for an existing instance, running this rake task will overwrite any chnages you've made to the content blocks!

    % rake gwss:populate_content_blocks RAILS_ENV=production

Configure Passenger and Apache2

Final Deployment

(Optional) Add content-admin users

(Optional) Add Google Analytics

(Optional) Add SSL to Fedora and Solr Connections

These instructions are for redirecting port 8080 traffic on Tomcat to port 8443 and running SSL using the Apache Portable Runtime (APR).