3 ms·
> do use it in development for standing up local dev environments quickly You can do this, for sure, but, tbh, I'd still rather use Vagrant. I'm already provis
by eropple 10y ago
> do use it in development for standing up local dev environments quickly
You can do this, for sure, but, tbh, I'd still rather use Vagrant. I'm already provisioning things like my datastores using Chef (and not deploying those inside of Docker in production); I might as well repurpose the same code to build a dev environment.
I do agree regarding using containers (I use rkt rather than Docker for a few reasons) for CI being a really good jumping-off point, though.
- bdcravens 10y agoVagrant is pretty heavy, but if you're already using Chef, makes sense. If you're deploying using Docker, then mirroring your environment in dev makes more sense. I've used both Vagrant and Docker for dev, and find Docker to be super fast and light. (though I've definitely run into some headaches with Docker Compose that I didn't see in using just Docker)
- eropple 10y agoI think it's probably not worth worrying about "fast" when "slow" is "ten minutes once a week, maybe, if you're really destructive" and similarly worrying about "light" when you have 16GB of RAM and a quad-core processor; the heaviest dev environment/IDE I can find (IntelliJ and a couple hundred Chrome tabs) doesn't use eight of it. It comes off as super-premature optimization to me, and those optimizations that you would otherwise do in Docker (which are just building base images, whatever, Packer does this trivially) exist in a virtualized environment too. Running datastores in Docker is bonkers in the first place, which still leaves a significant place for an actual CM tool--so unless you are a particular strain of masochist, when you are replicating your local environment, you'll probably need it anyway.
- bdcravens 10y ago> ten minutes once a week, maybe, if you're really destructive If you do a lot of active machine development, where you're iterating on that machine setup, it's an extremely slow process. Perhaps it would make sense to iterate in Docker, and then convert that process to Vagrant once you finish. > similarly worrying about "light" when you have 16GB of RAM and a quad-core processor It's a concern when you're launching many machines at once to develop against. Docker tends to only eat what it needs. Also, while I think everyone should have a 16GB machine, there's quite a few developers out there running 8 or 4GB machines.
- eropple 10y ago> Perhaps it would make sense to iterate in Docker, and then convert that process to Vagrant once you finish. I disagree; writing convergent Chef is easy. (Actually convergent Ansible isn't, but that's just one more reason not to use it!) So I just re-run on the same machine. When I'm confident, I nuke and rebuild to make sure that the first pass, and not just later passes, work fine. When I'm doing this for other people, they don't have to rebuild at all unless I have to break compatibility (which is rare, if ever). Using Docker for this means wasting time using Docker instead of doing what I'm actually going to send to production. In a cloud environment, I get so vanishingly close to nothing for using Docker that it makes little sense to use it in development, at all. (I've tried. It's a slower, clumsier experience that results in a duplication of effort even before you have to buy into the gong show of k8s or whatever you want to use in order to actually manage your disaster.) > It's a concern when you're launching many machines at once to develop against. My standard VM flight for my current project is eight machines. It uses four gigs of RAM, and that's mostly because I decided to be pretty generous with RAM usage (none of my services really need half a gig of RAM when running in a development environment; there isn't enough data in a dev environment even to fill the caches). If you are doing the "oh, we have a billionty microservices" thing, well, sure, you might stick yourself in a rough place, but in the overwhelming majority of situations you're also probably engaged in masturbatory exercises that don't help you ship and I think you have much bigger problems on your hands. As far as developers with unsuitable hardware go--meh. "My boss is too cheap, so I need to use the wrong tools" is, and thankfully for the foreseeable future will be, someone else's problem. And that someone else should quit. (I was being pretty conservative with 16GB of RAM and a quad-core; that's just my laptop, I have a workstation for serious work.)