Skip to content

v4.0.0

Compare
Choose a tag to compare
@orangewolf orangewolf released this 09 May 22:55
· 810 commits to main since this release
ee1e289

This release adds several large features (Cross Site Search, Custom Themes, Multiple Domains Per Tenant and Private Tenant Support) along with a substantial overhaul in to how settings are managed. This is packaged along with quite a few bug fixes and improvements.

Please see the Migrations section below.

Features

Cross Site Search

Hyku now has the ability to create search only tenants. A search only tenant searches 1 or more other tenants and displays results from all of them in a unified interface. These tenants are manageable in the admin interface. This work was contributed as part of the Advancing Hyku Project done by Ubiquity Press with special thanks to @mankind for the majority of this code. The British Libraries sponsored work for Notch8 to integrate the cross site search and the new settings UI in to Hyku's main repository. You can see a basic demo of this feature here https://share.getcloudapp.com/RBunGOYP

Theming

Hyku now ships with 3 custom home page themes, 2 custom show page themes and 2 search results themes. There is a new tab on the admin dashboard (settings/appearance) which allows admins to select themes. This opens the door for additional themes to be developed that include custom views, css and javascript. This change also add feature flags for Featured Researcher, Recently uploaded, Featured Works, Share your work button. This work was sponsored by the Hyku for Consortia project from PALNI and PALCI, under their IMLS grant, "Scaling Up a Collaborative Consortial Institutional Repository." This presentation from Samvera Virtual Connect 2021 provides an excellent walk-through of this functionality. Detailed instructions on adding and selecting themes are provided at the links below:

Support Multiple Domains per Tenant

Previously only one domain name could point at a given tenant. We now support multiple domain names and make adding additional domains available from the UI. For example both samvera.hykuup.com and repo.samvera.org can render the same content.

Private Tenant Support

Tenants can be marked as private in the proprietor UI. Doing so prevents them from being listed on any public facing list of accounts and puts a simple http basic auth in front of the site. This allows for underdevelopment accounts to be set up with out being public or being indexed by search engines and prevents the public from wandering in to demo or staging sites.

Featured Collections

Users previously could not specify which collections they wanted to appear on the homepage, and collections appeared in order of whichever was the most recently added. There was also no way to prevent a collection from appearing on the homepage besides making it private. Hyku now utilizes the code for Featured Works, and adapts it so that users can select, feature and reorder whichever collections they would like to show on the homepage.

Use Hyrax Docker / Helm Base Setup

Hyrax now provides a minimal base docker image, intended to be reused and extended by applications. this is a proposal to replace the existing Dockerfile with one based on that image.

this would switch the application server to puma. our thinking is that real containerized deployments (e.g. via the Helm chart) are likely to be behind a load balancer and an nginx (an ingress controller).

the image is kept minimal with the idea that a smaller set of system dependencies means a lower footprint for security risks, besides the bandwidth and storage convenince. Hyrax's setup definitely has space to improve here, but the idea is greater consolidation will help the community maintain something really solid.

This release removes the custom chart code that Hyku was maintaining, but few if any people were using.

Settings and Configuration Overhaul

Configuration settings were available in too many places and with too many names. In order to consolidate and modernize this approach the following refactoring has been done. All "global" configuration now happens in ENV vars. The ruby-config gem has been removed and settings in config/settings.yml, `config/settings/production.yml', etc are completely removed in this version. The ENV vars have been updated to match Hyrax and Rails standards wherever possible. See # Migration Instructions for more information on updating your application.

A new settings interface was added to the account. This interface allows for tenants to override settings in their admin UI or in the proprietor UI where appropriate. Setting specified at the account level can have a specified default. The precedence is that if a settings value is set that is used. If not, and an ENV var matches, then the ENV var is used. If not and a default is coded in, then the default is used. Lastly if none of those 3 are true, the value is nil.

Special thanks to Ubiquity for doing the initial implementation on this feature and to the British Library to supporting Notch8's work to extract it in to Hyku and expand its scope.

Make Account Switching Simpler

Previously switch accounts was accomplished in the console or in scripts by called AccountElevator.switch!(CNAME). This is still supported, but becomes tedious due to how frequently switching tenants is needed. Devs can now call switch!(X) where X is any of the following:

  • Account object
  • cname
  • name of an account object

This changed also allowed us to consolidate several code paths which previously handled account switching.

Bugs

  • Disabling a work type causes errors
  • Update links for Samvera wiki move
  • Remove coveralls gem from CI, it was flaky and no longer helpful
  • Set default scope for users to exclude guests, remove old guests (#1720)
  • Non-ACL file system support. Azure and other network file systems do not support setting file permissions. This sets up a flag to disable file permission setting if needed
  • Don't try to assign registered role on global tenant (#1712)
  • Branding images should be served from public, not tmp
  • Move dory domain to .test since Google is resolving .docker now
  • Solve issue where apartment initializer would not allow migrations before seeds had been run

Migration Instructions

This is a major release. There are several database migrations to run, but more importantly there are major changes to the way settings are handled. All items previously controlled via the ruby config gem are now controlled via either environment variables or in tenant settings. Environment variable names have been remapped to match Hyrax where possible, simplified where possible and to clearly distinguish them where not possible.

For example:
SETTINGS__SOLR__URL (or the solr url field in the settings.yml file) is now SOLR_URL
SETTINGS__JOB__QUEUE is now HYRAX_ACTIVE_JOB_QUEUE.

Settings set at the tenant level will override their environment set defaults. See https://github.com/samvera/hyku/blob/main/app/models/concerns/account_settings.rb and the README for examples of available variables.
The development environment is also more closely aligned with Hyrax, but most of these changes are abstracted under the Docker configuration.