Installation Checklist for Production Upgrade

How to safely upgrade the production machine to a new version of the Dryad code. This is an expanded, and more thorough, version of Updating the Codebase.

Before taking tomcat down: pg_dump --inserts dryad_repo >dryadDBexport-2011-9-2.sql pg_dump dryad_repo >dryadDBexport-2011-9-2-noins.sql bin/dspace metadata-export -f dryad-backup/packageExport-2011-9-2.csv -i 10255/3 bin/dspace metadata-export -f dryad-backup/fileExport-2011-9-2.csv -i 10255/2 cd ~/dryad-repo/dspace git checkout dryad-master git pull mvn clean package -P env-prod cd target/dspace-1.7.3-SNAPSHOT-build.dir/ failover-start.sh sudo ant -Doverwrite=true update tomcat-restart.sh bin/dsrun org.dspace.administer.MetadataImporter -f config/registries/internal-types.xml -u /opt/dryad/bin/dspace dsrun com.atmire.authority.IndexClient /opt/dryad/bin/dspace update-discovery-index -f /opt/dryad/bin/dspace embargo-lifter -nv failover-stop.sh
 * Ensure you have tested what will happen to submissions that are in the workflow system when the release is performed.
 * If there are significant changes to the submission system, create two test submissions -- one that is pushed through to the curator, and one that stays in the user's workspace. These will be used for testing once the upgraded system comes back up.
 * Check out a copy of the dryad-master branch.
 * In the branch only, update version/date information in modules/xmlui/src/main/webapp/themes/Dryad/meta/version.xml
 * Create a backup of the database and metadata
 * Update Maven profile configurations if necessary
 * Final test of basic functionality and all new features on the staging server.
 * Be sure to check links between packages and files and that DOIs resolve (to do this, set localize config in dspace.cfg to false)
 * Use the admin interface to notify users that the system will be going down shortly and disable new logins.
 * Watch the control panel's activity page to see when users are no longer using the system.
 * Update and compile the code:
 * Force the failover system to route traffic to the secondary server:
 * Deploy the updated code:
 * in /opt/dryad/webapps/xmlui/static, install the correct robots.txt file by copying from robots.txt.production (this step should be moved into the maven configuration)
 * Update any configuration, metadata registry, database settings for new features.
 * Update the index of journals for autocomplete purposes:
 * If any search changes were applied, reindex the discovery index:
 * Run the embargo lifter in "dry run" mode and verify that it will only lift embargoes on the correct items.
 * Run through the "smoke tests" on the Testing page.
 * Test what happened to the two test submissions that were in the submission workflow during the upgrade.
 * Reinstate services on the primary server:
 * Re-process any metadata email that was received during the downtime.

If the system has been moved to a new machine

 * 1) Ensure that all of the procedures on Updating Data from Existing Instance have been followed, including:
 * 2) * Re-build the search index
 * 3) * Copy over the statistics index
 * 4) * Copy over crontabs
 * 5) * Copy over the bagit binaries (and set permissions for the dryad user)
 * 6) Ensure that all backup machines are now backing up the correct (new) machine.
 * 7) Update the Handle server on the new machine.

After upgrade is complete

 * Perform basic testing on the production server.
 * Edit release notes on wiki.
 * Tell the team the release is out.
 * Write a blog entry about the release.
 * Do the same steps on the staging-mirror system (possibly used for failover)