Overview

Describes how to redeploy the mapping tool to the IHTSDO mapping.ihtsdotools.org server when the code has been updated.

 

Details

  1. Log into the server (mapping.ihtsdotools.org).

  2. Get latest code:

    cd ~/code
    git pull
    
  3. Build all of the code, making sure to choose the correct "config.artifactId" for your environment.  Shown is "prod" configuration:

    cd ~/code
    mvn -Dconfig.artifactId=mapping-config-prod clean install
  4. Stop tomcat and clear prior application builds (to avoid server-side caching):

    # Stop the tomcat7 server
    service tomcat7 stop
    /bin/rm -rf /var/lib/tomcat7/work/Catalina/localhost/mapping-rest
    /bin/rm -rf /var/lib/tomcat7/webapps/mapping-rest
    /bin/rm -rf /var/lib/tomcat7/webapps/mapping-rest.war
  5. Update the database if needed:

    mvn clean install -Drun.config=~/config/config.properties -DUpdatedb -Dhibernate.hbm2ddl.auto=update
  6. Deploy war files:

    /bin/cp -f ~/code/rest/target/mapping-rest*war /var/lib/tomcat7/webapps/mapping-rest.war
    
  7. Start service and link "doc" directory:

    service tomcat7 start
    
    # wait for deploy to create the ROOT directory
    sleep 10
    # link doc directory
    cd /var/lib/tomcat7/webapps/mapping-rest
    ln -s ~/data/doc
  8. NOW, if deploying to PROD, create a github pull request.

  • n/a
  • No labels