• Stars
    star
    158
  • Rank 229,919 (Top 5 %)
  • Language
    Rust
  • License
    MIT License
  • Created about 5 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Ordered process (re)start, shutdown, and supervision.

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/dev-environments.

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.

orderly does actions via external hooks written in any programming language you prefer. orderly does not make assumptions about your application or the setup/teardown that must be done to run it correctly and reliably.

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-start-tokens 2 -start-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.

Implementation status

The software works, but the interface is not stable and still being tweaked. Expect breaking changes between releases until version 1.0.0 is released.

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.

The program can be installed from cargo with cargo install orderly

Contact

Try the mailing list

Or create a github issue

Sponsor Messages

This project was sponsored by backupbox.io

Sponsoring

This project took time and effort to make, please sponsor the project via this paypal donation link.

Add a markdown message shorter than 70 characters total to your donation it will be added to the sponsor section. Note that sponsor messages may be rejected at the project authors judgement.

Authors

Andrew Chambers

More Repositories

1

bupstash

Easy and efficient encrypted backups.
Rust
872
star
2

c

small self hosting C compiler
C
454
star
3

janetsh

A powerful new shell that uses the janet programming language for both the implementation and repl.
C
366
star
4

hermes

Hermes software environment manager
C
308
star
5

cc

Cross platform C preprocessor and compiler.
Go
268
star
6

minias

A mini x86-64 assembler for fun and learning.
C
199
star
7

godothecorrectthing

A script to do actions based on the current window and selected text.
Shell
129
star
8

terraform-provider-nix

terraform provider that manages nix builds and nixos machines.
Go
105
star
9

ws-tcp-bridge

A proxy server, using nodejs which bridges websockets and tcp servers in either direction.
JavaScript
77
star
10

janet-sh

Shorthand shell like functions for janet.
Janet
77
star
11

sftpplease

SFTP <-> Cloud service bridge.
Go
69
star
12

cmips

cmips
C
57
star
13

hpkgs

A package repository for hermes
Shell
43
star
14

pycc

compiler
Python
35
star
15

qc

quick c
C
32
star
16

vscode-acmeish

A vscode extension to run system commands.
TypeScript
29
star
17

ddmin

A no frills delta debugger written in myrddin.
Roff
29
star
18

janet-pq

Bindings to libpq.
C
25
star
19

minipeg

A C peg parser generator (a fork of peg/leg)
C
18
star
20

jfmt

18
star
21

janet-big

A simple big integer library for janet
C
18
star
22

janet-jdn

17
star
23

coolpkg

The coolest package manager and deployment tool.
Python
16
star
24

janet-utf8

Janet routines for utf8 handling
C
16
star
25

poolparty

A synchronous, vm pooling http server for janet.
Go
15
star
26

janet-redis

Janet redis bindings based on hiredis
C
14
star
27

ShellCodeLinker

A python project that converts coffobject files (.o) built by mingw into an assembly file that can be built using nasm. When built using flat binary output this results in position independant shellcode generated by the c compiler.
Python
14
star
28

janet-uri

rfc3986 compliant url parser for janet.
Janet
13
star
29

fspec-tools

Tools to create filesystem images from an fspec filesystem specification.
C
13
star
30

janet-jcjit

A C extension jit for janet using libtcc.
C
13
star
31

asymcrypt

A tool for asymmetric cryptography
C
13
star
32

hafs

A high availability distributed filesystem built on FoundationDB and fuse.
Go
13
star
33

grafana-rrd-datasource

Graph and alert on '.rrd' data using grafana, RRDTool and RRDSrv.
Go
12
star
34

rrdsrv

An api server that exports a subset of rrdtool commands over http.
Go
12
star
35

magnet-linux

A decentralized linux distribution.
Shell
11
star
36

janet-yacc

An implementation of yacc for the janet programming language.
C
11
star
37

janet-posix-spawn

C
11
star
38

crushstore

A horizontally scaling object store based on the CRUSH placement algorithm.
Go
11
star
39

janet-process

A janet module for dealing with processes.
C
10
star
40

janet-pico-http-parser

