Table of Contents

Evergreen workshop

At code4lib 2008 we will be giving a pre-conference session on Evergreen. This is what we're planning on doing; hopefully it will be useful material for future workshops.

Base line

To avoid any heartache associated with conflicting packages, etc., we have asked participants to bring a laptop with a bootable image or VMWare image (running Debian Etch 4.0 or Ubuntu Gutsy 7.10) dedicated to Evergreen.

To avoid relying on the network for downloading packages, we have also asked participants to install the prerequisites ahead of time using the Makefile.install prereq installer.

We'll bring CDs with copies of the OpenSRF and Evergreen tarballs in case the network gods are angry.

As we go through each of the following phases, we provide commentary that explains a little bit more about what's going on, how a given piece fits into the overall system, and what's happening in trunk to make things easier / better / faster / stronger.

We've made a copy of the installation presentation available in OpenOffice Impress and PDF format.

To do

Who What
Dan Get Laurentian MARC data ready for import (create some basic script to munge it out) - see http://open-ils.org/downloads
Dan Burn CDs with tarballs and MARC data and script

Download on your Linux server

Download on your Windows machine (if you have one)

Install and configure Evergreen

  1. Install OpenSRF
  2. Install Evergreen
  3. Configure opensrf_core.xml
    1. Talk about the role of the router Jabber user versus the Evergreen application Jabber user.
  4. Configure opensrf.xml
    1. Talk about tuning (min connections, etc).
    2. Talk about the services (with reference to upcoming changes in trunk).
    3. Talk about database replicas (reports versus core).
  5. Configure Apache
    1. IP address changes
    2. Talk about what mod_gateway and mod_xmlent do for us
  6. Configure srfsh
    1. Test connection
    2. Introspect some services; call some services? Fun wow!
  7. Try out the cgi-bin configuration scripts at http://localhost/cgi-bin/config.cgi:
    1. Add a branch (talk about org_unit hierarchy)
    2. Flip through circ, copy status, user groups, permissions
    3. Mention Django admin alternative and likely future of admin

Import bib records and holdings

Dan has made 500 bib records in MARC21XML format from Laurentian available for download from the Evergreen downloads page at http://open-ils.org/~denials/import_demo.tar.gz (including a README, some custom scripts, and the current trunk versions of marc2bre.pl, direct_ingest.pl, and parallel_pg_loader.pl).

  1. Discuss: Evergreen concepts of libraries, copy locations, and the bib records/call numbers/copies hierarchy
  2. Extract the files from import_demo.tar.gz and change directories:
    tar xzf import_demo.tar.gz
    cd import_demo
  3. Follow the steps from the Gutenberg example for importing bibs by running the import_bibs.sh script:
    # Ensure that the database name, user name, and password at the top of the script
    # match your settings before running this script:
    sh import_bibs.sh
    • Good chance to talk about the IDL - "what the heck is an msfe?!!" - and database
  4. Edit pg_loader-output.sql to uncomment the "–COMMIT;" line to "COMMIT;" to enable your additions to the database to take place.
  5. Load pg_loader-output.sql into the database:
    # Syntax: psql -U <username> -f pg_loader-output.sql <database>
    psql -U evergreen -f pg_loader-output.sql evergreen
  6. Run the quick metarecord map to enable placing holds:
    psql -U evergreen -f quick_metarecord_map.sql evergreen
  7. Run parse_holdings.pl to generate a file called insert_holdings.sql. parse_holdings.pl is just a basic script Dan wrote to extract the holdings into plain-jane SQL for the staging table import (PostgreSQL COPY format could be used but we might as well keep it simple for those not used to PostgreSQL).
    perl parse_holdings.pl

    Take a look at the output of parse_holdings.sh – a file named insert_holdings.sql. It's just a bunch of INSERT statements with the relevant copy attributes - and should be easy to create something similar from your own ILS holdings information.

  8. Create the staging table:
    psql -U evergreen -f import_staging_table.sql evergreen
  9. Insert the holdings into the staging table:
    psql -U evergreen -f insert_holdings.sql evergreen
  10. Generate the locations, call numbers, and copies in the database from the entries in the staging table:
    psql -U evergreen -f generate_copies.sql evergreen

Staff Client

Murph might be able to step in here and walk through a few interesting parts of the staff client.

  1. Create a patron with an @localhost email account.
  2. Do some circs
    • Circulation configuration - point out /openils/var/circ/*
  3. Cataloging
    1. Groovy contextual help (soon to be available en français)
    2. Item type templates - point out /openils/var/templates/marc/*
  4. Reporting interface if we feel spunky
  5. Offline interface:
    1. Where is it?
    2. How do you upload transactions once you're connected again?
    3. What happens with conflicts, etc?
  6. Discuss a bit of Mozilla XUL:
    1. Look at the XML and JavaScript - it's not so scary
    2. Benefits of server side XUL

OPAC time

Now that we have real live holdings in our system, we can do fun things with the catalog.

Let's use the existing advocacy script and pick some interesting things to point out - shelf browsing, etc.

Talk a little bit about how this is put together: HTML and JavaScript and calls back to OpenSRF services.

Customizing Evergreen: OPAC theme

We'll borrow from the OPAC customization documentation - thanks Karen!

Customizing Evergreen: new service

Patrons often forget passwords. Heck, I often forget passwords. The Evergreen catalog currently doesn't give you the ability to reset your password. We'll add that feature in front of a live audience.

  1. Add the OpenSRF service Perl Code
  2. Add the "Reset my password" button to the catalog Javascript
  3. For bonus points, define the service in Open-ILS/web/common/js/config.js and call the variable instead.

The Perl and Javascript code are "quick and dirty" snippets. They are meant to be examples of functional code, by some definition, but not good code.