5 ms·
Excellent tutorial! I'm a newcomer to Docker, and this was quite helpful. I'm currently using Vagrant to run my local dev environment and it's been OK. But I ca
by Cyph0n 10y ago
Excellent tutorial! I'm a newcomer to Docker, and this was quite helpful. I'm currently using Vagrant to run my local dev environment and it's been OK. But I can see how using containers to split components up can make testing much easier.
One question I have though is how useful is Docker for deploying production applications?
Firstly, can plain Docker be used for the whole setup or is something like Kubernetes required to tie the containers together?
Secondly, is there a performance hit when you use multiple Docker containers on the same server? Or should it be a one-to-one relation i.e. one container per as server? If so, why not just use plain servers with Chef or Puppet for server management?
These questions are assuming that I'm using my own servers - something like DigitalOcean or AWS. I'm not a huge fan of managed container services; it feels like there's too much "magic" going on behind the scenes.
- jon-wood 10y agoThere are a few options for using Docker in production. At the simplest (in terms of least infrastructure at least) you could just have a VM somewhere running Docker, and use docker-compose or similar to bring everything up as you would in development. In the middle you have Amazon Elastic Beanstalk which can take a Docker image and deploy it with minimal hassle, and at the other end of the spectrum you have Kubernetes/Mesosphere/Amazon ECS to allow distributing containers across a cluster of machines. Except for isolation there's no particular need to run one container per server - while there is a bit of overhead to running in containers my experience is that its offset by being able to run multiple services which don't require a lot of resources alongside each other on one server.
- nzoschke 10y agoI'm working on an OSS project, Convox, that makes a production AWS / VPC / ECS / Docker system trivial. http://github.com/convox/rack http://github.com/convox/rack It's similar to elastic beanstalk in that it gives you a great pre-configured AWS architecture. But it's more transparent and configurable. It also comes with a nice Docker based development environment that mimics production for dev / prod parity. We have hundreds of production clusters and some at really large scale (300+ containers) so I can confidently say that Docker in production is largely solved on AWS.
- sidcool 10y agoI am glad it helped. I am not the creator of the article, but found it worthy to be shared :)
- cromantin 10y agoI highly recommend looking at rancher. It's great in every way.
- TimMeade 10y agoThanks for this tip. Rancher looks well worth further investigation.
- cromantin 10y agoIn my anecdotal experience with 10 machines and 40 services, half of machines dedicated and half in amazon - i've tried: k8s - great but for >>10 machines and you need a devops to watch and configure it + every configuration example on site is broken in one way or another. skydns is working for dns. has it's own overlay network. nomad - great, but doesn't manage dns or network + i didn't get how to save it to file, only upload to nomad. What if it fails? Where cluster config is stored? May be it should be used with Terraform, but i did't like it. Thou for it's purposes it working good. Has concept of long running tasks and can run VM's helios - i don't remember exactly why but i didn't like it. Something with configuration management. No network or dns. maestro-ng - this is as raw as it gets. Basically docker compose. I was using it for a while, but it hit it's limits pretty fast. No network or dns. rancher - after seeing it in action i fell in love. Beautiful UI (you can even view logs and start shell from web ui, and it works great!). Has DNS, manages your overlay network. Store configuration in mysql (i use amazon's rds with MZ). It has it's own perfectly capable scheduler - Cattle. And it can run k8s and mesos if you want it to. I highly recommend OpenVPN package that will connect you to internal overlay network and you will be able to work with services walled from outside world.
- icebraining 10y agoLast time I tried RancherOS is seemed quite heavy, with a 2GB RAM footprint for the initial run (without any nodes attached). What's your experience?
- 10y ago
- deleted 10y ago[deleted]
- haffla 10y agoFor me one of the great things about Docker is that there doesn't necessarily have to be a great difference between dev and production. Both in dev and prod we simply use docker-compose up. Of course with slightly different docker-compose.yml files and Dockerfiles, no HaProxy in dev, no mailcatcher in prod (It's all so wonderfully plugable). Admittedly, I cannot speak for high scale projects with thousands of containers across a cluster of nodes. I guess there you need to have some more elaborate deployment scheme.
- zwischenzug 10y agoI wrote a docker-101-tutorial that's interactive to allow people to get Docker 'under their fingers': http://ianmiell.github.io/docker-101-tutorial/ http://ianmiell.github.io/docker-101-tutorial/