Ingest Service

JDK 1.6(+)
Java servlet container that accepts .war (e.g. tomcat, resin, jetta, ...)
Maven 2
Zookeeper 3.3.1 running and referenced in "queue.txt" (see Running under Tomcat)
zookeeper-recipes-3.3.1.jar Queueing library located at repository 'cdl-zk-queue'

Start by modifying property files at:

    Defining the location of "ingest home" is critical, for example

Create the distribution package: 
    mvn -Denvironment={stage,development,local} package

Architecture overview
Distribution package contains a war file which defines two servlets, poster and ingest.  

poster handles "batch" submissions, that is multiple objects per request.  Batches are defined in manifest (see Testing section)
Manifests are parsed and then queued in queueing service (Zookeeper).  A daemon process then polls queue and submits a "jobs" to the ingest service, which is housed in the ingest servlet.

If there is no need to process batches, then ingest service can be called directly.  Both ingest and poster support a REST and command line interface.

Running under Tomcat
Unpack distribution and move ingest_home/ template directory to location defined in properties (see above).
Modify template directory to customize user environment.

Ingest home structure:
    ingest-info.txt	(ingest configuration)
    logs/		(logging)
    profiles/		(user profiles)
    queue/		(ingest service working directory)
    queue.txt		(defines Zookeeper queue configuration)
    stores.txt		(defines Storage service)

Deploy war file in Tomcat noting that the hostname and port of servlet container must be defined at:
    ingest_home/ingest-info.txt (access-uri)

To allow ingest service to access data located in ingest home define a Context element in server.xml, for example
    <Context path="/ingestqueue" allowLinking="true" docBase="webapps/ingestqueue"/>

    Then create a symbolic link in the webapps directory, linking to ingest home queue directory.
	ln -s /dpr/ingest_home/queue ingestqueue

Running under Winstone
While this is a simpler deployment approach, minimal testing has been done with the Winstone servlet container (

java -jar winstone-0.9.10.jar --warfile=mrt-ingestwar-1.0-SNAPSHOT.war --httpPort=8090

See online help pages for manifest information and sample data:

Example manifest submission using queue (synchronous):
    curl --silent  \
        -F "file=@example.checkm" \
        -F "type=container-batch-manifest" \
        -F "submitter=sample-user" \
        -F "responseForm=xml" \
        -F "profile=sample-profile" \
Example manifest submission directly to Ingest (synchronous):
    curl --silent  \
        -F "file=@example.checkm" \
        -F "type=container-batch-manifest" \
        -F "submitter=sample-user" \
        -F "responseForm=xml" \
        -F "profile=sample-profile" \

Check Tomcat logs.