Skip to main content

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 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 --secret-key: Key used to sign the session cookie. If unset, it is derived from the configured logins and passwords --session-days: How long a cookie login stays valid, in days; 0 keeps the login only until the browser is closed [default: 30] --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"
session_days = 30
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 via popen
    • "exec": "shell": Starts an external executable via popen in the current system shell.
      • The "args" list should be joined and instead just separated by spaces for the shell to interpret the command.
    • "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
    • "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 the java binary is omitted, the system default will be used.
      • The cwd parameter is used as base path for deflated jobs. When cmd is 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" }
  • 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 */4 * * 1-3,5": Start every four hours Monday to Wednesday and Friday.
    • Minutes range from 0 to 59
    • Hours range from 0 to 23
    • Days range from 1 to 31
    • Month range from 1 (Jan) to 12 (Dec)
    • Weekdays range from 1 (Mon) to 7 (Sun) including 0 (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.
  • info: Optional markdown text to provide task info.
    • Line breaks have to be encoded as \n in JSON.

Environment variables of tasks

The environment variables for the runtime of a task consist of:

  • SUVI_TASK_NAME set to the task name.
  • SUVI_EXEC_UUID set to a unique uuid for each task execution. This uuid is unchanged between executions of subtasks (when args is a list is lists).
  • Variables set by the OS
  • Variables set by env task configuration.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

suvi-2.8.1.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

suvi-2.8.1-py3-none-any.whl (192.7 kB view details)

Uploaded Python 3

File details

Details for the file suvi-2.8.1.tar.gz.

File metadata

  • Download URL: suvi-2.8.1.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.16

File hashes

Hashes for suvi-2.8.1.tar.gz
Algorithm Hash digest
SHA256 279c95c57f22d2e223f60e18ace893f685143b9284170c7bdc76d5f77413af8b
MD5 6b480a0be568622494a4a6ae1908812b
BLAKE2b-256 acd969e08cc9fbef55805226ffa2a7873371bd05f7e73b587e512ce143406aa2

See more details on using hashes here.

File details

Details for the file suvi-2.8.1-py3-none-any.whl.

File metadata

  • Download URL: suvi-2.8.1-py3-none-any.whl
  • Upload date:
  • Size: 192.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.16

File hashes

Hashes for suvi-2.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1bdbd4c9782a81a8cb0ab876eed78d673993af1e9e9db93d2417cb253621cba3
MD5 8553663df17ff23e437aeb0a5b346cd4
BLAKE2b-256 07e9ee030c09f5778a577e84a3ac9e1279dc4c528eaa8bdc7618d11982459080

See more details on using hashes here.

Release history Release notifications | RSS feed

2.10.0

2 files

2.9.2

2 files

2.9.1

2 files

2.9.0

2 files

2.8.2

2 files

This release

2.8.1 This release

2 files

2.8.0

2 files

2.7.9

2 files

2.7.8

2 files

2.7.7

2 files

2.7.6

2 files

2.7.5

2 files

2.7.4

2 files

2.7.3

2 files

2.7.2

2 files

2.7.1

2 files

2.7.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page