Commit f6941001 by Lars Kosmann

Added Documentation files

parent 91cd5126
# Configuration
```
export IMGSEE_BOARD_ID="XT2_$(cat /etc/machine-id)"
export IMGSEE_PERFFILE_ID="HWP8-Jetson04"
export IMGSEE_QUEUE_URL="10.10.108.30"
export IMGSEE_QUEUE_PORT="61616"
export IMGSEE_QUEUE_DESTINATION_PERF="test.ImagingBenchmark"
export IMGSEE_QUEUE_DESTINATION_IN="test/ImagingQueue"
export IMGSEE_SOURCE_BASE_PATH="/media/data/offis01_imi06/"
export IMGSEE_TARGET_BASE_PATH="/media/data/"
export IMGSEE_MAXNUMOFMESSAGINGTASKS=100
export IMGSEE_MAXRECEIVERCOUNT=1
export IMGSEE_MAXTHREADS=10
export IMGSEE_RESERVEDTHREADS=8
export IMGSEE_LOGFOLDER="/media/data/logs/"
```
For
# Usage
## Configuration
There are some options that need to be set in order to configure the imgsee. These configurations are done by evnironmental variables. The options are:
```
IMGSEE_BOARD_ID
IMGSEE_PERFFILE_ID
IMGSEE_QUEUE_URL
IMGSEE_QUEUE_PORT
IMGSEE_QUEUE_DESTINATION_PERF
IMGSEE_QUEUE_DESTINATION_IN
IMGSEE_SOURCE_BASE_PATH
IMGSEE_TARGET_BASE_PATH
```
An example configuration can be seen in the file `jetsonsee/src/env.sh` which is listed below.
```
export IMGSEE_BOARD_ID="XT2_$(cat /etc/machine-id**"
export IMGSEE_PERFFILE_ID="0"
export IMGSEE_QUEUE_URL="activemq"
export IMGSEE_QUEUE_PORT="61616"
export IMGSEE_QUEUE_DESTINATION_PERF="PERF"
export IMGSEE_QUEUE_DESTINATION_IN="test/ImagingQueue"
export IMGSEE_SOURCE_BASE_PATH="/home/m2dc/data/offis01_imi06"
Export IMGSEE_TARGET_BASE_PATH="/home/m2dc/data/output"
```
# Docker container for boardless development
There is a Dockerfile for building a similar environment just without visionworks, e.g. for local development. The Dockerfile can be found here
```
docker/devboard/Dockerfile
```
The image simply can be created using the following command in the devboard folder
```
docker build --rm -t devboard .
```
The image will compile OpenCV as of version 3.3.x seems not to be available for Ubuntu 16:04, as well as ActiveMQ. The docker container can be run using this command:
```
docker run --Cap-add=SYS_PTRACE --security-opt seccomp=unconfined \
--net imgnet -it -v /imgsee/jetsonsee:/jetsonsee -v /runtime/mnt:/PRODUCTION devboard /bin/bash
```
The mounted folder `/imgsee/jetsonsee` is where the code lives and `/runtime/mnt` is a folder which is used as some kind of virtual filer. This is where your data lives. When using with MyPhotos, this folder will also be mounted to the tomcat-docker. To allow gdb debugging, the flags `--Cap-add=SYS_PTRACE --security-opt seccomp=unconfined` are added. The flag `--net imgnet` starts a docker network which allows direct connection to other containers and is not necessary. The imgsee does not expose any ports.
# Joblist format
## ActiveMQ
## Job format
### Headers
Producer may implement different ways to set message headers. There are predfined header entries, but you can also
define header settings on your own. However some headers are necessary to be set.
The SEE will only fetch messages with the `Type` or `JMType` header `TransformTask`. This is handled by a filter statement
while subscribing the queue to ensure only messages of this type are pushed to consumers.
For MyPhotos, a request-response pattern was implemented. This pattern requires the header `JMSReplyTo` to be set to a name for a
(temporary) queue that is used for replies. Identification of jobs is then done by the `JMSCorreltionId` setting. As example a header might look like this:
```
{
"JMSType": "TransformTask",
"JMSReplyTo": "myphotos/replies",
"JMSCorreltionId": "ae51fc123af"
}
```
The SEE will always produce a [Response](#response) and send it to the defined reply. You may ignore it in case of Benchmarking or use it for generating metrics.
### Body
The message body is defined as job description in JSON format.
```
{
"cropLeft": 0,
"cropTop": 0,
"cropWidth": -1,
"cropHeight": -1,
"rotation": 0,
"rotateFirst": false,
"scalingMode": "",
"imiCaller": "benchmark",
"useJpegCompressionOnly": false,
"inputFilename": "310/31017_DSC_0081.JPG",
"outputFilename": "output/310/tmp_[31017_DSC_0081.JPG].jpg",
"allowMultistepBilinearScaling": true,
"width": 170,
"height": 170
}
```
### Response
The response object may be parsed in order to handle errors or delivery of files to the user. An example is given here:
```
{
"executionHostname":"HWP8-Jetson01"
"status":0
"executionTimeInMillis":131
"operationTimeInMillis":43
"lastThrowable":""
}
```
Entries:
- `status` indicates the process outcome with `0` as successfull and other `int` as failure
- `lastThrowable` In case of Failure carries a `string` describing the error (exception)
- `executionHostname` is currently set to the environmental variable `IMSEE_PERFFILE_ID` and indicates the responders hostname
- `executionTimeInMillis` is measured at the beginning and end of the scaleImage() method (TODO: LINK) including load and save of the image
- `operationTimeInMillis` is measured directly before and after the scale operation
# Overview
## SEE
### Dependencies
Ubuntu 16:04
Jetpack 3.2
Build tools are required:
```
sudo apt-get install build-essential cmake autogen
```
For ActiveMQ the following libraries are required
```
sudo apt-get install uuid-dev libapr1 libapr1-dev openssl libssl-dev libspdlog-dev libglfw3 libglfw3-dev
```
ActiveMQ can be combiled using folling commands:
```
git clone https://git-wip-us.apache.org/repos/asf/activemq-cpp.git
cd /activemq-cpp/activemq-cpp
./autogen.sh && ./configure && make
make install
```
If parts of the libraries can not be found during compilation, run `ldconfig` in order to update dependency caches.
### Build SEE
## Ansible Deployment
Have a look at the documentation of the [Ansible deployment repository](http://gitlab.m2dc.eu/middleware/m2dc-ansible)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment