by ingvul on 8/14/21, 1:02 PM with 14 comments
While I could use a separate private cloud just for development purposes (and effectively use my laptop as a "dumb" terminal), I find it irritating because:
- It's not free. I have to pay for it
- My laptop is powerful enough to emulate my production infra
- It just feels wrong to me. I like the idea of using my own machine to develop my application and my infrastructure, and spin up/tear down VMs as many times as needed without having to worry about price
Do you still use Vagrant or similar tools to spin up VMs locally?
by AkshitGarg on 8/14/21, 4:22 PM
by aranchelk on 8/15/21, 7:29 AM
I still use Vagrant in those rare instances when Docker is not viable. Sometimes I really do need full OS instance, or need to run something other than Linux, or I just want normal bridged network interfaces.
by ocdtrekkie on 8/14/21, 1:08 PM
Why would you ask if it's dead?
by sergiomattei on 8/14/21, 7:41 PM
The cost to performance wasn't there: just using my laptop for development was cheaper and more performant than renting a VM monthly for cloud development.
by stephenr on 8/14/21, 2:06 PM
I'll give two examples of how I use it:
I (or technically, my company) produce a number of tools for managing various common aspects of a Linux web application stack.
For each tool, there's a regular Vagrant VM setup from the root of the repo, which is used for basic testing, building, running tests etc - essentially this is just to achieve a known state, and to abstract the environment from whatever OS it's running on. Some of the tools either specifically require, or support, 'cluster' mode, where some kind of state or configuration is managed across multiple machines. For these tools, there's an additional multi-machine Vagrantfile (generally just in a subdir) which sets up a mini cluster of 2 or 3 nodes, and allows testing of the sync/replication/what have you.
For a client I work with right now, we again, use it in two ways, achieving two separate goals:
The primary, day to day use, is providing a completely self-contained local dev environment for the webapp. This setup is used for anyone doing dev on the app - backend, frontend, whatever.
The less common, but still very necessary use, is similar to what you mentioned, multi-machine infra testing. The infra for this client is all provisioned using a shell script that works on a system of roles and environments. To test this, the repo with the setup has a vagrant config that matches the production environment.
Additionally, this repo also has a packer config, which builds a custom base box, for the aforementioned "day to day dev" Vagrant env, using the same setup script.
As mentioned by @ocdtrekkie, Vagrant is relatively stable. It'll be interesting to see where 3.0 takes things, but right now it's a pretty reliable tool, that just gets the job done.
Edit: typo (anything -> anyone)
by cpach on 8/15/21, 1:14 PM
But not all systems are a good fit for Docker. When I need an actual VM, then Vagrant is a godsend.
by rthomas6 on 8/14/21, 3:16 PM
by aayala on 8/14/21, 1:27 PM