Versions Compared

Key

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

...

  1. Check out latest stable release from GitHub repository. Determine the release number of the latest stable release by going to https://github.com/duracloud/duracloud/releases and making a note of the tag name of the most current release.

    Code Block
    git clone https://github.com/duracloud/duracloud.git
    cd duracloud
    git checkout <latest-release-tag>


  2. Set environment variables

    Code Block
    export JAVA_OPTS="-XX:MaxPermSize=256m"
    export MAVEN_OPTS="-Xmx1024m
    


  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. Configure DuraCloud

    1. Create a duracloud properties file (/any/path/to/duracloud.properties) that contains the following keys: 

      No Format
      mill.db.name=<mill db name>
      mill.db.port=<mysql port>
      mill.db.host=<mysql host>
      mill.db.user=<username>
      mill.db.pass=<password>
       
      db.name=<ama db name>
      db.host=<mysql ama host>
      db.port=<mysql ama port>
      db.user=<username>
      db.pass=<password>


    2. Add -Dduraclouda system property (duracloud.config.file=/any/path/to/duracloud.properties ) to point to your duracloud configuration file.

      1. This can be done by adding the property directly to your JAVA_OPTS or CATALINA_OPTS environment variables. You can also set these values in $CATALINA_HOME/bin/setenv.sh (linux,osx) or $CATALINA_HOME/bin/setenv.bat (windows)

      .  The duracloud
      1. , for example:

        Code Block
        JAVA_OPTS="${JAVA_OPTS} -Dduracloud.config.file=file:c:/duracloud/duracloud-config.properties"


      2. The duracloud.config.file system property can also refer to an Amazon S3 address using the s3://<bucket>/<path to file> syntax provided your tomcat instance is running on an instance with the appropriate AWS credentials.  More information on AWS credentials management.

  5. Start Tomcat

    Code Block
    $CATALINA_HOME/bin/startup.sh
    


  6. Configure Maven
    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>
      


  7. Build
    1. From top of the source tree, execute (note that this build runs unit tests, but not integration tests):

      Code Block
      mvn clean install -DskipIntTests
      


  8. Bonus, running Integration Tests
    1. Grab a copy of the file in the codebase under common-json/src/main/resources/test-config.json and place it somewhere on your system
    2. You'll need an account for each of the providers to be tested. Update the JSON file to include your credentials. These tests actually communicate with each storage provider and verify that the calls being made work properly
    3. Add an environment variable called DURACLOUD-TEST-CONFIG with the value being the full path to your updated credentials JSON file.  A sample credential configuration file can be found in the baseline at  <project root>/integration/src/test/resources/test-config.json
    4. From the top of the source tree, execute 

      Code Block
      mvn clean install -pl integration


...