Skip to content

Drupal 8 module to provide reports using data from the Riprap fixity microservice.

License

Notifications You must be signed in to change notification settings

mjordan/islandora_riprap

Repository files navigation

Islandora Riprap

Introduction

A Drupal 8/9 module to provide node-level and repository-level reports using data from a Riprap fixity microservice.

Overview

This module provides the following:

  • A "Fixity auditing" field on the "Media" tab (which is actually the output of the "Manage Media" view provided by the Islandora module) showing Fedora URLs for Media associated with the node. Each URL is color coded to indicate whether or not any fixit events have failed, with a link to a full report of the events.
  • A "Failed Fixity Check Events" report that show the numbers of failed events by month.
  • While running in "local" mode, the ability to execute Riprap from within Drupal's cron.
  • In conjunction with the Islandora PREMIS module, expresses file objects and fixity check events in Turtle RDF serialization.

Requirements

This module is ready for Drupal 9.

Installation

  1. Clone this repo into your Islandora's drupal/web/modules/contrib directory.
  2. Enable the module either under the "Admin > Extend" menu or by running drush en -y islandora_riprap.
  3. Modify the "Riprap resource (media) list" View this module installs to determine which Media Riprap audits.

Configuration

Note: If you are running Islandora in a CLAW Playbook Vagrant machine and Riprap on the Vagrant host machine, start the Riprap web server by running php bin/console server:start *:8001 in the Riprap directory. Then in Drupal, make sure your "Riprap microservice REST endpoint" setting says "http://10.0.2.2:8001/api/fixity".

Configuration options for Islandora Riprap are available at admin/config/islandora_riprap/settings, or at Configuration > Islandora > Fixity auditing. You will probably want to base your Riprap configuration on either the sample_islandora_config.yml or sample_islandora_config_fetch_digest_from_drupal.yml configuration files supplied by Riprap.

The Riprap resource list View

This module installs the "Riprap resource list" View, which is used by Riprap to get the media to perform fixity checks on. It comes preconfigured as follows:

  • Fields: "Changed" and "Media: ID". Do not remove these fields.
  • Filter criteria
    • Published nodes of type Repository Item
    • Meda Use tags "Original File" and "Preservation Master"
  • Relationships
    • field_media_of: Content
    • file from field_media_file
    • image from field_media_image
    • file from field_media_audio_file
    • file from field_media_document

You will want to adjust the filter criteria to include your own content types, Media Use tags, and, if you create new media types, the field that contains the new media's file.

Remote vs. local mode

This module supports two ways of integrating with Riprap, either in "remote" mode or "local" mode.

  • In remote mode, Drupal interacts with Riprap over HTTP. This mode allows Riprap to be running on a server separate from the one Drupal is running on. This is the recommended configuration for large site, or for sites that are using Riprap to perform fixity auditing on resources that are not all managed by Islandora.
  • In local mode, Drupal executes Riprap's command-line interface. This means that Riprap needs to be running on the same server as Drupal. This configuration is simpler than the "remote" configuration, but will likely cause performance issues in large Islandora repositories. Local mode also allows you to use Drupal's cron to peridocally perform fixity checks.

Enabling the Fixity Auditing summaries in each object's Media tab

  1. Go to Drupal's "Configuration" menu.
    1. In the "Islandora" section, click on the "Fixity auditing" link.
    2. Adjust your config options.
  2. Add the "Fixity Auditing" field to the "Manage Media" View (like you would add any other field to a view):
    1. In your list of Views ("Admin > Structure > Views"), click on the "Edit" button for the "Manage Media" View.
    2. In the "Page" display, click on the "Add" Fields button.
    3. From the list of fields, check "Fixity Auditing".
    4. Click on "Apply (this display)".
    5. Change the label if you want.
    6. Click on "Apply (this display)".
    7. Optionally, you can locate the new "Fixity Auditing" field to any position you want in the Media table.
    8. Click on the "Save" button to save the change to the View.

Now, when you click on the "Media" tab in an Islandora object node, you will see a new column in the table showing the Fedora URL for the media file:

details

The cell is green to indicate that all fixity events for the media file were successful. The "Details" link leads to a full report of the events.

If Riprap is not found or is not running at its configured endpoint URL, each cell will contain an error message to that effect:

riprap not found

The Failed Fixity Check Events report

There is no separate configuration for this report. It can be accessed either from with the "Fixity Auditing" admin settings form at admin/config/islandora_riprap/settings, or from the "Islandora Riprap" row in Drupal's "Status report" list. If Riprap contains no failed fixity check events, you'll see the following:

no failed fixity events

If failed events exist, the report will inidcate the number of events per month:

failed fixity events

Current maintainer

License

GPLv2

About

Drupal 8 module to provide reports using data from the Riprap fixity microservice.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •