Docker-compose based Ansible/SaltStack/NameYour minimalistic alternative. It is super-easy to use.
Misterio is a set of two tiny bash script you can use to "apply" a set of roles to a infinite numbers of hosts. Less then 100 lines of bash code (sorry Ansible :)
Misterio is able to manage a set of compose target as an one, appling status changes easily.
- The only dependency is a recent version of
docker
. - It does not rely on docker swarm or on K8s. It can run even on ultra-small nano containers on Amazon, provided you have little swap (tested)
- It is agent-less. It depends only on
docker
andbash
on the target. - Everything must be versioned to work: you cannot easily "forget" something on your local machine.
For every hostname, define a directory inside hosts/
Put in it an env
file based on this syntax:
<rolename>[@inst].env
where @inst
is OPTIONAL and can be used to have multiple instances on the same machine.
For every role on the target machine misterio will:
- copy the correct
env
file. - pass the command you provide to
docker-compose
- fail fast or loop
The "apply" pseudo-command will do a build
and up
in one step
NEW! You can use the pseudo command --list to get the list of all the roles, and the -- syntax to apply command only to a role.
A misterio-ssh demo script is provided to show how to propagate it on a set of remote hosts.
Misterio ssh needs a misterio
command followed by a list of targets:
./misterio-ssh apply pi@raspy1 peter@mayhome parker@newserver
./misterio-ssh logs pi@raspy1 peter@mayhome parker@newserver
./misterio-ssh down pi@raspy1 peter@mayhome parker@newserver
Misterio-ssh is quite smart; for every target it will
- Clone an ultra-small version of the repository and send it over the wire to the selected target
misterio-ssh
will try to usersync
and fallback toscp
if needed - Remote launch it
- Stop if an error occurs before step (1) Proceed to the next target if it fails
Misterio is also a collection of ready-made docker-compose infrastructure you can jump into. For instance, jenkins-with-docker show you how to get a dockerized-jenkins with:
- self running git server
- access to docker daemon to self-build stuff using docker plugin
Under docker for Windows, add COMPOSE_CONVERT_WINDOWS_PATHS=1 to your env path if you plan to bind stuff like
/var/run/docker.sock:/var/run/docker.sock
This will enable your roles to run on Windows and on Linux dameons seamlessly. See https://stackoverflow.com/a/52866439/75540 for more details
- It is trivial to parallelize
misterio-ssh
or the replacedocker compose
with K8s clusters (try and push me back). - You can add git submodules below
roles/
to link recipes (your personal "ansible galaxy" is docker hub!) - No complex stuff to learn: it is just DOCKER!
https://github.com/piku/piku is an heroku-like alternative, based on python and not requiring docker.