ECMind Supervisor
Project description
Documentation source
This README.md is just boilerplate for the wiki.
Parameters
--bind: The ip/interface where suvi listens at. [default: 0.0.0.0]
--port: The listening port. [default: 8080]
--enforce / --no-enforce: Require a basic auth login [default: no-enforce]
--admin-login: Username for the admin user [default: admin]
--admin-password: Password for the admin user
--user-login: Username for the standard user [default: user]
--user-password: Password for the standard user
--tasks: Where to look for task config files (.json files) [default: ./tasks]
--cycle: Update interval in seconds to look for new/deleted task config files [default: 10]
--logs: Directory where to store suvi and task log files. [default: ./log]
--log-rotate-when: When to rotate log files (H for hours, D for days or midnight) [default: midnight]
--log-rotate-interval: How many instances fo when have to pass before rotating the log file [default: 1]
--log-backup-count: How many file rollovers should be stored [default: 5]
--help: Show help message and exit.
Using environment vars to configure suvi
Parameters can be set via environment vars, example:
#/bin/bash
PW1=$(pwmake 80)
PW2=$(pwmake 80)
echo Setting admin password to "$PW1" and user password to "$PW2".
SUVI_ENFORCE=True \
SUVI_ADMIN_LOGIN=admin \
SUVI_ADMIN_PASSWORD="$PW1" \
SUVI_USER_LOGIN=user \
SUVI_USER_PASSWORD="$PW2" \
suvi
Using suvi.toml to configure suvi
Parameters can also be set by a suvi.toml file:
bind = "0.0.0.0"
port = 8080
enforce = true
admin_login = "admin"
admin_password = "RamesesII"
user_login = "user"
user_password = "TrustNo1"
tasks = "./tasks"
cycle = 5
logs = "./log"
log_rotate_when = "midnight"
log_rotate_interval = 1
log_backup_count = 5
The values of the configuration file are overwritten by console values. For windows service deployments, suvi.toml is expected at %WINDIR%\system32.
Task config files (.json)
type: Defines the startup strategy"type": "ondemand": Run the task on user interaction/get call."type": "keepalive": Automatically start the task with suvi and restart if necessary."type": "schedule": Automatically start the task with suvi and restart if necessary.
exec: Defines how to start the task"exec": "system": Starts an external executable viapopen"exec": "shell": Starts an external executable viapopenin the current system shell.- The "
args" list should be joined and instead just separated by spaces for the shell to interpret the command.
- The "
"exec": "stop": Stops (= kill & reload) tasks by config file name i. e. on a schedule- Example:
{ "type": "schedule", "schedule": "* 0 * * *", "exec": "stop", "args": [ "has-to-restart-sometimes" ], "cwd": "/tmp" } "args"may contain one or more config files names without the json extension
- Example:
"exec": "talend": Deflates & starts a talend job build to a zip package- When using
"talend"for"exec", this additional config parameters exist:"package": Path to the talend build zip file."java": Optional path to the java binary. When this path to thejavabinary is omitted, the system default will be used.
- The
cwdparameter is used as base path for deflated jobs. Whencmdis omitted, the system default temp path is used instead. - Example:
{ "type": "keepalive", "exec": "talend", "package": "/jobs/talend-demo-job-with-subtask.zip", "args": ["--context=Test", "-Xms256M", "-Xmx1024M"], "cwd": "/tmp", "info": "deflate and keepalive talend demo job" }
- When using
args: Array of startup params or an array of arrays it multiple programs should be started if the previous job succeeded"args": ["notepad.exe", "test.txt"]"args": [ ["notepad.exe", "test.txt"], ["calc.exe"] ]
cwd: Optional startup path for the task"cwd": "C:/temp"
env: Optional dictionary that extends/overwrites suvis environment variables"env": {"TAIL_FILE": "/tmp/test"}, "args": ["bash", "-c", "tail -f $TAIL_FILE"]
schedule: Read when"type": "schedule"is set to launch an instance of the task if not already running.- minutes, hours, days, month, weekdays
"schedule": "0 0,4,8,12,16,20 * * 1-5": Start Monday to Friday on every four hours.- The crontab syntax element
/is not supported at the moment. - Minutes range from
0to59 - Hours range from
0to23 - Days range from
1to31 - Month range from
1(Jan) to12(Dec) - Weekdays range from
1(Mon) to7(Sun) including0(also Sun)
tokens: Optional list of secret tokens to start a tasks without a password via HTTP GET or POST at/run/hook/<token>- Example:
"tokens": ["30d827f9-e22f-4b6a-85f1-bcb9977c6155", "69f541f8-614a-45f4-950b-67998c819ee0"] - When POSTing to a webhook of
"exec": "system", the raw body gets redirected to STDIN of the (first)"args"command.
- Example:
info: Optional markdown text to provide task info.- Line breaks have to be encoded as
\nin JSON.
- Line breaks have to be encoded as
Environment variables of tasks
The environment variables for the runtime of a task consist of:
SUVI_TASK_NAMEset to the task name.SUVI_EXEC_UUIDset to a unique uuid for each task execution. This uuid is unchanged between executions of subtasks (whenargsis a list is lists).- Variables set by the OS
- Variables set by
envtask configuration.
Change log
- Version 1.20
- Allow task args to be an array of arrays to run subsequent programs (and break if one fails).
requirements.txtadded.
- Version 1.21
- Removed push monitoring in favor of
/telemetry.jsonendpoint.
- Removed push monitoring in favor of
- Version 1.22
- Require user auth for telemetry endpoint.
- Version 2.0.0
- Remove
inifile in favour of command line arguments. - Make installable.
- Version scheme change to be compatible with pip.
- Remove
- Version 2.0.1/2.0.2
- Fixed base dir for installed app.
- Fixed package data for templates/static files.
- Version 2.1.0
- Remove
psutilsdependency; - therefore remove
/topand memory overview in/manage/.
- Remove
- Version 2.2.0
- Redesign & Licencing infos.
config.toml, command line options.
- Version 2.2.1
- Also log outputs with invalid UTF-8 chars
- Version 2.2.2
- Recursively kill child processes when stopping a task.
- Version 2.3.0
- Send POST message body of webhooks to STDIN.
- Version 2.3.1/2.3.2
- Set cycle default to
5seconds. - Design updates (i.e. allow to start/stop task from task log).
- Set cycle default to
- Version 2.3.3
- Add
shellsetting.
- Add
- Version 2.3.4
- Add suvi specific ENV variables
SUVI_TASK_NAMEandSUVI_EXEC_UUID. - Fix exec type to ondemand for unknown types.
- Add suvi specific ENV variables
- Version 2.4.0
- Refactoring of task internals.
- Version 2.4.1
- Python 3.6 compatibility.
- Version 2.4.2
- View global and tasks logs in plain text.
- Set log queues to 1000 lines (from 500).
- Add action buttons in task log list.
- Version 2.4.3
- Set task queues to 1000 lines (from 500).
- Version 2.4.4
- Fix token handling regression.
- Version 2.4.5
- Fix task listing for ondemand talend tasks.
- Version 2.4.6
- Fix talend infos in task list for non-running ondemand tasks.
- Version 2.4.7/2.4.8
- Fix suvi no more loading tasks after first parsing error.
- Refactor
"shell": "true"field to"exec": "shell". - Print missing file/directory on File Not Found errors in suvi log.
- Version 2.5.8
- Update to Bootstrap 5.3, htmx 1.92. and JQuery 3.7.0
- Version 2.5.9
- Update minium Python version to 3.9.
- Fix stop tasks bug.
- Version 2.6.0
- Switch Markdown parser to
python-markdown.
- Switch Markdown parser to
- Version 2.6.1
- Windows service stops will try to stop tasks before shutdown.
- Terminate frontend process on shutdown.
- Admin interface shutdown will shutdown suvi (service) itself.
- Change Windows service temp path to be consistent between starts.
- Version 2.6.2/2.6.3
- Update HTMX to 2.0.4.
- Allow filtering configured tasks, running tasks and task logs list.
- Version 2.6.4
- Upgrade to Pyton >= 3.12
- Version 2.7.0
- Open Source release
- Cleanups
- Remove build targets for old closed source edition
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file suvi-2.7.1.tar.gz.
File metadata
- Download URL: suvi-2.7.1.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7cda0dcc790d9913143d369914ee900bebb78c4e22f966b6502c880d7343592
|
|
| MD5 |
063ceea12eda065d870cae210c383367
|
|
| BLAKE2b-256 |
0441ef2896b04e4c928d64db7c275cacf2f09b69676f256cae6f9ab96bb1aaa1
|
File details
Details for the file suvi-2.7.1-py3-none-any.whl.
File metadata
- Download URL: suvi-2.7.1-py3-none-any.whl
- Upload date:
- Size: 189.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a208b34dfc065d4bdfd96f1ab17b1009d626695e7d3279205a30dbfa31c0cb54
|
|
| MD5 |
6bd141389292d7e68dc77619513f1b53
|
|
| BLAKE2b-256 |
ac376aed246f734a893bb65963487796bfc2cbf20016bd32d4ec5458ea1dece1
|