

Vagrant, Docker and Ansible. WTF? - hunvreus
http://devo.ps/blog/2013/09/25/vagrant-docker-and-ansible-wtf.html

======
bryanlarsen
As far as I can tell, Docker & Ansible don't work well together.

If you provision your app using a Dockerfile, you get a bunch of cool stuff
because it knows what's been applied and what isn't.

If you provision your app using ansible, you get a bunch of cool provisioning
features from ansible.

I want both. It looks like you provision your app using ansible, meaning that
you're missing out on a some cool Docker features. Our ansible scripts take
over a minute to run even when it doesn't make any changes but one of the
major reasons to use docker is because you can spin up an instance
instantaneously.

~~~
balou
Indeed, hence the numerous cheats in the playbook to make things work
together. Still need some digging to figure out the perfect workflow;
Dockerfile that runs some git clone vs. add of local code vs. deploy via
ansible - the ansible approach still provides the flexibility to have a
customized container per dev that includes one custom set of ssh keys for
example to fetch code from github or alike...

~~~
bryanlarsen
One thought I had was that you could get some of the benefits of both by using
a large number or "ansible" commands in a Dockerfile rather than using a
single ansible-playbook command to kick off the process. You'd most of the
organization features that ansible gives (like roles etc), but you would get
most of the docker features.

------
anderssv
Cool. I've done something similar for testing Puppet manifeste here:
[https://github.com/anderssv/puppet-
docker](https://github.com/anderssv/puppet-docker) .

Like Bryan points out I would love to construct something that utilises the
features of Docker in production too, but right now it's just a awesome
testing tool with minimal turn around.

