ming.kernel
ming.kernel

Reputation: 3665

How do Chef and Docker work together

I am trying to migrate my applications from Heroku to AWS, and I want to use Chef/Docker on AWS. I may need several servers to do the migration for web server, app server, db, redis...

I want my deployment flow to be as simple as heroku; and I want to minimize the configuration of the servers on AWS; so I came to Chef and Docker.

I have seen a demo on using Chef to manage Docker: http://www.getchef.com/solutions/docker/ But I still don't have a understanding of where the boundary of Chef and Docker is.

Can anyone give some advice on how to combine Chef and Docker together? Or Do I need Chef at all if I am going to use Docker?

Upvotes: 1

Views: 1462

Answers (2)

onknows
onknows

Reputation: 6711

You don't need Chef to use Docker.

If you are not familiar with Chef it doesn't make sense to use Chef in combination with Docker. Unless you are trying to solve some configuration puzzle.

This is indeed still evolving. I use Chef with Docker and I distinguish three ways to use Chef with Docker:

  1. Use Vagrant and Chef to bake Docker images.
  2. Deploy Docker images using Chef using resources such as docker-service, docker-image and docker-container.
  3. Manage runtime configuration of Docker container using Chef.

1 and 2 I am currently doing.

3 is something that I will also try in time. It is unclear how good this will work. Processes are managed differently for example maybe using supervisor and this implies I think that recipes that try to manage system services will not work correctly.

Upvotes: 2

Mark O'Connor
Mark O'Connor

Reputation: 78011

Chef's support for docker is still evolving. The latest state of play is described here:

And if you dig you'll find the following container related documentation:

It appears the intention is to use chef to build the containers (using cookbooks) and then optionally configure them at run-time. It's the latter part that needs further exploring. There are lots of emerging tools to managing docker containers at run-time.

Upvotes: 1

Related Questions