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

Compare with Current View Page History

« Previous Version 2 Next »

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 162.243.215.76 (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/ROOT
    /bin/rm -rf /var/lib/tomcat7/webapps/mapping-rest.war
    /bin/rm -rf /var/lib/tomcat7/webapps/ROOT.war
  5. Update file modification date to prevent caching issues:

    cd ~/code
    set date = `date +%Y%m%d%H%M`
    touch -t $date `find . -name "*"`
  6. Update the database if needed:

    mvn clean install -Drun.config=~/config/config.properties -Dhibernate.hbm2ddl.auto=update

     

  7. Deploy war files:

    /bin/cp -f ~/code/rest/target/mapping-rest*war /var/lib/tomcat7/webapps/mapping-rest.war
    /bin/cp -f ~/code/webapp/target/mapping-webapp*war /var/lib/tomcat7/webapps/ROOT.war
  8. 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/ROOT
    ln -s /home/ihtsdo/data/doc
  9. NOW, if deploying to PROD, create a github pull request.

  • n/a
  • No labels