Overview
Describes how to redeploy the application to the WCI term-server.com server after a code update.
Details
- Log into the server 10.230.174.16
- You'll need to be able to sudo su - to root and ec2-tomcat.
- You'll need to be able to sudo su - to root and ec2-tomcat.
- Update 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=term-server-config-prod clean install
Stop tomcat, clear cache,and remove the currently deployed .war files (and associated folders).
# Stop the tomcat7 server
service tomcat7 stop
/bin/rm -rf /var/lib/tomcat7/work/Catalina/localhost/term-server-rest
/bin/rm -rf /var/lib/tomcat7/webapps/term-server-rest
/bin/rm -rf /var/lib/tomcat7/webapps/term-server-rest.war
Update the database if needed:
mvn clean install -Drun.config=/home/ihtsdo/config/config.properties -Dhibernate.hbm2ddl.auto=update
Update file modification date to prevent caching issues.
cd ~/code
set date = `date +%Y%m%d%H%M`
touch -t $date `find . -name
"*"
`
Deploy war
/bin/cp -f ~/code/rest/target/term-server-rest*war /var/lib/tomcat7/webapps/term-server-rest.war
Start service
service tomcat7 start
Run the integration tests.
cd
cd code/integration-test
mvn -DskipTests=
false
-Drun.config.test=~/config/config.properties test