You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

In most cases, upgrading an existing instance of SHRINE is a relatively quick process. Exceptions to this rule include older versions of SHRINE that contained substantial changes to configuration files and other portions of the file structure.

 

Shut Down SHRINE

Before starting the upgrade process, make sure SHRINE's Tomcat is not running. Leaving it running during this process can cause problems. Simply run the following command:

$ shrine_shutdown

If the above command is not found, try the following instead:

$ /opt/shrine/tomcat/bin/shutdown.sh

Create Backups

Now that SHRINE is stopped, it is a good idea to back up the current versions of the components we will be upgrading. The exact method for making this backups may vary, but these instructions will place the backups in a folder called /opt/shrine/upgrade-backups.

Start by moving the current SHRINE webapp to another location:

$ mv /opt/shrine/tomcat/webapps/shrine /opt/shrine/upgrade-backups/shrine

Next, move the SHRINE webclient to that same backup location. Later on, we will be restoring i2b2_config_data.js from this backup. If you choose not to make any backups, make sure to at least keep a copy of i2b2_config_data.js!

$ mv /opt/shrine/tomcat/webapps/shrine-webclient /opt/shrine/upgrade-backups/shrine-webclient

Deploy New shrine.war

Next, we will retrieve the new SHRINE webapp from the HMS Sonatype Nexus server at http://repo.open.med.harvard.edu/nexus/content/groups/public/net/shrine/shrine-war/. Choose the version that you are upgrading to (for example, 1.18.0) and navigate to that folder. From there, download the appropriate shrine-war-[VERSION].war file to the webapps directory on the SHRINE server and rename it to shrine.war.

For example:

$ cd /opt/shrine/tomcat/webapps
$ wget http://repo.open.med.harvard.edu/nexus/content/groups/public/net/shrine/shrine-war/1.18.0/shrine-war-1.18.0.war -O shrine.war

Deploy New SHRINE Webclient

Unlike shrine.war, the SHRINE webclient is retrieved from the HMS Subversion repository at https://open.med.harvard.edu/svn/shrine/releases/. The webclient is found at [VERSION]/code/shrine-webclient. Checkout or export this folder to /opt/shrine/tomcat/webapps.

For example:

$ cd /opt/shrine/tomcat/webapps
$ svn export https://open.med.harvard.edu/svn/shrine/releases/1.18.0/code/shrine-webclient/

After this, restore the previous i2b2_config_data.js file from your backup and place it in the new shrine-webclient folder:

$ cp /opt/shrine/upgrade-backup/shrine-webclient/i2b2_config_data.js /opt/shrine/tomcat/webapps/shrine-webclient/i2b2_config_data.js

Schema Changes in 1.18

SHRINE 1.18 adds columns to the SHRINE_QUERY table, and also creates the HUB_QUERY and HUB_QUERY_RESULT tables.

To upgrade the SHRINE_QUERY table, retrieve the adapter-migrate-schema-to-1.18.sql script and run it:

$ wget https://open.med.harvard.edu/svn/shrine/releases/1.18.0/code/adapter/src/main/resources/adapter-migrate-schema-to-1.18.sql
$ mysql -u $SHRINE_MYSQL_USER -p$SHRINE_MYSQL_PASSWORD -D shrine_query_history < adapter-migrate-schema-to-1.18.sql

To create the HUB_QUERY and HUB_QUERY_RESULT tables, download the hub.sql script and run it:

$ wget https://open.med.harvard.edu/svn/shrine/releases/1.18.0/code/broadcaster-aggregator/src/main/resources/hub.sql
$ mysql -u $SHRINE_MYSQL_USER -p$SHRINE_MYSQL_PASSWORD -D shrine_query_history < hub.sql

Start SHRINE

The only thing left to do at this point is start SHRINE back up. Simply do the following:

$ shrine_startup

If the above command is not found, try the following instead:

$ /opt/shrine/tomcat/bin/startup.sh

 

Instructions for Updating the SHRINE Web Client from 1.17.1 to 1.18.0

  1. Back up the 1.17.1 version of the web client by renaming its directory to shrine-webclient-1.17.1

  2. Inside of the directory shrine-webclient1.17.1/ there is a file called i2b2_config_data.js.  Make a copy of this file and place it somewhere readily accessible like your desktop.  We are going to drop this file into the equivalent location of the 1.18 version of the webclient in a future step.



  3. Inside of the directory shrine-webclient1.17.1/js-i2b2/cells/SHRINE/  there is a file called cell_config_data.js.  Make a copy of this file and place it somewhere readily accessible like your desktop.  We are going drop this file into the equivalent location of the 1.18 version of the webclient in a future step.

  4. Now use svn to check out the latest version of the webclient here:  https://open.med.harvard.edu/svn/shrine/releases/1.18.0/code/shrine-webclient 

    From the command line in linux this would be something like: svn co https://open.med.harvard.edu/svn/shrine/releases/1.18.0/code/shrine-webclient

     

  5. Now copy the i2b2_config_data.js file from 1.17.1 (see step 2) newly checked out shrine-webclient directory.

  6. Now copy the cell_config_data.js file from 1.17.1 (see step 3) into the newly checked out shrine-webclient directory at location shrine-webclient/js-i2b2/cells/SHRINE/



  7. Copy the new shrine-webclient directory onto the web server.

 

 

  • No labels