...
- DuraStore - this web application provides the access to and management of storage resources, which includes handling the storage portion of the DuraCloud REST API
- StorageProviders - this set is made up of the StorageProvider interfaces and the implementations which connect to distinct cloud stores (currently Amazon S3, Rackspace CloudFiles, and Windows Azure)
- DuraService - this web application handles the deployment and management of services within DuraCloud , which includes handling the services portion of the DuraCloud REST API
- DuraBoss - this web application includes the reporter, executor, auditor, and manifest projects, each of which expose their own distinct set of calls via the DuraCloud REST API
- DurAdmin - this web application is the UI front end of DuraCloud, it provides users with a view into the information available from the other applications. DurAdmin uses the REST APIs of the other applications to communicate with them.
- Services - the set of all deployable services, as well as the support projects that allow the DuraCloud services infrastructure to function
- Security - handles security for the DuraCloud applications
- Common - a set of projects which provide utilities for other portions of the codebase to reuse
...
- Build and deploy the DuraCloud web applicationsSet up the OSGi services container
- Initialize the DuraCloud applications
- Test your installation
...
- Java 7
- 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.
- Maven 23.20.1x
- Tomcat 67.x
- ActiveMQ 5.7 or above
- SubversionGit
Setting up DuraCloud
Info |
---|
Any portions of the configuration below for which you need to include a replacement value will be written in all capital letters and included in brackets: [LIKE-THIS] |
...
Check out latest stable release from Subversion repository
Code Block svn cogit clone --branch 3.0.0 https://svngithub.duraspace.orgcom/duracloud/tags/duracloud-2.4.0
Set environment variables
Code Block export JAVA_OPTS="-XX:MaxPermSize=256m" export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=1024m"
- Configure Tomcat
Add to $CATALINA_HOME/conf/tomcat-users.xml
No Format <tomcat-users> <role rolename="manager"/> <role rolename="admin"/> <user username="[ANY-USERNAME]" password="[ANY-PASSWORD]" roles="admin,manager"/> </tomcat-users>
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" />
Start Tomcat
Code Block $CATALINA_HOME/bin/startup.sh
- Configure Maven2Maven3
Add tomcat user to $M2_HOME/conf/settings.xml
No Format <servers> <server> <id>tomcat-server</id> <username>[ANY-USERNAME]</username> <password>[ANY-PASSWORD]</password> </server> </servers>
Modify the default ActiveMQ configuration file (there a many configuration options but this is quick approach)
Code Block cd [ACTIVEMQHOME]/conf cp activemq.xml activemq.xml.orig [yourfaveditor] activemq.xml
DuraCloud expects the broker to run on localhost:61617. We will make it the default for simplicity by finding the "transport" stanza and modifying it.
<transportConnectors> <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB --> <transportConnector name="openwire" uri="tcp://0.0.0.0:61617?maximumConnections=1000&wireformat.maxFrameSize=104857600"/> <!-- <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&wireformat.maxFrameSize=104857600"/> --> <transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&wireformat.maxFrameSize=104857600"/>No Format Start ActiveMQ
Code Block cd [ACTIVEMQHOME]/bin ./activemq start
- Build
From top of source tree
Code Block mvn clean install
Set up the OSGi services container
This step assumes the successful completion of the previous build instructions
...
title | Linux/Mac |
---|
Start OSGi service container
...
...
...
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
|
Once the OSGi services container is running, check to ensure that it was created properly
- In the console where the "run" script was executed, an "osgi" prompt should be available. If it is not available, hitting enter should bring it up.
- Type "ss" and hit enter. This should list all of the available bundles. This list should include 50 items, all of which are either in the ACTIVE or RESOLVED state.
Initialize the DuraCloud applications
...
- Once all of the above steps have been completed, your DuraCloud should be ready to test.
- Go to http://localhost:8080/duradmin (change host or port as necessary).
- Log in using the credentials provided in your configuration file
- You should be able to view, add, update, and delete spaces and content in Spaces tabYou should be able to deploy services in the Services tab
- Congratulations! You now have a functional DuraCloud installation.
...
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>
To run clover
Code Block mvn clover2:instrument clover2:aggregate clover2:clover -Pprofile-clover
A report will be generated in the following directory:
//target/site/clover/
Service tests within OSGi (Linux only)
- Assuming that the OSGi services container is set up and running (as described above), tests that deploy services into the OSGi environment may be run
From inside the //integration-test module
Code Block mvn install -PrunServicesAdminTests
Logging
- DuraCloud uses the SLF4j logging framework backed by the LogBack implementation
- By adding either a logback.xml or logback-test.xml file on the classpath, logging configuration can be customized
DuraCloud internal tools
ServicesAdmin CLI
- This tool provides a command line interface for interacting with the 'services-admin' installed in a running OSGi container (see notes above for starting the container)
To build and run the CLI, from within the //servicesadminclient module
Code Block mvn assembly:assembly java -cp target/servicesadminclient-[VERSION]-cli.jar
Building Java client packages
...
Misc configuration/discussion
Services on Windows
The following services do not function in a Windows deployment environment
- WebAppUtilService
- HelloWebappWrapper
- J2KService
- ImageMagickService
...