What do you mean by "setting up". Are you talking about the work to provision a working target environment (i.e. what the VM/Container runs) or are you talking about the literal time for the environment to start?
Containers help with both. No full-system boot delay helps. Cached layers help. Not dealing with vm-specific kernel modules helps. Fast non-nfs volumes shared with the host help.
There are speed benefits for containers all over the place - both in time spent dealing with the environment and in actual execution.
I just cold-booted a Vagrant VM, which is configured to check for new base-box versions (i.e. a network delay that can be disabled).
time vagrant up
...
real 0m39.698s
user 0m11.989s
sys 0m5.490s
If your argument about tooling is around performance and the "slow" one takes just 40 seconds to start, I think you need to clarify how often you expect to be starting this tool in a day.
> Cached layers help.
Helps what, exactly?
> Not dealing with vm-specific kernel modules helps.
I don't even know what you're talking about here. Do you mean you need to have a hypervisor kernel module? What exactly do you need to "deal with"?
> Fast non-nfs volumes shared with the host help.
I've never once used an NFS volume in a Vagrant guest. In case you weren't aware, Vagrant is not limited to using VirtualBox.
> There are speed benefits for containers all over the place - both in time spent dealing with the environment and in actual execution.
You haven't actually identify any environment issues you need to "deal with", just said "X helps".
Some context then. The happy path startup cost (environment is already prepared) matters to devs who never deal with the environment itself. If you're dealing with frontend only - maybe that's you most of the time, and you only see the 40s maybe once a day.
But there are other costs. Someone deals with updates, with adding new functionality, with debugging issues. I spend most of my day recently waiting for puppet runs in vagrant/vbox. It's 10+ min for a full run. Then I make more changes - sometimes an incremental provision is enough, sometimes I need a full rebuild. On the other hand, if the environment was built with docker layers, I'd have much less waiting to do, because the caching of partial build/layer is integrated. Over a whole day, that's not insignificant time saving.
And sure, vagrant has multiple backend. I'm using vbox, and so does almost every developer using vagrant. It's the only free one. (Apart from the docker backend)
That is literally what the concept of base boxes is for.
Build your own base box with whatever prerequisites you have baked in. It's still a 10 minute puppet run if that's how long your provisioning takes, but that happens once, and then you distribute the box. While you can just use a base distro box, for large/complex setups it's not always the best approach.
The idea of the base boxes is there, sure. But the ability to configure repositories, make base box of that, install keys, make base box of that, install required told, make base box of that, ... etc. with the mechanism for transparent reuse of the latest cached box you care about is not available on vagrant. And when you're making changes and debugging, it makes all the difference. If vagrant integrated a nice way to do that, the time saving would be amazing.
You kind of can do that, but it's not a Vagrant feature, so much as a Packer feature.
Most of the Packer builders (e.g. virtualbox, parallels, VMware) support building from scratch (i.e. start with ISO install media and a blank VM disk) OR building from an existing VM.
So you could have a multi-stage Packer build pipeline that iterates step by step.
But I'm still not really sure what your workflow is. My company builds a series of Debian (and for a client, Ubuntu) base boxes. When debugging issues, 99% of time required is checking/fixing inside a running box. Once a solution is found, applying that back to the base box provisioning scripts (or preseed or even the packer config) and testing a build doesn't take that long.
What's your config management tool of choice? I assume they will have recipes/etc for basic tasks like that.
Personally I'd just put the call to `apt-get` and then `psql` into a shell script.
Either way, set the provisioner. Either do it in vagrant provisioning, or if that takes to long, build a base box with Packer and put the provisioner there.
Edit: or for a simpler use, look on Vagrantcloud.com and find a base box that has what you want, and run that.
There are speed benefits for containers all over the place - both in time spent dealing with the environment and in actual execution.