Overview
Describes how to redeploy the mapping tool to the IHTSDO mapping.ihtsdotools.org server when the code has been updated.
Details
- Log into the server 162.243.215.76 (mapping.ihtsdotools.org).
Get latest code:
cd ~/code git pull
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
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
Update file modification date to prevent caching issues:
cd ~/code set date = `date +%Y%m%d%H%M` touch -t $date `find . -name "*"`
Update the database if needed:
mvn clean install -Drun.config=~/config/config.properties -Dhibernate.hbm2ddl.auto=update
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
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
NOW, if deploying to PROD, create a github pull request.
References/Links
- n/a