Hacker News new | ask | show | jobs
by sandGorgon 4338 days ago
I wish that Ansible would work with orchestrating Docker containers.

Here's my thought - Docker is replacing the use case for using Ansible/Chef/Puppet for a lot of people. It is far too easy to build portable docker machines and deploy them on bare metal. For me, the use case of provisioning a softlayer server and then setting it up using Ansible/Chef is no longer present.

However, the problem of orchestrating a bunch of Docker machines is still unsolved. I was hoping that Fig would solve it, but by their own admission [1], Fig is going to be closely tied to Orchardup and not intended for general use.

So, if I want to launch a hadoop cluster over 20 Docker VMs, physically hosted in 5 different servers... I really have no way today. Notice, that the complexity includes setting up bind-volume mapping, logging, passing of variables from one Docker VM to another, etc.

I'm not sure if Chef is more suited to this, given that Octohost moved from Ansible to chef for a Docker PAAS [2], but I would definitely love for Ansible to do this part really well !

[1] https://news.ycombinator.com/item?id=8075705

[2] https://news.ycombinator.com/item?id=8086092

6 comments

"the problem of orchestrating a bunch of Docker machines is still unsolved."

I don't know about that.

Mesos was already mentioned: http://mesos.apache.org/

There's also Kubernetes which has recently started working on Fedora and CoreOS: https://github.com/GoogleCloudPlatform/kubernetes

And there is CoreOS's fleet system, although this is more low level and would still need orchestration: https://github.com/coreos/fleet

Kubernetes is built using SaltStack :)
interesting !

I didnt know that, but this confirms it - https://github.com/GoogleCloudPlatform/kubernetes/blob/maste...

True, but they are unviable for most startups. most of the solutions outlined here are very, very heavy. I'm a 2 man startup and really cannot invest into mesos to deploy a 4 VM cluster.

But the news that Kubernetes is leveraging SaltStack is hopeful.

You might be interested in the Openstack deployment tooling called 'tripleo'[1] which has similar questions and has avoided all the current config management tools. The general gist is that what you're describing can be done using tools like Cloudformation/Heat or the newly minted Terraform, since they can both orchestrate the hardware/cloud resources and pass data in/out of the guests.

[1] https://wiki.openstack.org/wiki/TripleO

thanks for this - but it looks to be tied to openstack, while I'm looking for something that leverages docker
Yep, it does to a great degree now - read http://www.ansible.com/blog/2014/02/12/installing-and-buildi... and can also be used to deploy containers.

As various "clouds" for Docker spawn up the various cloud modules will also be able to talk to these things.

thanks for this. this is great, but could you build a more sophisticated example with port mapping, volume bind mapping and passing of variables to containers?

if you look at a fairly trivial fig.yml, you'll know what I mean. This is what enables a fairly common usecase (e.g. wordpress docker -> mysql docker) to be setup fairly quickly.

You might want to look into Apache Mesos. I don't know it it works with Docker specifically, but it does manage Linux containers (which Docker is based upon).
Here's an article on eBay using this for Ansible based on what twitter was doing - https://github.com/search?q=stars%3A%3E1&type=Repositories&r...
Fleet part of CoreOS does orchestration by leveraging systemd. I am actually working on stateless deployment of interdependent docker containers by pushing docker state to VMs much like Ansible.
Wouldn't it still make sense to use a configuration management for automated building of docker containers?