Sign inSign up

rwthacis/mobsos-data-processing

By rwthacis

•Updated over 5 years ago

Image
0

3.4K

rwthacis/mobsos-data-processing repository overview

⁠MobSOS Data Processing

Build Status codecov Join the chat at https://gitter.im/rwth-acis/mobsos

This service is part of the MobSOS monitoring concept and processes incoming monitoring data.

⁠Local Deployment

⁠Database

Set up the database. You can find the sql file in the etc⁠ folder.

After that, configure the property⁠ file of the service and enter your database credentials.

⁠Build

Execute the following command on your shell:

ant all
⁠Start

To start the service, use one of the available start scripts:

Windows:

bin/start_network.bat

Unix/Mac:

bin/start_network.sh

Have a look at the manual⁠ if you want to know how to monitor a node/service.

⁠How to run using Docker

First build the image:

docker build . -t mobsos-data-processing

Then you can run the image like this:

docker run -e MYSQL_USER=myuser -e MYSQL_PASSWORD=mypasswd -p 9011:9011 mobsos-data-processing

Replace myuser and mypasswd with the username and password of a MySQL user with access to a database named LAS2PEERMON. By default the database host is mysql and the port is 3306. The las2peer node is available via port 9011. Other nodes can now bootstrap this node and start sending messages if started with the --observer flag.

In order to customize your setup you can set further environment variables.

⁠Node Launcher Variables

Set las2peer node launcher options⁠ with these variables. The las2peer port is fixed at 9011.

VariableDefaultDescription
BOOTSTRAPunsetSet the --bootstrap option to bootrap with existing nodes. The container will wait for any bootstrap node to be available before continuing.
SERVICE_PASSPHRASEPassphraseSet the second argument in startService('service@version⁠', '<SERVICE_PASSPHRASE>').
SERVICE_EXTRA_ARGSunsetSet additional launcher arguments. Example: --observer to enable monitoring.
⁠Service Variables

See the property file⁠ for an overview of the settings. The database type is fixed at mysql for now.

VariableDefault
MYSQL_USERmandatory
MYSQL_PASSWORDmandatory
MYSQL_HOSTmysql
MYSQL_PORT3306
HASH_REMARKSFALSE
⁠Other Variables
VariableDefaultDescription
DEBUGunsetSet to any value to get verbose output in the container entrypoint script.
⁠Custom Node Startup

If the variables are not sufficient for your setup you can customize how the node is started via arguments after the image name. In this example we start the node in interactive mode:

docker run -it -e MYSQL_USER=myuser -e MYSQL_PASSWORD=mypasswd activity-tracker startService\(\'de.rwth.dbis.acis.activitytracker.service.ActivityTrackerService@0.6.0\', \'Passphrase\'\) startWebConnector interactive

Inside the container arguments are placed right behind the launch node command:

java -cp lib/* i5.las2peer.tools.L2pNodeLauncher -s service -p ${LAS2PEER_PORT} <your args>
⁠Volumes

The following places should be persisted in volumes in productive scenarios:

PathDescription
/src/node-storagePastry P2P storage.
/src/etc/startupService agent key pair and passphrase.
/src/logLog files.

Do not forget to persist you database data

Tag summary

Content type

Image

Digest

Size

391.9 MB

Last updated

over 5 years ago

docker pull rwthacis/mobsos-data-processing