Orderly

orderly is a tool that provides ordered and controlled start, stop, restart and cleanup of a group of processes. It aims to be a building block for reliable servers/services/containers.

orderly draws inspiration from erlang supervisor trees, It provides mechanisms to build a tree of supervised processes, and failure can propagrate when process restarts rate exceeds a specified limit.

If this interests you, you can read the manual here.

Rationale

orderly was originally made to support reliable recovery of inter-dependant services after failure on a runit based linux system. In this configuration orderly runs beneath runit, providing grouping, left to right start and right to left cleanup that runit lacks. This allows for things like crashed fuse file systems to be cleanly unmounted and recreated, where the unordered restarts of runit cause problems.

orderly also addresses some quality of life problems when developing a group of servers. Generally when developing 'microservice' style projects you are stopping and starting many processes that depend on eachother. orderly makes this work easier, as a single terminal window + ctrl+c is all that is needed to reliably kill/restart all your services.

More complicated init systems like systemd support some of this functionality, but not for these use cases, and only for systems that go 'all-in' with systemd. The project author is a fan of the openbsd operating system for example, which does not even support systemd.

Example

$ orderly -max-restart-tokens 2 -restart-tokens-per-second 0.1 -- \ -name redis -run ./run-redis -wait-started ./wait-redis -- \ -name website -run ./run-website -check ./health-check-website -cleanup ./website-cleanup

For a full featured example with code, check the example directory.

Building from source

builds.sr.ht
status

Orderly is a rust project, so running cargo build is sufficient for most people after cloning the git repository.

Installation

Binary packages are not yet provided.

Contact

Try the mailing list

Or create a github issue

Sponsors

This project was sponsored by backupbox.io