Building and Deploying UMLS

Information on building and deploying UMLS.

Steps

  1. Download UMLS and unpack into a local directory.
    1. https://www.nlm.nih.gov/research/umls/licensedcontent/umlsknowledgesources.html

  2. Run MetamorphoSys and install the Level 0+SNOMED configuration but make sure to exclude NCBI as well (it is very large).
    1. Note the "META" directory of the output.
    2. Alter the MRHIER.RRF to keep only rows for SAB=MSH or SAB=USPMG or SAB=PNDS, all other hierarchies will be computed.

  3. Configure a c:/umlsserver/config/config-rrf.properties file based on the config.properties from the prod config project.
    1. Make sure database info and paths are configured properly for your environment (so as to not overwrite data from other builds).
    2. See this sample
  4. Run an eclipse process to load the entire UMLS RRF


  5. Run the server in dev mode through eclipse to test,

  6. Export the mysql database → snomedct.sql, then zip it as snomedct-sql.zip and put into S3
    1. https://s3.amazonaws.com/wci1/TermServer/umls.sql.gz 
  7. Log into a.terminology.tools and become the ec2-tomcat user (need sudo priveleges for "sudo -u ec2-tomcat -i")

  8. Update the landing page (e.g. "UMLS-Terminology-Server\config\prod\src\main\resources\app\page\general\landingContent.html") to update the references to the latest version, e.g. 2016AA → 2017AA
    1. Repeat for the "loginContent.html" page too.

  9. Update and rebuild the code (master branch) - **Note: this may require merging from "develop"

    cd ~/umls/code
    git pull
    mvn  -Dconfig.artifactId=term-server-config-prod clean install
  10. Go to ~/snomed and look at README.txt.  See the "RELOADING DATA" section, e.g.

    RELOADING DATA
    
     
    # Undeploy and start maintenance page
    /bin/rm -rf /var/lib/tomcat8/work/Catalina/localhost/umls-server-rest
    /bin/rm -rf /var/lib/tomcat8/webapps/umls-server-rest
    /bin/rm -rf /var/lib/tomcat8/webapps/umls-server-rest.war
    /opt/maint/getMaintHtml.sh start umls
    
    # deploy data - ~30 min
    cd ~/umls/data
    wget https://wci1.s3.amazonaws.com/TermServer/umls.sql.gz
    ### NOTE: if this step gets stuck (should take < 1 min) it means tomcat session has "Locked" the DB
    ### you're best bet is to log in as root and bounce tomcat with "service tomcat8 restart" 
    mysqlu < ~/umls/code/admin/mojo/src/main/resources/truncate_all.sql
    gunzip -c umls.sql.gz | mysqlu &
    wait
    mysqlu < ~/fixWindowsExportData.sql
    /bin/rm ~/umls/data/umls.sql.gz
     
    # recompute indexes (make sure latest code is built)
    ### SPECIAL NOTE: this requires 6G memory, the server must be taken down to run this step
    setenv MAVEN_OPTS "-Xmx6G  -Drun.config.test=/home/ec2-tomcat/config/config.properties.test"
    /bin/rm -rf /var/lib/tomcat8/indexes/umls/*
    cd ~/umls/code/admin/lucene
    mvn install -PReindex -Drun.config.umls=/home/ec2-tomcat/umls/config/config-load.properties >&! mvn.log &
    wait
    
    
    # Deploy and remove maintenance page
    /bin/cp -f ~/umls/code/rest/target/umls-server-rest*war /var/lib/tomcat8/webapps/umls-server-rest.war
    /opt/maint/getMaintHtml.sh stop umls
    
    # Remember to remove umls.sql.gz when finished (it takes a lot of space)
    
    



  11. Laucnch https://umls.terminology.tools/ and verify that it's up and running and loaded with data you expect (E.g. search for a UMLS concept new in the latest version)

  12. Announce new version
    1. UMLS Users List Template
    2. Twitter Template
    3. LinkedIn (see past post - may be a reply to a message on the SNOMED group)
    4. Update WCI resources.html - http://westcoastinformatics.com/resources.html


.