http 1.1 parser for janet
C
10
star
41

bundle

Structured go concurrency with garbage collected goroutines.
Go
10
star
42

go-janet

A go port of the janet programming language.
Go
9
star
43

janet-ahttp

async aware http server library for janet
9
star
44

p2pkgs

A source based package tree with virtual environments, optional p2p mirrors and optional remote build caching.
Shell
9
star
45

janet-ctrl-c

A library for dealing with ctrl-c in janet
C
9
star
46

hm3

An embeddable programming language just for fun
C
9
star
47

janet-where-defined

Lookup where a Janet function was defined
C
9
star
48

plumbtool

A window manager command runner and plumbing tool.
9
star
49

janet-cloader

C
9
star
50

go-cdclient

Fast implementation of the collectd network protocol for go.
Go
7
star
51

janet-rlrepl

A jpm module providing a gnu readline repl.
C
7
star
52

janet-httpkit

A framework agnostic toolkit for use when writing janet http handlers.
7
star
53

hpkg

Assembly
7
star
54

janet-md-doc

Generate markdown documentation for a janet-module
7
star
55

janet-nested-text

An implementation of NestedText for the Janet programming language
7
star
56

trusting-trust

Mostly trustworthy paths to self hosted linux userspace.
Shell
7
star
57

hm

6
star
58

janet-glob

Pure janet globbing
Janet
6
star
59

janet-datafog

A janet datalog engine
6
star
60

janet-pgjobq2

Second generation of the janet postgres job queue.
6
star
61

gslite

A lightweight alternative to google cloud sdk gsutil.
Go
5
star
62

janet-unify

5
star
63

ocker

less d than docker, more openbsd
Shell
5
star
64

syshook

Scriptable syscall tracing
C
5
star
65

go-dhallconfig

Dhall config for go.
Go
5
star
66

jsonsort

Sort large amounts of json using coreutils sort
Go
5
star
67

janet-ll

A low level rust crate providing bindings to the janet interpreter.
C
5
star
68

sup

C
5
star
69

ddmin-python

A python implementation of delta debugging tool.
Python
5
star
70

shardfs

A sharding filesystem for linux based on the 9P2000L protocol
4
star
71

g

g programming language
Go
4
star
72

janet-logfmt

A logfmt log library for janet.
C
4
star
73

rwpart

Write partitions to raw disk images.
C
4
star
74

janet-base16

Base 16 encoding/decoding of buffers.
C
4
star
75

pkgfs

read only package union file system.
C
4
star
76

EncryptedBackupShootout

Shell
4
star
77

qasm

C
4
star
78

janet-redo

Prototype of redo in janet.
4
star
79

janet-pgjobq

A simple fifo jobq backed by postgres using redis pubsub.
3
star
80

gomodver

A package to parse version information from go.mod version identifiers.
Go
3
star
81

mips-baremetal

gcc toolchain for mips 4kc/p/m processor with no OS
C
3
star
82

cchan

Go style channels in C.
C
3
star
83

fifolog

C
3
star
84

plmap-rust

Parallel pipelined map over iterators.
Rust
3
star
85

emailcontrolledgate

Shell
3
star
86

gosrcs

Print all source code for a given go package or module.
Go
3
star
87

janet-bare1

BARE encoder/decoder for janet
C
3
star
88

janet-shlex

3
star
89

p92000l-rust

9P2000.L library for rust.
Rust
3
star
90

srop

Simple remote object protocol
Go
3
star
91

promcron

A simple cron service which exports prometheus metrics
Go
3
star
92

bfjit_x86_64

a brainfuck interpreter for x86_64 that uses jit
C
3
star
93

janet-flock

C
3
star
94

encr

A no frills stream encryption tool.
Roff
3
star
95

cts

c test suite
C
3
star
96

mummipy

bundles a loosely specified python requirements.txt into a standalone tarball.
Shell
3
star
97

cdcron

A cron daemon that exports collectd metrics.
Go
2
star
98

janet-fork

C
2
star
99

janet-rs

Higher level bindings for the janet C API.
Rust
2
star
100

qlite

A simple command line disk based queue
Python
2
star