Installing the TIMBUS Context Acquisition tool
Installing Virgo Jetty Server:
- Download "Virgo Jetty Server 3.6.2.RELEASE": from http://www.eclipse.org/virgo/download
- Extract Virgo Jetty Server and move it to directory /opt:
$> unzip virgo-jetty-server-3.6.2.RELEASE.zip
$> sudo mv virgo-jetty-server-3.6.2.RELEASE /opt - check if Virgo's folder doesn't require root privileges to perform changes
Virgo Repository:
- Download virgo-repo-usr-1.tgz and virgo-repo-usr-2.tgz
- Extract Virgo Repository files and move them to Virgo directory /repository/usr:
$> mkdir temp-repository
$> cd temp-repository
$> tar -zxvf ../virgo-repo-usr-1.tgz
$> tar -zxvf ../virgo-repo-usr-2.tgz
$> mv * /opt/virgo-jetty-server-3.6.2.RELEASE/repository/usr/
Jackson:
- Download jackson-xc-1.9.13.jar and move it to Virgo directory /pickup:
$> mv jackson-xc-1.9.13.jar /opt/virgo-jetty-server-3.6.2.RELEASE/pickup/
Configure the Virgo port:
- The default port is 8080. To change it, edit the configuration file on Virgo directory /jetty/etc/jetty.xml.
Launch Virgo starting on the Virgo /bin/startup.sh (recommended to use -clean argument if having problems):
$> ./startup.sh@ or @> ./startup.sh -clean@
Logging:
- All Virgo logs are stored in Virgo directory /serviceability/logs/log.log
Managing applications/bundles:
- Browse to localhost:8080 (or another port if you have configured so before). You should now see the Virgo splash screen:
- To manage applications/bundles, go to "Admin Console" (the default authentication is: user "admin" and password "springsource")
- Applications are deployed in the "Artifacts" tab and displayed under the "bundle" tree node
Deploying Extractors and Context Populators:
- Deploy the bundles Extractors Core and Converters Core first:
- Download extractors-core-1.0.0-RELEASE.war and converters-core-1.0.0-RELEASE.war
- On the Virgo admin console, select "Deployer", select both .war files and hit "Deploy".
- Two new bundles should have appeared now:
Now that the core bundles are deployed, we can deploy the business-specific bundles (extractors and populators):
- debian-software-extractor-1.0-SNAPSHOT.jar
- debian-software-converter-1.0-SNAPSHOT.jar
- dspace-extractor-1.0-SNAPSHOT.jar
- dspace-converter-1.0-SNAPSHOT.jar
Operating with the Context Acquisition tool
To use the APIs, POST requests must be sent with @Content-Type@ header set to application/json and raw body
Extractors API (GET if not mentioned):
- /extractors/api/extractors (lists all available extractors)
- /extractors/api/requests (lists all requests sent)
- /extractors/api/requests/{id} (shows a specific request, by id)
- /extractors/api/extract (POST)
Context Populator API (GET if not mentioned):
/populator/api/converters (lists all available converters)
/populator/api/requests (lists requests sent)
/populator/api/requests/{id} (shows a specific request, by id)
/populator/api/convert (POST)
/populator/api/reset (resets DIO and CUDF datasets in testbed's Jena Fuseki)
Extractors "extract" input:
for DSpace:
1 2 3 4 | {"extractions":[{ "fqdn":"...","port":80,"module":"DSpace Extractor" } ]} |
for software on Intel's testbed using timbus-cms' private key:
1 2 3 4 | {"extractions":[{ "user":"timbus-cms","fqdn":"testbed.timbusproject.net", "port":22,"module":"Debian Software Extractor" }]} |
for other software requests:
1 2 3 | {"extractions":[{"user":"...","fqdn":"...","password":"...", "port":22,"module":"Debian Software Extractor" }]} |
Context Populators "convert" input:
1 | {"url":"http://localhost:8080/extractors/api/requests/{id}","requestId":"{id}"} |
("url" is the full URI path to the request intended to be converted. Same ID should be specified in both_ url and requestId keys)