Skip to content

Releases: gwu-libraries/scholarspace

v1.6.0

08 May 16:35
Compare
Choose a tag to compare

v1.6.0 is release primarily driven by security updates. It contains:

To upgrade from v1.5.0, pull the latest release from Github, then bundle install.

v1.5.0

18 Jul 14:12
Compare
Choose a tag to compare

GW ScholarSpace v1.5.0 completes the Fedora migration from LevelDB to PostgreSQL in the next release. This release make Shibboleth authentication an optional configuration setting. Additionally this release further documents upgrade steps and technical architecture of GW ScholarSpace

  • Write deployment steps for upgrades (#208)
  • Add technical info about GW ScholarSpace software (#168)
  • Make shibboleth authentication option config (#229)
  • Migrate Fedora from levelDB to postgresql (#206)

GW ScholarSpace application migration:

  • Pull the latest milestone

    % git fetch
    % git pull origin
    % git checkout v1.5.0
    
  • If this is an environment which should have Shibboleth enabled (such as production), enable Shibboleth in the appropriate environment file (ie: config/environments/production.rb):

    config.shibboleth = true
    
  • Restart the application.

Fedora Migration Steps:

  • Create a backup of the Fedora repository

    % mkdir /opt/fedora_backups
    % chown -R tomcat7:tomcat7 /opt/fedora_backups
    % curl -X POST -u <FedoraUsername>:<FedoraPassword> --data "/opt/fedora_backups" yourserver.com/fcrepo/rest/fcr:backup
    

    Confirm a backup exists in /opt/fedora_backups/

  • Stop Tomcat

    % sudo service tomcat7 stop
    
  • Move the contents of /opt/fedora

    % mkdir /opt/fedora_leveldb
    % mv /opt/fedora/* /opt/fedora_leveldb
    
  • Create a postgresSQL database user for Fedora

    % sudo su - postgres
    (postgres)% psql
    postgres=# create user YOURDBUSERNAME with createdb password 'YOURDBPASSWORD';
    
  • Create a postgresSQL database for Fedora

    postgres=# \q
    (postgres)% createdb -O YOURDBUSERNAME ispn
    (postgres)% exit
    

    Note the database name for Fedora must be 'ispn'

  • Create a Fedora settings folder

    % sudo mkdir /etc/fcrepo
    % sudo chmod -R 774 /etc/fcrepo
    % sudo chown -R tomcat7:tomcat7 /etc/fcrepo
    
  • Copy the infinispan.xml file from the repo

    % cp infinispan.xml /etc/fcrepo/infinispan.xml
    

    Edit this file with your database username and database password

  • Copy the tomcat7 file from the repo
    % cp tomcat7 /etc/defaults/tomcat7

  • Start Tomcat/Fedora

    % sudo service tomcat7 start
    
  • Restore the Fedora Backup

    % curl -X POST -u <FedoraUsername>:<FedoraPassword> --data "/opt/fedora_backups" yourserver.com/fcrepo/rest/fcr:restore
    
  • Log into the Fedora web UI and verify the Fedora repository has restored successfully.

v1.4.0...v1.5.0

v1.4.0

07 Jul 14:04
Compare
Choose a tag to compare

GW ScholarSpace v1.4.0 focuses on upgrading the repository Fedora from 4.5.0 to 4.5.1 which will prepare it for migration from LevelDB to PostgreSQL in the next release. This release also improves security by configuring Tomcat to use SSL, so that Solr and Fedora connections now use SSL. v1.4.0 also removes the deprecated Fedora Message Consumer, includes significant README cleanup and additional documentation of upgrades.

  • Remove deprecated fcrepo-message-consumer (#213)
  • Write deployment steps for upgrades (#208)
  • Switch to fcrepo-plus branch for Fedora (#207)
  • Upgrade Fedora to 4.5.1 (#205)
  • Upgrade passenger version, and specify version in gem install (#166)
  • Update prod deployment doc to use bundle install --deployment (#161)
  • Add SSL to fedora and solr connections (#66)
  • Add Human & Organizational Learning to GW Unit list (#204)
  • Update ImageMagick policy to prevent remote code execution (#209)
  • Fix contact form with updated SMTP settings (#220)
  • Update Sufia gem to 6.6.1 (#223)

Upgrading from v1.3.0 to v1.4.0

GW ScholarSpace app

  • Update gems

    % cd scholarspace
    % bundle update
    
  • Update the following yaml files with your Solr username and password and set the connection to HTTPS and port to 8443

    % config/blacklight.yml
    % config/solr.yml
    
  • Update the following yaml file with your Fedora username and password and set the connection to HTTPS and port to 8443

    % config/fedora.yml
    
  • Uncomment the following lines in config/initializers/sufia.rb

    % config.temp_file_base = '/opt/scholarspace/scholarspace_tmp'
    % config.minter_statefile = '/opt/scholarspace/scholarspace_minter/minter-state'
    
  • Create the scholarspace_tmp and scholarspace_minter folders

    % mkdir /opt/scholarspace/scholarspace_tmp
    % mkdir /opt/scholarspace/scholarspace_minter
    
  • Copy the existing minter-state file from /tmp to the new folder

    % cp /tmp/minter-state /opt/scholarspace/scholarspace_minter/
    
  • Update ownership on the folders to your scholarspace user and group.

    % sudo chown -R scholarspace:scholarspace_group /opt/scholarspace/*
    
  • Restart the application.

  • Restart the resque jobs.

  • Update the cron job for Google Analytics to reflect the new deployment path.

Tomcat

  • Replace the server.xml file in /etc/tomcat7 with the server-ssl.xml file from the tomcat_conf folder of the repo

    % sudo cp server-ssl.xml /etc/tomcat7/server.xml
    
  • Generate SSL server key and certificate signing request using the instructions in this repo: https://github.com/gwu-libraries/SSL_HowTo and install per the README instructions

  • Update the /etc/tomcat7/server.xml file to replace the following lines with your SSL certificate information

         SSLCertificateFile="/etc/ssl/certs/yourservername.cer"
         SSLCertificateChainFile="/etc/ssl/certs/yourservername.cer"
         SSLCertificateKeyFile="/etc/ssl/private/yourservername.pem"
    
  • Replace the tomcat_users.xml file in /etc/tomcat7 with the one from the tomcat_conf folder of the repo

    % sudo cp tomcat-users.xml /etc/tomcat7/tomcat-users.xml
    

Replace the 'dummypasswords' with your own strong passwords and record those password in your password management system of choice.

  • Restart Tomcat

    % sudo service tomcat7 restart
    

Fedora Message Consumer (Deprecated)

  • Remove the deprecated Fedora Message Consumer service

    % sudo rm /var/lib/tomcat7/webapps/fcrepo-message-consumer.war
    
  • Restart Tomcat

    % sudo service tomcat7 restart
    

Fedora

  • Download Fedora 4.5.1 war file

    % cd /opt/install
    % wget https://github.com/fcrepo4-exts/fcrepo-webapp-plus/releases/download/fcrepo-webapp-plus-4.5.1/fcrepo-webapp-plus-audit-4.5.1.war
    
  • Stop Tomcat

    % sudo service tomcat7 stop
    
  • Remove Fedora 4.5.0

    % rm /var/lib/tomcat7/webapps/fcrepo.war
    
  • Deploy Fedora 4.5.1 war file to Tomcat

    % cp /opt/install/fcrepo-webapp-plus-audit-4.5.1.war /var/lib/tomcat7/webapps/fcrepo.war
    
  • Then, replace the web.xml file in /var/lib/tomcat7/webapps/fcrepo/WEB-INF/web.xml with the web-ssl.xml file from the tomcat_conf/fcrepo-webapp folder in the repo.

  • Replace the /etc/default/tomcat7 file with the one from the tomcat_conf folder in the repo

    % sudo cp tomcat7 /etc/default/tomcat7
    
  • Restart Tomcat

    % sudo service tomcat7 restart
    

Solr

  • Copy of the web-ssl.xml into /var/lib/tomcat7/webapps/solr/WEB-INF/web.xml using the web-ssl.xml file from the tomcat_conf/solr folder in the repo.

    % cp web-ssl.xml /var/lib/tomcat7/webapps/solr/WEB-INF/web.xml
    
  • Restart Tomcat

    % sudo service tomcat7 restart
    
  • Log into the Solr web UI and verify your Solr credentials are functioning.


v1.3.0...v1.4.0

v1.3.0

03 May 13:39
Compare
Choose a tag to compare

GW ScholarSpace v1.3.0 focuses on upgrading the app from Sufia 6.4.0 to Sufia 6.6.0 (See Sufia 6.5.0 Release Notes and Sufia 6.6.0 Release Notes), upgrading the repository from Fedora 4.4 to Fedora 4.5, and includes the following upgrades and configuration changes:

  • catalog_controller patch (#193)
  • Upgrade to Sufia 6.6 (#194)
  • Consider upgrading Fedora repo to 4.5 (#195)
  • GW Unit update for Trachtenberg School (#199)
  • Update resque-pool.yml (#200)

Upgrading from v1.2.0 to v1.3.0

GW ScholarSpace app

  • Update gems

    % cd scholarspace
    % bundle update
    
  • Restart the application.

  • Restart the resque jobs.

Fedora

  • Download Fedora 4.5.0 war file

    % cd /opt/install
    % wget https://repo1.maven.org/maven2/org/fcrepo/fcrepo-webapp/4.5.0/fcrepo-webapp-4.5.0.war
    
  • Remove Fedora 4.4.0

    % rm /var/lib/tomcat7/webapps/fcrepo-webapp-4.4.0.war
    
  • Deploy Fedora 4.5.0 war file to Tomcat

    % cp fcrepo-webapp-4.5.0.war /var/lib/tomcat7/webapps/fcrepo-webapp-4.5.0.war
    
  • Then, replace the web.xml file in /var/lib/tomcat7/webapps/fcrepo-webapp-4.5.0/WEB-INF/web.xml with the one from the tomcat_conf/fcrepo-webapp folder in the repo.

  • Finally, restart Tomcat.

Diff of v1.2.0 vs. v1.3.0 code

v1.2.0...v1.3.0

v1.2.0

09 Dec 22:24
Compare
Choose a tag to compare

GW ScholarSpace v1.2.0 focuses on upgrading the app to Sufia 6.4.0 (see Sufia 6.4.0 Release Notes) and includes the following upgrades and configuration changes:

  • Upgrade to Sufia 6.4.0 (#159)
  • Enable Citations link on item page (#69)
  • Upgrade to Fedora v4.4.0 (#182)
  • Upgrade nokogiri to 1.6.6.4 for security fixes (#183)
  • Google Analytics (#176, #171)
  • Pinned FITS back to 0.6.2 from 0.8.6 (#180)
  • Turned default log level down to warn to curb excessive log file growth (#175)
  • Added ability for admin users to view Resque admin page at /admin/queues (#179)
  • Updated Project Hydra links in page footer (#59)
  • Change 'Update generic file' button to 'Update descriptions' (#77)
  • Render Rights help icon on item edit page (#124)

Upgrading from v1.1.0 to v1.2.0

Google Analytics: Set up nightly cron job to import GA stats

Test the script to make sure that it can run successfully. Make sure the script has execute permissions. Your analytics.yml file must also be set up correctly in order for the script to succeed.

    % cd /opt/scholarspace/script
    % sudo chmod +x import_stats.sh
    % ./import_stats.sh production

If it runs successfully, proceed with adding the cron job:

    % crontab -e

Add a line similar to the following:

    0 5 * * * /opt/scholarspace/script/import_stats.sh production

Upgrade Fedora to 4.4

Download Fedora 4.4.0 war file

    % cd /opt/install
    % wget https://repo1.maven.org/maven2/org/fcrepo/fcrepo-webapp/4.4.0/fcrepo-webapp-4.4.0.war

Remove Fedora 4.3.0

    % rm /var/lib/tomcat7/webapps/fcrepo-webapp-4.3.0.war

Deploy Fedora 4.4.0 war file to Tomcat

    % cp fcrepo-webapp-4.4.0.war /var/lib/tomcat7/webapps/fcrepo-webapp-4.4.0.war

Then, replace the web.xml file in /var/lib/tomcat7/webapps/fcrepo-webapp-4.4.0/WEB-INF/web.xml with the one from the tomcat_conf/fcrepo-webapp folder in the repo.

Finally, restart Tomcat.

Move fits back to v0.6.2

    % cd /usr/local/bin
    % sudo curl http://projects.iq.harvard.edu/files/fits/files/fits-0.6.2.zip -o fits-0.6.2.zip
    % sudo unzip fits-0.6.2.zip
    % cd fits-0.6.2
    % sudo chmod a+x fits*.sh

You may opt to remove the fits-0.8.6 directory after installing fits 0.6.2.

Diff of v1.1.0 vs. v1.2.0 code

v1.1.0...v1.2.0

v1.1.0

16 Oct 17:30
Compare
Choose a tag to compare
  • Added roles management using hydra-roles-management. This results in three types of logged-in users (in increasing order of privileges within the app):
    • (no role) -- can currently edit items they own. Although users with no role are currently prevented from using the Upload button, the system would allow transferring items to their ownership.
    • content-admin -- can upload and edit items they own
    • admin -- can also edit content blocks; can also access and manage /roles
  • Metadata updates
    • The GW Unit value is now clickable in the item browse view, and links to a faceted search on that value
    • GW Unit is no longer mandatory
    • Updates to the GW Unit list of values
  • Content blocks
    • Content block content is now managed in the repo in config/locales/content_blocks. Please reflect any changes to these in the repo.
    • Created a new rake task, gwss:populate_content_blocks to bring the copies in the repo into the app database.
  • Google Analytics has been configured in production (no code changes - just configuration)
  • Several code cleanup/technical debt items (#126, #137, #140, #145, #160, #163)

Upgrading from v1.0.0 to v1.1.0

General

Gemfile has not changed, so bundle install is not necessary to upgrade an existing v1.0.0 instance to v1.1.0. However, README.md has been updated to recommend using the --without development option when running bundle install.

Roles management

Roles management has been added. To upgrade an existing instance:

  • 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('[email protected]')
    > r.save 
    
  • Ask each of the content-admin users to log in to the application at least once, if they have not already. Right now they will have read-only rights.

  • Log in as an admin user, and navigate to /roles

  • Select the content-admin role, and add each of the users to whom you wish to grant content-admin rights. These users should now be able to upload items and edit the items that they have uploaded (plus items transferred or proxied to them). This would also be an appropriate time to add admins to the admin role.

  • Note that removing users from roles through the /roles interface is currently broken, and must be accomplished through the rails console.

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 changes you've made to the content blocks!

    % rake gwss:populate_content_blocks RAILS_ENV=production
    

Diff of v1.0.0 vs. v1.1.0 code

v1.0.0...v1.1.0

GW ScholarSpace 1.0.0

03 Sep 17:26
Compare
Choose a tag to compare

This is the initial production-ready release of GW ScholarSpace. GW ScholarSpace is an application built on the http://github.com/projecthydra/sufia gem, with GW customizations and configurations. GW ScholarSpace also adds a Shibboleth/Omniauth integration with the GW LDAP domain for identity management.

Self-deposit through the application is currently disallowed, but users are redirected to https://library.gwu.edu/scholarspace/submit where the user enters basic metadata and uploads the file(s). The metadata and files are emailed to library staff, who have administrative logins to GW ScholarSpace and can create content on the site.