Installing AntHill Server by dandanhuanghuang

VIEWS: 12 PAGES: 3

									Installing AntHill Server

Getting AntHill Files and Dependencies

   1. Install the AntHill.jar, Butler.jar, log4j.jar, ant.jar, jaxp.jar, and parser.jar into an
      anthill directory within a subfolder named lib.
   2. Create a log directory under the created anthill directory.
   3. Set-up your web container server to manage the AntHill server:

   For Apache Jakarta-Tomcat:
       4. Create an application for AntHill by modifying the server.xml file in the conf directory. Add the
          following to the file within the <ContextManager> tags:

               <Context path="/anthill"
                      docBase="/usr/share/anthill/web"
                      crossContext="false"
                      debug="0"
                      reloadable="true" >
               </Context>

       5. Create a WEB-INF directory within the bocBase directory specified in the above step. Create a
          web.xml file within the new directory to map the AntHillServlet to incoming requests. The xml file
          must pass the servlet two initial parameters. The first in the appName parameter which allows
          AntHill to find an initialize Butler and log4j. The second is the file location and name of the file
          containing the project information in a Butler registry file format. The contents of the file will be
          discussed later.

           Example of web.xml:

               <servlet>
                     <servlet-name>anthill</servlet-name>
                     <servlet-class>com.urbancode.anthill.AntHillServlet</servlet-
                     class>
                     <init-param>
                            <param-name>appName</param-name>
                            <param-value>anthill</param-value>
                     </init-param>
                     <init-param>
                            <param-name>registryFile</param-name>
                            <param-value>
                                  d:\projects\lividblue\anthill\bin\anthill.registry
                            </param-value>
                     </init-param>
               </servlet>
               <servlet-mapping>
                     <servlet-name>anthill</servlet-name>
                     <url-pattern>/anthill</url-pattern>
               </servlet-mapping>


       6. Modify the tomcat.bat or tomcat.sh file within Tomcat’s bin directory. Add the AntHill.jar,
          Butler.jar and log4j.jar files to the CLASSPATH.
    Example of tomcat.sh:

        ANTHILL_HOME=/usr/share/anthill
        CLASSPATH=${CLASSPATH}:${ANTHILL_HOME}/lib
        CLASSPATH=${CLASSPATH}:${ANTHILL_HOME}/lib/AntHill-1.0.6.jar
        CLASSPATH=${CLASSPATH}:${ANTHILL_HOME}/lib/Butler-1.0.12.jar
        CLASSPATH=${CLASSPATH}:${ANTHILL_HOME}/lib/log4j.jar

    Example of tomcat.bat:

        set ANTHILL_HOME=d:\programs\lividbluelib\anthill\
        set CLASSPATH=%ANTHILL_HOME%\lib\Butler-1.0.12.jar;
                      %ANTHILL_HOME%\lib\Log4j.jar;
                      %ANTHILL_HOME%\lib\AntHill-1.0.6.jar

7. Add a java system property, anthill.home.dir, to the JVM invocation of Tomcat. It should be
   set to a directory containing the lib directory with the following jar files: jaxp.jar, parser.jar
   and ant.jar that were created in step 1. Also, enable Butler to find the registry file containing the
   initialization of Butler by setting a java system property, butler.root.anthill, in the JVM
   invocation of Tomcat. Set this property to the directory containing the anthill.registry file.

    Example of tomcat.sh:

        $JAVACMD $TOMCAT_OPTS -Danthill.home.dir=/usr/share/anthill
              -Dbutler.root.anthill=/usr/share/anthill/bin
              -Dtomcat.home=${TOMCAT_HOME}
              org.apache.tomcat.startup.Tomcat "$@" &

    Example of tomcat.bat:

        %_STARTJAVA% %TOMCAT_OPTS% -Danthill.debug=true
              -Dtomcat.home="%TOMCAT_HOME%"
              -Danthill.home.dir=d:\programs\lividbluelib\anthill\
              -Dbutler.root.anthill=D:\Projects\lividblue\AntHill
              org.apache.tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9

8. Create an anthill.registry file in the Butler registry file format. All entries in the registry file should
   start with AntHill java package name: com.urbancode.anthill. Following that, elements should
   contain a project name or abbreviation unique to each project. Each project should have keys and
   values for the following elements:
       a. PROJECT_NAME – the project deployment name
       b. BUILD_SCRIPT – the relative path within the project to the ant script file
       c. DEPLOY_DIRECTORY – the base directory to send all deployment files to
       d. REPOSITORY_              ADAPTER – the full java classname of the RepositoryAdapter
            implementation
       e. VERSION_ADAPTER – the full java classname of the VersionAdapter implementation

    Depending upon the VersionAdapter and RepositoryAdapter used, you made need to specify other
    entries. Those for the VersionAdapter will continue with version and those for the
    RepositoryAdapter will continue with repository.

    Example of project registry file, anthill.registry:

        com.urbancode.anthill.si.PROJECT_NAME = WaffleHouse
com.urbancode.anthill.si.BUILD_SCRIPT = bin/buildClient.xml
com.urbancode.anthill.si.DEPLOY_DIRECTORY =
      d:\projects\lividblue\anthill\source\test\web\SupplierInsight
com.urbancode.anthill.si.REPOSITORY_ADAPTER =
com.urbancode.anthill.adapter.CVSRepositoryAdapter
com.urbancode.anthill.si.VERSION_ADAPTER =
com.urbancode.anthill.adapter.ButlerVersionAdapter
com.urbancode.anthill.si.version.BUTLER_VERSION_FILE =
      WaffleHouse/supplierinsight.registry
com.urbancode.anthill.si.repository.CVS_MODULE = SupplierInsight/XML
com.urbancode.anthill.si.repository.CVS_ROOT =
      :pserver:ryan@cvs.urbancode.com:/usr/local/cvs

								
To top