Source

mrt-fixity / README-SETUP.txt


* Requirements
JDK 1.6(+)
Java servlet container that accepts .war (e.g. tomcat, resin, jetta, ...)
ant
maven
MySQL
________________________________

* Create mrt-fixity/fixity-conf/properties/Fixity.properties
FixityService=[absolute file path to fixity home]
db.url=[jdbc path to my MySQL]
    example: db.url=jdbc:mysql://127.0.0.1:3306/merritt?characterEncoding=UTF-8&characterSetResults=UTF-8
db.user=[write access MySQL user]
db.password=[write access password for this user]
________________________________

* Build projects using maven on mrt-fixity
cd mrt-fixity
mvn clean
mvn install
________________________________

* Build needed MySQL tables
The MySQL commands used to create the needed tables for fixity can be found at:
mrt-fixity/fixity-src/src/main/java/sql/current.db.sql
________________________________

* Create a fixity home directory
Fixity uses a home directory. See spec for architecture.
A demo version of the home directory can be created by 

cd mrt-fixity/fixity-demo
mvn install

The demo home location is based on the mrt-fixity/fixity-conf/properties/Fixity.properties
FixityService=[absolute file path to fixity home] property 
(see step above for setting these properties)
________________________________

Edit  - these ant properties define the 

Properties:
-storage.node=[absolute file path to storage node that will be constructed by script]
Example: storage.node=/home/me/store
Required

-can.node=[absolute file path to CAN node that will be constructed by script]
The actual storage of the pairtree/dflat architecture will occur under ths directory.
Example: can.node=/home/me/node
Required

-can.info.identifier=[any number - used in restful interface]
The Storage Service restful calls use this number which must be unique to the
Storage service.
Example: can.info.identifier=10
Required

-store.info.baseURI=[Absolute URL that will be used for the Storage Service]
This is the URL for your Storage Service calls.
Example: http:storge.myhost.org:8080/storage
Required

-exists.storage.node=delete
if present then delete storage service every time clean/build is done in maven
Default: do not delete

-exists.can.node=delete
if present then delete CAN every time clean/build is done in maven
Default: do not delete

NOTE: If you are using Windows for your Storage Service, then the file paths that you
set in the properties need to be specified in a unix style format with forward slashes:
C:/Documents and Settings/dloy/...

* run maven
cd to downloaded version of ingest-storage-feeder (refered to as base/)
mvn install

This should build a working storage service

________________________________

* Run cmdline test
The following target will add files to the created storage/can
1. cd base/storage/store-demo
2. ant -f make-store.xml test-cmdline-unix

________________________________

* Building a working servlet
After running the previous step a storage.war file will now exist that can be used
on the Storage Service defined by the previous step.

The .war is base/store-war/war/storage.war

Place this .war in a java container (tomcat, resin, jetta, ...) and start the container.

The restful interface should now be available at[store.info.baseURI]

Test:
- [store.info.baseURI]/state 
Example: http:storge.myhost.org:8080/storage/state - Storage Service state

- [store.info.baseURI]/state/[[store.info.baseURI]
Example: http:storge.myhost.org:8080/storage/state/10 - CAN state


============================================
Note:
- Storage service URLs are sensitive to slashes (/) so URL encoding is required for any
URL element containing a slash:
http://storge.myhost.org:8080/storage/state/15/ark%3A%2F13030%2Fabcd