A command line interface for creating & managing s6 services, using the s6 toolset
Project description
A command line interface for creating & managing s6 services, using the s6 toolset
Dependencies:
Python 3.6+
Plumbum
s6
BusyBox or (lsof, psmisc, coreutils)
musl-utils or glibc
Optional Dependencies:
lnav or multitail
highlight or bat
Installation
From PyPI:
pip install essex
# activate bash completion:
complete -o dirnames -C _essex essex
From 64-bit musl binary release:
wget "https://github.com/AndydeCleyre/essex/releases/download/1.2.0/essex-1.2.0-x86_64.tar.xz" -O - | tar xJf - -C /usr/local/bin essex _essex
complete -o dirnames -C _essex essex # bash completion
Usage
essex 1.2.0 Simply manage services Usage: essex [SWITCHES] [SUBCOMMAND [SWITCHES]] Meta-switches: -h, --help Prints this help message and quits --help-all Prints help messages of all sub-commands and quits -v, --version Prints the program's version and quits Switches: -d, --directory SERVICES_DIRECTORY:str folder of services to manage; the default is the first existing match from ('./svcs', '~/svcs', '/var/svcs', '/svcs'), unless a colon-delimited SERVICES_PATHS env var exists; -l, --logs-directory SERVICES_LOGS_DIRECTORY:str folder of services' log files; the default is SERVICES_DIRECTORY/../svcs-logs Sub-commands: cat View (all or specified) services' run, finish, and log commands; Alias for print disable Configure individual services to be down, without actually stopping them enable Configure individual services to be up, without actually starting them list List all known services log View a service's log new Create a new service off Stop all services and their supervision on Start supervising all services pid Print the PIDs of running services print View (all or specified) services' run, finish, and log commands pt Print a sample Papertrail log_files.yml reload Restart (all or specified) running services whose run scripts have changed; Depends on the runfile generating an adjacent run.md5 file, like essex-generated runfiles do; Alias for upgrade; Deprecated sig Send a signal to a service start Start individual services status View the current states of (all or specified) services stop Stop individual services sync Start or stop services to match their configuration tree View the process tree from the supervision root upgrade Restart (all or specified) running services whose run scripts have changed; Depends on the runfile generating an adjacent run.md5 file, like essex-generated runfiles do
Packaging
pip install -r requirements.txt
# Edit pyproject.toml as desired.
# Create a wheel and source distribution in dist/:
flit build
# Create a wheel and source distribution in dist/ AND upload to PyPI:
flit publish
One can build a single-file executable suitable for dropping into an Alpine-based container with s6 (no Python or Plumbum necessary), using Docker and pyinstaller-alpine.
From the inner essex folder:
docker run --rm -v "${PWD}:/src" inn0kenty/pyinstaller-alpine:3.7 -F --clean ./essex.py
It comes out to ~10MB. Alternatively, a build script using the same image, but Buildah rather than Docker, is included as mkbin.sh.
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
File details
Details for the file essex-1.2.0.tar.gz
.
File metadata
- Download URL: essex-1.2.0.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.21.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | be256de51f7cf7b51b380dcdcb14606e463c19d5e2211da74d22dd1fec6a1379 |
|
MD5 | c32ff7890fc006d11de31d80ab49d8b8 |
|
BLAKE2b-256 | bc30c89f9bee9e1e0080cce60f9929ea601ef7f32bb7a11f817a300efa9af847 |
File details
Details for the file essex-1.2.0-py2.py3-none-any.whl
.
File metadata
- Download URL: essex-1.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 30.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.21.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 728d95826cddb4dfc6ba4c29f8f50687cfcbbf6ec7e8a5475bdc83a2f668ed59 |
|
MD5 | abec0c2a33b1b3e33b54485958447f26 |
|
BLAKE2b-256 | 6adc3551ea084b9998480ec5f4293c6b7ab268b63f73e79dd1b11b06e6f175be |