Auto deploy geWorkbench web to afdev

From Informatics

Revision as of 20:35, 22 January 2014 by Myou (Talk | contribs)
Jump to: navigation, search

This is the instruction of setting up auto deploy process for geWorkbench web application on afdev server

Pre-Requirements

1. Install maven 3.1.1 version on afdev sever(http://maven.apache.org/download.cgi)

Please follow maven installation instructions to set up related environment variable.

2. Install git for linux on afdev sever(http://git-scm.com/download/linux)

Maven Deployment Setting

1. Add an user with administrator access right for Tomcat. To add Tomcat user, edit this file –“%TOMCAT_PATH%/conf/tomcat-users.xml“.

         <tomcat-users>
         <role rolename="manager-gui"/>
         <role rolename="admin"/>
         <user username="username" password="password" roles="admin,manager-gui"/>
         </tomcat-users> 

2. Add the same user authentication and profiles information in ~/apache-maven-3.1.1/conf/settings.xml.

        <servers>             
            <server>
               <id>TestTomcatServer</id>
               <username>username</username>
               <password>password</password>
            </server>
         </servers>
         <profiles>             
            <profile>
              <id>env-test</id>
              <activation>
                 <property>
                    <name>env</name>
                    <value>test</value>
                 </property>
              </activation>
              <properties>
                 <tomcatUrl>http://afdev.c2b2.columbia.edu:8082/manager/html</tomcatUrl>
                 <serverName>TestTomcatServer</serverName>
              </properties>
            </profile>   
          </profiles>

Initial Setting for Auto Deployment Script

1. login to afdev server as "cagrid" user

2. go to home directory of "cagrid", make directories "git_src" and "db_config"

3. copy persistence.xml to "db_config", this file is configurated for afdev server. It will replace the persistence.xml from check out.

4. go to "git_src" directory, use git to check out the maven project from https://github.com/geworkbench-group/geworkbench-web

4. go to "geworkbench-web" directory, you will find deployToTest.sh

5. add "deployToTest.sh" to crontab and run it as daily job