grammarly / rocker-compose

Docker composition tool with idempotency features for deploying apps composed of multiple containers.
Other
407 stars 26 forks source link

How is this intended to be used in the big picture? #11

Closed bobef closed 8 years ago

bobef commented 9 years ago

Hey. This tool looks very good. I have some questions. How this tool is intended to be used in regards to whole picture? How do you personally use it?

For example. Is it meant to just start the containers? So you have something like a script that runs on boot time and starts whatever you rocker-composed and that's it, let docker take care and restart containers if they die? And if you want to update or stop or scale them you use rocker-compose again?

I tried the wordpress example. I run it and everything runs as a daemon. I stopped the DB and the other container still runs, not being able to connect to the DB though. This is different form docker compose. Docker compose would run in the foreground and if one container dies it stops the linked containers. But rocker compose is different in this regards. I have some trouble understanding its place. Is it meant only for running the containers and forget about them? What happens for example if the DB dies?

missedone commented 9 years ago

hi, folks i have similar question about big picture, in term of complete tool-chain, do you have plan to open-source Rocker which is supposed to be an image build tool, right? from my view, it's OK for us to build images with docker build, but would rather interested to see if you add any value-added feature to Rocker that make build process even simple? thanks again for sharing the amazing tool:)

ybogdanov commented 9 years ago

Hi @bobef and @missedone! Great questions.

We use rocker-compose as a client, we do not install it on servers. rocker-compose is not designed to be a daemon, but rather a one-off command, like Ansible (e.g. "push" approach, not "pull"). It connects to a remote server to apply some compose.yml to it, and then exits. You can do it either from your local machine (connect with rocker-compose to a server) or from some CI/job server.

Yes, we rely on Docker to automatically restart containers on failure, by using the restart policy. If you kill some container manually by using docker client, docker will not restart it. After this, you can apply rocker-compose to restore your app's integrity.

Also, rocker-compose has --attach option that attaches to stdout/stderr of all containers of the current manifest. It also automatically re-attaches when containers restart and even re-create (changing ID). Using this option may provide very close experience with what you have used with docker-compose. Attaching is useful mostly for development.

I am now working on open sourcing rocker as well. Next week, we will release rocker and the blog post about our experience of adopting Docker at Grammarly, our toolchain, and our motivation for writing these tools.

Thank you guys for your questions.

bobef commented 9 years ago

Thanks, looking forward for your blog post. Please link it here if you can.

ybogdanov commented 9 years ago

@bobef The blog post, part 1: http://tech.grammarly.com/blog/posts/Making-Docker-Rock-at-Grammarly.html