This service is part of the MobSOS monitoring concept and provides visualization functionality of the monitored data to the web-frontend. Have look at the Wiki to see how you can create your own success models.
The Success-Modeling service uses the database with the monitored data. If you need to set up the database have a look at the MobSOS Data-Processing service.
After that configure the property file of the service and enter your database credentials.
databaseTypeInt = 2
databaseUser = exampleuser
databasePassword = examplepass
databaseName = exampledb
databaseHost = localhost
databasePort = 3306
useFileService = FALSE
catalogFileLocation = measure_catalogs/
successModelsFolderLocation = success_models/
The las2peer-FileService can be used for users to upload their own catalogs and success models if the feature is disabled the files are loaded from the filesystem. The paths are needed in both cases.
First make sure that your MySQL database is running. Otherwise the tests will fail. Execute the following command on your shell:
./gradlew clean build --info
If you want to skip tests you can run the following command:
./gradlew clean build -x test
To start the MobSOS Success-Modeling 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 need information about success models, measure catalogs and the different visualization types.
First build the image:
docker build . -t mobsos-success-modeling
Then you can run the image like this:
docker run -e MYSQL_USER=myuser -e MYSQL_PASSWORD=mypasswd -p 8080:8080 -p 9011:9011 mobsos-success-modeling
Replace myuser and mypasswd with the username and password of a MySQL user with access to a database named LAS2PEERMON. The initial database setup must be performed by the mobsos-data-processing container, which must be connected to the same database server. By default the database host is mysql and the port is 3306. The REST-API will be available via http://localhost:8080/mobsos-success-modeling and the las2peer node is available via port 9011.
In order to customize your setup you can set further environment variables.
Set las2peer node launcher options with these variables. The las2peer port is fixed at 9011.
Variable | Default | Description |
---|---|---|
BOOTSTRAP | unset | Set the --bootstrap option to bootrap with existing nodes. The container will wait for any bootstrap node to be available before continuing. |
SERVICE_PASSPHRASE | processing | Set the second argument in startService('service@version', '<SERVICE_PASSPHRASE>'). |
SERVICE_EXTRA_ARGS | unset | Set additional launcher arguments. Example: --observer to enable monitoring. |
See database for a description of the settings.
Variable | Default |
---|---|
MYSQL_USER | mandatory |
MYSQL_PASSWORD | mandatory |
MYSQL_HOST | mysql |
MYSQL_PORT | 3306 |
USE_FILE_SERVICE | FALSE |
CATALOG_FILE_LOCATION | measure_catalogs/ |
SUCCESS_MODELS_FOLDER_LOCATION | success_models/ |
Set WebConnector properties with these variables. httpPort and httpsPort are fixed at 8080 and 8443.
Variable | Default |
---|---|
START_HTTP | TRUE |
START_HTTPS | FALSE |
SSL_KEYSTORE | "" |
SSL_KEY_PASSWORD | "" |
CROSS_ORIGIN_RESOURCE_DOMAIN | * |
CROSS_ORIGIN_RESOURCE_MAX_AGE | 60 |
ENABLE_CROSS_ORIGIN_RESOURCE_SHARING | TRUE |
OIDC_PROVIDERS | https://api.learning-layers.eu/o/oauth2,https://accounts.google.com |
Variable | Default | Description |
---|---|---|
DEBUG | unset | Set to any value to get verbose output in the container entrypoint script. |
The following places should be persisted in volumes in productive scenarios:
Path | Description |
---|---|
/src/node-storage | Pastry P2P storage. |
/src/etc/startup | Service agent key pair and passphrase. |
/src/log | Log files. |