News for hackers. Stuff that matters.
Re:Ask HN: How do you use Docker in production? by nailer on Friday October 17, 2014 @09:23AM (#8470787)
In typical virtualisation + config management you specify a base image and bunch of config files and commands.

In a Dockerfile you specify a base image and commands, may often invoke a config management tool.

How is using Docker more declarative?

Re:Ask HN: How do you use Docker in production? by vidarh on Friday October 17, 2014 @09:39AM (#8470864)
If you take the steps for, say, AWS, of building a new AMI for every role you have, then it's pretty much the same.

(but in my experience with building AMI's, that process is way too slow compared to Docker)

Docker becomes closer to declarative when you build static Docker images for every role and rebuild for every change and re-deploy. Even more so when your deployment is based on a tool like Fleet that declaratively specifies your cluster layout.

The point is to avoid ever having situations where you say "install package foo on all webservers". Instead you say "replace all webservers with a bit-by-bit identical copy of image x".

The benefit is that you can have already tested a container that is 100% identical, and know that the deployed containers will be 100% identical, rather than hope the commands you pass to the config tool handles every failure scenario well enough.

Re:Ask HN: How do you use Docker in production? by zwischenzug on Friday October 17, 2014 @12:53PM (#8471915)
Re:Ask HN: How do you use Docker in production? by nailer on Friday October 17, 2014 @10:15AM (#8471059)
Thanks, that's a good answer.
Re:Ask HN: How do you use Docker in production? by seppalala on Friday October 17, 2014 @10:29AM (#8471132)
For configuration, we separate the application and the config files into two separate containers. The config files are provided through a shared volume to the application. This model is definitely odd. However, it's allowed us to decouple our application and our configuration and to swap out configurations. With this in mind, it's more declarative because we specify "run this application with this configuration unit" rather than "here's how you get yourself started". See the Radial project for our inspiration[1]

We've found that this approach has generalized so far. For example, setting up a Cassandra cluster is often a real PITA to configure since you need the seed IPs up front. Our configuration container manages the dance by registering and pulling the IPs from Consul (etcd would work fine too). Perhaps a bit of smoke-and-mirrors, but it's achieved being able to spin up a properly-configured Cassandra cluster without needing to manually specify who's in the cluster.

[1]: http://radial.viewdocs.io/docs