Whaleprint allows to manage DAB (distributed application bundle) as service blueprints for docker swarm mode
After playing around with docker experimental DAB's we realized
that even though the concept looks promising, the tooling around it was somehow poor and pretty much useless. The only thing that you can do with this as today ise
generate a DAB from a docker-compose
yml file and then run docker stack deploy
or docker deploy
in order to deploy it to your swarm mode cluster and that's pretty much it.
We immediately started thinking of different ways to enhance the dev & ops experience with this new feature and we came up with some nice ideas that makes this possible. The main concept behind this project is that we believe service stack deployments (specially in production) should be transparent, reliable and above all declarative and not imperative.
Whaleprint makes possible to use your current DAB files as swarm mode blueprints and will show you with extreme detail exactly which and how your services will be deployed/removed. At the same time it will also handle service update diffs describing precisely what things will change and what will be their new updated value.
Check it out!:
--target
optionCheck this YouTube video to see a demo: https://www.youtube.com/watch?v=nwtJflxY560
Just download the binary for your platform from the Releases section, put it anywher in your PATH and enjoy!
Whaleprint not only supports current DAB format but it also extends it in a backward-compatible way and allows to specify some other properties like Replicas and Constraints (more features to come).
Here's an example:
{
"services": {
"vote": {
"Image": "docker/example-voting-app-vote@sha256:20faa449b42b5f0797b1b1a3028a2dd7ac0ece00b0d100b19e6dff4d1a0af2e3",
"EndpointMode": "dnsrr", // Here we set the endpoint mode
"Constraints": [
"engine.labels.disk == ssd" // We can also add custom constraints
],
"Replicas": 5, // And set the number of replicas
"Networks": [
"fruta"
]
}
},
"version": "0.1"
}
As you can see Replicas, Constraints and EndpointMode are extended features that are not currently supported in the current DAB specification. Some other features like setting service PublishedPorts is also possible.
No, it just works out of the box with your current docker installation
Whaleprint works in any OS that's currently running docker 1.12 RC
~~In OSX this might happen because of an issue in engine-api.
In the meantime just set your DOCKER_HOST
env variable to your unix socket or TCP connection and you should be ok~~. This issue has been merged into the engine repo, it shouldn't be necessary to do this workaround anymore.
It's designed to show results instantly even with a large amount of services.
While working on whaleprint we learnt a lot from docker internals as well as the new swarm mode
and swarmkit
core principles. We also found some issues
(#1171) and sent some PR's fixing small bugs (#320, #1207).
Some of the concepts and ideas behind Whaleprint are inspired by some other products/companies like HashiCorp terraform who we admire for their excellence and ability to build amazing stuff.