Skip to main content

Essex

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

Demo Video

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/2.0.2/essex-2.0.2-musl-x86_64.tar.xz" -O - | tar xJf - -C /usr/local/bin essex _essex
complete -o dirnames -C _essex essex  # bash completion

Usage

essex 2.0.2

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:path                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:path      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 (all or specified) services to be down, without actually stopping them
    enable                                                 Configure (all or specified) services to be up, without actually starting them
    list                                                   List all known services
    log                                                    View (all or specified) services' current log files
    new                                                    Create a new service
    off                                                    Stop all services and their supervision
    on                                                     Start supervising all services
    pid                                                    Print the PIDs of running services, or s6-svscan (supervision root) if none specified
    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 (all or specified) services
    start                                                  Start (all or specified) services
    status                                                 View the current states of (all or specified) services
    stop                                                   Stop (all or specified) 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.

Metadata

Release files for essex 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for essex 2.0.2
File Size Uploaded Provenance Actions
essex-2.0.2.tar.gz 13.0 kB Without provenance Details for essex-2.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for essex 2.0.2
File Interpreter ABI Platform Actions
essex-2.0.2-py2.py3-none-any.whl Python 3, Python 2 none any Details for essex-2.0.2-py2.py3-none-any.whl

Total release size: 45.0 kB

Release files / essex-2.0.2.tar.gz

Download URL essex-2.0.2.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3b159e68dc6023a980959dfcbda7c8cfa89e8d7ef64a203f7389fe2d63a54f88
BLAKE2b-256 checksum
How to use checksums
95aa8faf3924c0d5ed9a7b257c596f5b7591f7573dd601d9fd75041a9d4407fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.21.0

Release files / essex-2.0.2-py2.py3-none-any.whl

Download URL essex-2.0.2-py2.py3-none-any.whl
Size 32.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
a8b25de0e7548cd729ba5841088531fff1ae915cae227fe3f369c1d295279b34
BLAKE2b-256 checksum
How to use checksums
769afcec462addfb310f6801e1bb9e747c9542df3778b9d72777af58012fa74d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.21.0

Security for essex 2.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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