3 ms·
I agree that isolation is good, but spinning up a VM while developing each project is massively overkill. A modern package manager, such as Nix or even most la
by Nullabillity 10y ago
I agree that isolation is good, but spinning up a VM while developing each project is massively overkill.
A modern package manager, such as Nix or even most language-specific package managers, will allow you to set up some sort of sandbox for the project without having to take the performance hit of full-blown virtualization while developing. Of course, you'll probably want to spin up a VM while testing, just to be sure. And Nix can handle that for you too!
All while staying completely reproducible from your config files, all without having to bother with your virtualization program's snapshot system.
- coldtea 10y ago>I agree that isolation is good, but spinning up a VM while developing each project is massively overkill. It is a little, but I've found that running headless (and no reason not to) drops this overhead considerably. And with 4 cores, 16GB memory and SSD, I hardly notice it. Also modern containers like Dockers can drop the overhead to almost zero -- though I haven't really tried them to see how comfortable they are to work with. Besides, if you natively run e.g. node, postgres, some work queue, etc, you're still gonna get the overhead on your host from those processes. Nix sounds nice, but as you say you still want to spin some VM to know it all works in the final deployment setup. Not sure about your last suggestion "Nix can handle that for you too", will have to check Nix out more.
- hakanderyal 10y agoI'm currently working on 3 different projects, and have several projects that are on maintenance mode, that I return to fix bugs here and there. Docker makes this workflow a lot easier than multiple VMs. I'm running ubuntu with vagrant on macOS, and each project has a docker-compose file that spins up all the services. Stopping everything for one project and getting another one up is just one command, and takes a few seconds at most. With docker's layered fs, there is almost no space overhead. Even if you don't use docker for deployment, you can just use a container as a psuedo-VM to use this workflow.