Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add local-local query history instructions

...

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/. Navigate to the folder for 1.21.1. From there, download shrine-war-1.21.1.war to the webapps/ directory on of the Tomcat installation that SHRINE server and uses and rename it to shrine.war.

For example:

...

Like other SHRINE artifacts, the SHRINE proxy can be found on the HMS Sonatype Nexus server at https://repo.open.med.harvard.edu/nexus/content/groups/public/net/shrine/shrine-proxy/. Navigate to the folder for 1.21.1. From there, download shrine-proxy-1.21.1.war to the webapps/ directory on of the Tomcat installation that SHRINE server and uses and rename it to shrine-proxy.war.

...

The SHRINE webclient can be found on the HMS Sonatype Nexus server at https://repo.open.med.harvard.edu/nexus/content/groups/public/net/shrine/shrine-webclient/. Navigate to the folder for 1.21.1. From there, download shrine-webclient-1.21.1-dist.zip file to  to the webapps/ directory on of the Tomcat installation that SHRINE server and uses and rename it to shrine-webclient.zip. Then, unzip the shrine-webclient.zip file.

For example:

$ cd /opt/shrine/tomcat/webapps
$ wget --no-check-certificate https://repo.open.med.harvard.edu/nexus/content/groups/public/net/shrine/shrine-webclient/1.21.1/shrine-webclient-1.21.1-dist.zip -O shrine-webclient.zip
$ unzip shrine-webclient.zip

...

Like other SHRINE artifacts, the SHRINE Dashboard can be found on the HMS Sonatype Nexus server at https://repo.open.med.harvard.edu/nexus/content/groups/public/net/shrine/dashboard-war/. Navigate to the folder for 1.21.1. From there, download dashboard-war-1.20.1.war to the webapps/ directory on of the Tomcat installation that SHRINE server uses and rename it to shrine-dashboard.war.

...

Code Block
languagesql
titlemysql -u shrine -p -D shrine_query_history
alter table PRIVILEGED_USER modify column threshold int null;

Create additional QEP Audit Database Tables

Additional tables have been added to the qepAuditDB to support storing query results at the QEP level. Run the following queries on your QEP audit database:

Code Block
languagesql
titlemysql -u shrine -p -D qepAuditDB
create table `previousQueries` (`networkId` BIGINT NOT NULL,`userName` TEXT NOT NULL,`domain` TEXT NOT NULL,`queryName` TEXT NOT NULL,`expression` TEXT,`dateCreated` BIGINT NOT NULL,`deleted` BOOLEAN NOT NULL,`queryXml` TEXT NOT NULL,`changeDate` BIGINT NOT NULL);
create table `queryFlags` (`networkId` BIGINT NOT NULL,`flagged` BOOLEAN NOT NULL,`flagMessage` TEXT NOT NULL,`changeDate` BIGINT NOT NULL);
create table `queryResults` (`resultId` BIGINT NOT NULL,`networkQueryId` BIGINT NOT NULL,`instanceId` BIGINT NOT NULL,`adapterNode` TEXT NOT NULL,`resultType` TEXT,`size` BIGINT NOT NULL,`startDate` BIGINT,`endDate` BIGINT,`status` TEXT NOT NULL,`statusMessage` TEXT,`changeDate` BIGINT NOT NULL);
create table `queryBreakdownResults` (`networkQueryId` BIGINT NOT NULL,`adapterNode` TEXT NOT NULL,`resultId` BIGINT NOT NULL,`resultType` TEXT NOT NULL,`dataKey` TEXT NOT NULL,`value` BIGINT NOT NULL,`changeDate` BIGINT NOT NULL);
create table `queryResultProblemDigests` (`networkQueryId` BIGINT NOT NULL,`adapterNode` TEXT NOT NULL,`codec` TEXT NOT NULL,`stamp` TEXT NOT NULL,`summary` TEXT NOT NULL,`description` TEXT NOT NULL,`details` TEXT NOT NULL,`changeDate` BIGINT NOT NULL);

Migrate Query History to QEP

This step is crucial if you wish to preserve your previous queries!

SHRINE 1.21 no longer stores query results at the Adapter, but instead stores them at the local QEP. This has the additional benefit of speeding up webclient performance, since the webclient will no longer have to wait for responses from every network member before displaying a list of previous queries. Starting from SHRINE 1.21 and onward, any queries executed will be stored in the QEP Audit Database. 

A migration tool has been created for users that wish to migrate their previous query history to this new location, called adapter-queries-to-qep.

This migration tool can be found on the HMS Sonatype Nexus server at https://repo.open.med.harvard.edu/nexus/content/groups/public/net/shrine/adapter-queries-to-qep/. Navigate to the folder for 1.21.1. From there, download adapter-queries-to-qep-1.21.1.zip to the /opt/shrine/ directory of your SHRINE server and rename it to adapter-queries-to-qep.zip. Then, unzip the adapter-queries-to-qep.zip file and navigate to the directory it creates.

For example:

$ cd /opt/shrine/
$ wget --no-check-certificate https://repo.open.med.harvard.edu/nexus/content/groups/public/net/shrine/adapter-queries-to-qep/1.21.1/adapter-queries-to-qep-1.21.1.zip -O adapter-queries-to-qep.zip
$ unzip adapter-queries-to-qep.zip
$ cd adapter-queries-to-qep-1.21.1/

After this, edit conf/adapter-queries-to-qep.conf. There are two major blocks to this conf file: adapter{} and queryEntryPoint{}adapter{} refers to the old shrine_query_history dataSource, which will be used as the source of previous query history. queryEntryPoint{} refers to the new qepAuditDB dataSource, which will be the migration destination. Both sections have the following configuration values, which mirror attributes in shrine.xml for their corresponding <Resource/> element:

  • driverClassName: JDBC driver used to connect to the database. Corresponds with the driverClass attribute in shrine.xml.
  • url: JDBC URL used to connect to the database. Corresponds with the url attribute in shrine.xml.
  • username: Username used to connect to the database. Corresponds with the username attribute in shrine.xml.
  • password: Password used to connect to the database. Corresponds with the password attribute in shrine.xml.

With the exception of the password variable, the default values all should work with a standard MySQL-backed SHRINE installation.

After confirming that the configuration values are correct, make the adapter-queries-to-qep tool executable. Run the tool, giving the following arguments:

  • i2b2 domain used by SHRINE. i2b2 demo installations use i2b2demo by default.
  • path to config file for the adapter-queries-to-qep tool. This is almost always conf/adapter-queries-to-qep.conf
  • path to SHRINE config file. This is typically /opt/shrine/tomcat/lib/shrine.conf

For example:

Wiki Markup
$ chmod +x adapter-queries-to-qep
$ ./adapter-queries-to-qep {i2b2 domain name} conf/adapter-queries-to-qep.conf /opt/shrine/tomcat/lib/shrine.conf

Depending on the size of your database, this process may take a few minutes.

Start SHRINE

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

...