Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Log into the server 10.230.174.16
    1. You'll need to be able to sudo su - to root and ec2-tomcat.

  2. Update code:

    Code Block
    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:

    Code Block
    cd ~/code
    mvn -Dconfig.artifactId=term-server-config-prod clean install
  4. Stop tomcat, clear cache,and remove the currently deployed .war files (and associated folders):

    Code Block
    # 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
  5. Update the database if needed:

    Code Block
    mvn clean install -Drun.config=/home/ihtsdo~/config/config.properties -Dhibernate.hbm2ddl.auto=update

    Update file modification date to prevent caching issues:

    Code Block
    cd ~/code
    set date = `date +%Y%m%d%H%M`
    touch -t $date `find . -name "*"`
    
    
    
  6. Deploy war:

    Code Block
    /bin/cp -f ~/code/rest/target/term-server-rest*war /var/lib/tomcat7/webapps/term-server-rest.war
  7. Start service:

    Code Block
    service tomcat7 start

     

     
  • n/a