Versions Compared

Key

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

...

  1. Java 7
    1. The Oracle JDK is recommended for building DuraCloud, as this is the JDK used for DuraCloud testing and the djatoka service (used as a basis for one of the DuraCloud services) has known compatibility issues with open-jdk.
  2. Maven 3.0.x
  3. Tomcat 7.x
  4. Git

Setting up DuraCloud

...

  1. Check out latest stable release from Subversion repository

    Code Block
    git clone --branch 3.0.0 https://github.com/duracloud/duracloud
  2. Set environment variables

    Code Block
    export JAVA_OPTS="-XX:MaxPermSize=256m"
    export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=1024m"
    
  3. Configure Tomcat
    1. Add to $CATALINA_HOME/conf/tomcat-users.xml

      No Format
      <tomcat-users>
        <role rolename="manager-gui"/>
        <role rolename="manager-script"/>
        <role rolename="admin"/>
        <user username="[ANY-USERNAME]" password="[ANY-PASSWORD]" roles="admin,manager-gui,manager-script"/>
      </tomcat-users>
      
    2. Add to  $CATALINA_HOME/conf/server.xml

      Add the config attribute "URIEncoding" with value "UTF-8" to your Tomcat Connector.  Your connector may look like the following:

      No Format
      <Connector port="8080" protocol="HTTP/1.1" 
                     connectionTimeout="20000" 
                     redirectPort="8443"
                     URIEncoding="UTF-8" />
  4. Start Tomcat

    Code Block
    $CATALINA_HOME/bin/startup.sh
    
  5. Configure Maven3
    1. Add tomcat user to $M2_HOME/conf/settings.xml. Make sure that the username and password used here match those included in the tomcat-users.xml file.

      No Format
      <servers>
        <server>
          <id>tomcat-server</id>
          <username>[ANY-USERNAME]</username>
          <password>[ANY-PASSWORD]</password>
        </server>
      </servers>
      
  6. Build
    1. From top of the source tree, execute:

      Code Block
      mvn clean install
      

...

  1. Use the application initialization (app-config) utiltiy to configure the deployed DuraCloud applications
    1. Build app-config utility, from within the //app-config module

      Code Block
      mvn assembly:assembly
      
    2. Run the app-config utility from the //app-config/target directory

      Code Block
      java -jar target/app-config-[VERSION]-driver.jar <init.props>
      
      1. The init.props file is a configuration file which specifies all of the information necessary for the DuraCloud applications to run. An example of this file can be found at //app-config/src/main/resources/init.props. This file will need to be updated to match your environment.
    3. When the app-config utility completes successfully, the last line of output printed to the console will be the word "success". If this is not the case, check that your configuration file includes the correct information.

...

  1. The installers for the Sync Tool (Windows, Mac, Linux) are built using BitRock InstallBuilder Enterprise, so this tool must be installed locally.
    1. Download and install BitRock InstallBuilder Enterprise version 8.5.2 or above
    2. Place the license file for InstallBuilder in the InstallBuilder installation directory
  2. Update the maven settngs.xml file ($M2_HOME/conf/settings.xml) to include the path to the installbuilder executable
    1. Add a duracloud profile to include the InstallBuilder path, and include the duracloud profile in the set of active profiles

      Code Block
      <profiles>
        <profile>
          <id>duracloud</id>
          <properties>
            <installbuilder.executable.path>[FULL-PATH-TO-BITROCK-INSTALLBUILDER-EXECUTABLE]</installbuilder.executable.path>
          </properties>
        </profile>
      </profiles>
      
      ...
      
      <activeProfiles>
        <activeProfile>duracloud</activeProfile>
      </activeProfiles>
    2. From the //synctoolui directory in the DuraCloud source tree, execute

      Code Block
      mvn clean install -Pinstallers
    3. The installers can be found under the synctoolui/target directory
Code coverage
  1. If you plan on using Clover, the following element needs to be added to your maven 'settings.xml'

    No Format
    <profiles>
      <profile>
        <id>profile-clover</id>
        <activation>
          <property>
            <name>profile</name>
            <value>clover</value>
          </property>
        </activation>
        <properties>
          <cloverLicense>[LOCATION-OF-clover.license-FILE]</cloverLicense>
        </properties>
      </profile>
    </profiles>
    
  2. To run clover

    Code Block
    mvn clover2:instrument clover2:aggregate clover2:clover -Pprofile-clover
    
  3. A report will be generated in the following
    1. directory
    :
    //target/site/clover/
Logging
  1. DuraCloud uses the SLF4j SLF4J logging framework backed by the LogBack implementation
  2. By adding either a logback.xml or logback-test.xml file on the classpath, logging configuration can be customized

...

  1. To create a distributable zip of the storeclient, serviceclient, or reportclient which includes their dependencies, from within the project directory (//storeclient, //serviceclient, //reportclient) run

    Code Block
    mvn install -Ppackage-client
    
  2. The packaged zip will be found under the project's target directory

...