
Powerstrip: prototype Docker extensions today - progrium
https://clusterhq.com/blog/powerstrip-prototype-docker-extensions-today
======
progrium
I'm involved as an independent collaborator again in Docker's internal
extension efforts, and after I saw this I got ClusterHQ looped in to that
working group. Then we talked about collaborating on a Go port of Powerstrip,
so I'm working on that here:
[https://github.com/ClusterHQ/powerstrip/tree/golang](https://github.com/ClusterHQ/powerstrip/tree/golang)

We're also planning to combine the Docker event stream plugin system I
prototyped previously into Powerstrip: [https://github.com/progrium/docker-
plugins](https://github.com/progrium/docker-plugins)

And ultimately, eventually, we'll have native extension support in Docker that
allows much more extensibility, but all this is a good first step IMO.

~~~
michaelsbradley
Do you know if Powerstrip could be used to extend the entire family of Docker
tools: machine, compose (fig), swarm?

I think it would be interesting, for example, to explore development of an
extension that "guided" those tools regarding where (virtually speaking) they
should re/deploy machines and containers, based on metrics collected by a 3rd
party service with which that extension communicated.

I apologize if my question is a bit naïve; at present, I've been spending a
lot of time with the porcelain and haven't gotten into the internals enough to
understand how all the Docker pieces truly fit together.

~~~
lewq
Hey Michael!

Powerstrip can be used to prototype extending anything which speaks the Docker
API. So in theory it could be used in front of swarm, as well as behind it.

I'm also interested in finding a way to prototype extensions to the Docker CLI
experience... this is the next logical step, and something we should talk
about. :)

Just to be clear, as well, powerstrip is all about finding ways to _prototype_
things. I believe that the way that it gets used can go a long way to figuring
out what the best extensions points in Docker itself are.

IMO, the powerstrip project will be a success precisely if we can throw it
away in a few months because we've used the results from the powerstrip
experiment to build the right extensions mechanism into Docker itself that we
can use instead ;)

Cheers, Luke

------
binocarlos
I've been hacking on a powerstrip adapter for the past few weeks
([https://github.com/binocarlos/powerstrip-
weave](https://github.com/binocarlos/powerstrip-weave)) and have found it a
pleasure to work with.

Capturing JSON messages on their way to the docker server is a far more
civilised way to extend docker than trying to "wrap" the docker cli.

In my use case - using the cli - I was struggling to separate the docker
arguments from the image name and container args. It's better for docker
itself to do that and more generally - its better to use the vanilla docker
client (because orchestration tools).

As soon as I was working with the JSON messages generated by the docker client
- everything became much easier!

------
errordeveloper
If you are looking to build an extension, make sure to checkout the post by
@binocarlos [1], it's just the right level of detail for you know and a full-
blow implementation indeed!

[1]: [http://weaveblog.com/2015/01/29/powerstrip-weave-a-docker-
ne...](http://weaveblog.com/2015/01/29/powerstrip-weave-a-docker-networking-
extension/)

------
SEJeff
The Wordpress on this site is dead, why don't more people use static html
generators these days? It doesn't get more web scale than static html via
pelican or Jekyll or something :)

I'm quite happy to see this happening however and see that the batteries
included, but removable mantra really is actually happening.

~~~
jodok
we just moved our very own [https://crate.io](https://crate.io) site from
wordpress to cactus (python-based,
[https://github.com/koenbok/cactus](https://github.com/koenbok/cactus)). just
opened our github repo: [https://github.com/crate/crate-
web](https://github.com/crate/crate-web) it also includes a script to pull in
existing wordpress blog posts.

------
errordeveloper
An interesting project would be to implement a policy extension, one that
would check where container image has the right versions of certain packages
and would refuse to start a container with outdate JRE, OpenSSL or anything
more recent...

~~~
lewq
Definitely! We have [https://github.com/ClusterHQ/powerstrip#additional-
adapter-i...](https://github.com/ClusterHQ/powerstrip#additional-adapter-
ideas) and
[https://github.com/ClusterHQ/powerstrip/issues/8](https://github.com/ClusterHQ/powerstrip/issues/8)
for ideas... please add more!

