Overview

Documents the process and automation for bringing new content into the mapping environment from the authoring environment for the prod deployment.

Details

The drip feed, or the automated updating of SNOMEDCT content in the Mapping Tool from the authoring environment, runs weekly and consists of the following steps

  • Obtain the latest daily build
  • Process the daily build
  • Remove and recalculate the SNOMEDCT tree positions
  • Recompute workflow.

The source code for the loadDelta.csh script is in the config project for the prod deployment - config/prod/src/main/resources/bin.

Automation

The drip feed wrapper script (see the next section) is automatically run via the crontab application.  A sample cron job for running the drip feed every sunday at 7pm is shown below:

#
# Minute     Hour     Day of Month     Month     Day of Week
#
0       19      *       *       0       csh /home/ihtsdo/config/bin/loadDelta.csh > /home/ihtsdo/logs/loadDelta.log

Running the Drip Feed Wrapper Script

The wrapper script loadDelta.csh can be run by:

cd ~/config/bin/loadDelta.csh
csh loadDelta.csh > [desired log file name]

The wrapper script automatically performs all of the tasks described in the next section.

Manually Performing the Drip Feed

To manually run the drip feed, perform each of the following steps.

Restart the server

To prevent indexing and workflow errors due to editing concurrent with the drip feed, stop the tomcat server

service tomcat7 stop

Obtain the latest daily build

The daily build data is retrieved via the following maven get command. Note that the version must be specified and is subject to change.

mvn org.apache.maven.plugins:maven-dependency-plugin:2.4:get \
  -DgroupId=org.ihtsdo.intl.release.process -DartifactId=wb-release-process \
  -Dclassifier=delta -Dversion=1.20-SNAPSHOT -Dpackaging=zip \
  -Dtransitive=false

The daily build data can also be retrieved from the ihtsdo aceworkspace repository at  https://mgr.servers.aceworkspace.net/apps/ihtsdo-archiva/repository/all/org/ihtsdo/intl/release/process/wb-release-process/.  At the time of writing, the repository interface is subject to a bug where the contents of the directories are not automatically shown.  To view the daily builds:

Once the data is obtained, unzip it and place it in the desired folder.  The wrapper script automatically places the unzipped data in /home/ihtsdo/.m2/repository/org/ihtsdo/intl/release/process/wb-release-process/1.20-SNAPSHOT/wb-release-process-1.20-SNAPSHOT-delta/destination/Delta.

Run the delta loader mojo

The delta loader mojo is named TerminologyRF2DeltaLoader.  The mojo is specifically configured for SNOMEDCT, and requires specification of parameters including the preferred term type id and refset id, which are set in the configuration properties file.

To run the delta loader, execute the command below.  Note again that if the daily build version changes, this command must be altered.

cd ~/code/admin/loader
mvn install -PRF2-delta -Drun.config=$MAPPING_CONFIG -Dterminology=SNOMEDCT \
  -Dlast.publication.date=$SNOMEDCT_VERSION \
  -Dinput.dir=/home/ihtsdo/.m2/repository/org/ihtsdo/intl/release/process/wb-release-process/1.20-SNAPSHOT/wb-release-process-1.20-SNAPSHOT-delta/destination/Delta

Clear and recompute SNOMEDCT tree positions

See Terminology Tree Position Management  for instructions on removing and calculating tree positions.

Recompute workflow

See Workflow Tools for instructions on computing workflow.

Start the server

Restart the tomcat7 server:

service tomcat7 start
  • n/a

 

 

  • No labels