Misterio Is Back

About 5 years ago, I designed a very simple, stateless container manager called Misterio during my cool experience as DevOps engineer.

Misterio born because I feel K8s a little too much for simple stateless services. Originally Misterio was just a thin bash layer around docker client-server architecture.

During the past days, I re-wrote Misterio in Python 3.x, and it is easier to use and more compact.

Misterio is a little Python 3 program which use ssh protocol to connect to every host. Just define two directories in the misterio home: one called hosts and one called roles. Collect inside roles all your services, as docker compose stack, one per directory.

For every host define a folder inside hosts with a set of env file, named as the role. The file inside hosts/<hostname> is an env file you can use to parametrize the docker-compose.

If you have stateless microservices you can easily manage multiple hosts in an homelab; give it a spin and let me know what do you think

 1$ misterio --help
 2Usage: misterio [OPTIONS] [DOCKER_COMMAND]...
 3
 4  M I S T E R I O docker compose-based alternative to K8s/Ansible/SaltStack
 5
 6  By default the system will scan all the hostname inside
 7  $MISTERIO_HOME/hosts/ and connect to every of them using
 8  DOCKER_HOST=ssh://<hostname> for connection
 9
10  Examples:
11
12  Ensure everything is configured properly:
13
14      mistero apply
15
16  Verify logs of all services to just one server:
17
18      misterio -h wonderboy -- logs --tail 5
19
20  Verify clustered elastic-service on all nodes:
21
22      misterio --single-role elastic-service ps
23
24  Verify elastic service on just two nodes, named wonderboy and adam:
25
26      misterio -h wonderboy -h adam --single-role elastic-service ps
27
28Options:
29  --home TEXT               Home of hosts and roles folders. Can be set with
30                            MISTERIO_HOME
31  -h, --misterio-host TEXT  Default to single hostname restriction. Can be
32                            overriden also with MISTERIO_HOST.
33  --list / --no-list        List roles and exits
34  -r, --single-role TEXT    Process just one role
35  --version                 Show the version and exit.
36  --help                    Show this message and exit.