Does anyone know of a tutorial on how to easily get, for example, a Django app (nginx + uwsgi + postgres + redis) running on CoreOS with Docker? I'm afraid all these parts of the stack are too many to wrap one's head around without being familiar with each layer.
I have exactly this setup running for my startup right now. I am planning to blog it after my wedding and honeymoon next week (so early June), but if you'd like to pick my brain, ping me, and I'll see what I can do.
I'm also interested in this. I'm used to running my Django/(formerly gunicorn but soon switching to uwsgi or passenger)/nginx/PG stack on EC2. I've been exploring Docker and Vagrant, and have almost finished setting up a useful dev environment. I'm trying to figure out the right way to do deploy my containers, and where CoreOS fits into everything.
* Install Docker on your dev machine (remember, there is a Mac version too)
* Add a Dockerfile to your source repo, specifying how to assemble a container image from source.
* Use a combination of "docker build" and "docker run" to test during development. You can use docker tags to build a separate image for each git commit/tag/branch.
* When ready to deploy, use "docker push" to upload your image to a registry (you can run your own, or use the official registry at https://index.docker.io). Note the official registry supports private images.
* From your production machines (presumably CoreOS but you may have a mix of other distros too) run "docker pull" and "docker run" to deploy your app.
* Use Links ("docker rum --link") to interconnect containers, for example your frontend to your database, etc.
Mostly if you use Docker for development, you don't need Vagrant. Specifically the Dockerfile is basically a replacement for the Vgrantfile. The caveat is that you can use vagrant for machine deployment to get to a working docker deployment. We used to recommend this but people got confused between the 2, so now we recommend boit2docker instead.
Use Links ("docker rum --link") to interconnect containers, for example your frontend to your database, etc.
What's the current best-practice to interconnect containers running on different hosts? Is Docker going to add this capability itself, or will this always be something built on top of Docker by e.g. CoreOS?
Comments
Does anyone know of a tutorial on how to easily get, for example, a Django app (nginx + uwsgi + postgres + redis) running on CoreOS with Docker? I'm afraid all these parts of the stack are too many to wrap one's head around without being familiar with each layer.
I have exactly this setup running for my startup right now. I am planning to blog it after my wedding and honeymoon next week (so early June), but if you'd like to pick my brain, ping me, and I'll see what I can do.
I'm also interested in this. I'm used to running my Django/(formerly gunicorn but soon switching to uwsgi or passenger)/nginx/PG stack on EC2. I've been exploring Docker and Vagrant, and have almost finished setting up a useful dev environment. I'm trying to figure out the right way to do deploy my containers, and where CoreOS fits into everything.
The "official" Docker workflow looks like this:
* Install Docker on your dev machine (remember, there is a Mac version too)
* Add a Dockerfile to your source repo, specifying how to assemble a container image from source.
* Use a combination of "docker build" and "docker run" to test during development. You can use docker tags to build a separate image for each git commit/tag/branch.
* When ready to deploy, use "docker push" to upload your image to a registry (you can run your own, or use the official registry at https://index.docker.io). Note the official registry supports private images.
* From your production machines (presumably CoreOS but you may have a mix of other distros too) run "docker pull" and "docker run" to deploy your app.
* Use Links ("docker rum --link") to interconnect containers, for example your frontend to your database, etc.
Mostly if you use Docker for development, you don't need Vagrant. Specifically the Dockerfile is basically a replacement for the Vgrantfile. The caveat is that you can use vagrant for machine deployment to get to a working docker deployment. We used to recommend this but people got confused between the 2, so now we recommend boit2docker instead.
I hope this helps.
What's the current best-practice to interconnect containers running on different hosts? Is Docker going to add this capability itself, or will this always be something built on top of Docker by e.g. CoreOS?
Docker ambassadors - http://docs.docker.io/use/ambassador_pattern_linking/#introd...
Typo: boot2docker
Thanks, unfortunately too late to correct...
That'd be great, I'll email you, thanks.
EDIT: Wait, what's your email/blog?
I don't know if this is exactly what you're looking for, but Marcel de Graaf has a blog post series going which are pretty great:
1. http://marceldegraaf.net/2014/04/24/experimenting-with-coreo... 2. http://marceldegraaf.net/2014/05/05/coreos-follow-up-sinatra...
Those look great, thanks. Now I understand much more about how all this ties together.