Toward Vagrant 3.0
hashicorp.com
hashicorp.com
But I've noticed that it seems like you can skip straight to using docker containers for development environments as well. I'm wondering what other people's experience here is with both or either software.
In my opinion, both still seem like relevant software. When I need an Ubuntu development environment on my Mac, I don't turn to Docker. I think of Vagrant right now, because that's what it was built for. Vagrant is a tool for managing virtual machines and development environments.[2]
[1]: https://www.virtualbox.org/manual/UserManual.html#basic-unat...
[2]: https://www.vagrantup.com/intro/vs/docker
Edit: Thank you for the excellent insights!
* Docker is nice for consistent development and deployment environments, particularly when I'm on a macOS host and I'm doing userspace programming.
* Vagrant is nice for creating a completely hermetic development environment, both on macOS and Linux hosts. My particular use case has been kernelspace programming: it's nice to not have to worry about accidentally taking my host down. Docker can't provide that kind of isolation, since it's still running on the host (or host VM) kernel at the end of the day.
If you can use containers for local dev, great, but not everyone can or wants to migrate to containers. Vagrant still solves a very important use case.
Containers are largely just not a great medium for interactive work, i.e. development. They're great for resident applications that use a single process run via a service account.
Once WSL came into being we moved everything to docker containers and never looked back.
I've been using VS Code + its Remote-Containers extension + docker-compose (when needed) and it's absolutely brilliant compared to other options.
I will use Vagrant when I want to avoid Docker in Docker, but I try to stay away from it as much as I can (for local app development).
That said Vagrant is really useful for testing infra, stuff like clusters etc.
On some host operating systems. On others it's a similar speed.
Vagrant isn't "HN hip" these days ;) and I feel like folks tend to think if they don't see it here it must be dead. Vagrant has been the opposite: downloads have still only gone up, and we're seeing it used in more and more places on the regular. Most people are quiet about it because it does what it was built to do well and quite honestly, its moved more into the stereotypically "boring" organizations. For example, I recently ran into an engineer that works at a local city utility who was raving about how they just adopted Vagrant last year and it has been completely life-changing for their team. This is 2021, Vagrant came out 2012. Products have super long lifecycles and the market is massive.
Regardless, we've remained committed to Vagrant. We've always had a team dedicated to Vagrant, and the Vagrant team is awesome and has continued to push out new features and new releases for the past decade.
We're super excited for Vagrant 3.0! There's a lot we have planned for it and the transition to Go is going to bring a lot of those improvements.
I think one topic that is interesting for the HN crowd: why are we rewriting Vagrant in Go? Is that too expensive or time consuming? Does that cause too much user pain?
HashiCorp has built dozens of products now in Go and we've built a large foundation of libraries and utilities for Go-based projects. All our products share the same CLI library (that we wrote), the same plugin framework (that we wrote), the same distributed systems libraries (that we wrote), etc. Besides code, we've built a security team and release engineering team that has pipelines ready to go for Go-based projects. And more.
This means that we move fast with Go, and we can do it confidently, and we can do it without a lot of overhead. From the moment we decided to port Vagrant to Go, the Vagrant team had a working demo in just a few weeks, and an "alpha" release they're ready to ship to users in a few months. We got this speed cause we just wrapped Vagrant around the same architecture and libraries that our other products are built on.
For our users, there are a bunch of improvements (mentioned in the blog post). We're being very careful about backwards compatibility and have a multi-year plan to ensure that existing Vagrantfiles and plugins continue to work. We're starting with continuing to embed a Ruby with our installers while the core is running Go. Over time, we'll ask users to bring their own Ruby (and we'll validate it) to use "older" Ruby-based plugins and Vagrantfiles.
Feel free to ask any questions, I'll try to be present in this thread.
-----------------------------------------------------
Also, if you're a Vagrant user, we also recently made our VMware plugin free and open source. Check it out: https://twitter.com/mitchellh/status/1402729560823664641
I want other people to prove those things for me. I want to spend as little time and effort possible acquiring scars and would rather learn from others.
Good technology lasts.
Are there plans to somehow harmonize the concepts here with packer (and whatever the new packer cloud will be?). Vagrant for the most part feels like a vm-only version of packer (even though Vagrant came first).
I can easily see a self-hosted cloud-based "one-click dev machine" paired with VS Code Remote, provisioned by packer (or vagrant), with the configs stored in git. We'd love to roll out something like that for our devs so sensitive data then never leaves our sandbox or even gets into the dev laptops.
For the few projects that don't use containers however is still shines. One feature I'm missing though, which would make Vagrant a complete solution for me, is testing as a first class citizen. I've been using Test Kitchen[0] for this in this past which works well as a solution, but it would be really nice to have something like this built into and supported conceptually by Vagrant itself.
Is there any working version of Vagrant that "just works" on M1 out of the box without paying for a VM provider?
If not, would I have to pay for VMWare and then use Vagrant to wrap that? Would I use Vagrant to wrap Docker? (Why would I bother to use Vagrant if I'm using Docker?)
The current ruby Vagrant supports plugins, but I'm not aware of bhyve or hyperkit support.
I would assume rewriting in Go means the same VM drivers as packer will be supported.
Beyond that, we're looking into also writing a native Virtualization.framework implementation so you wouldn't need any 3rd party virtualization software at all. For headless Linux VMs we're confident this will work great.
We're also looking at qemu as an option because qemu also offers emulation for x86. Being written in Go, we can bind to qemu natively much more easily.
The point being: there will be multiple options!
Might be time for getting that Vagrant-Libvirt link happening after all? ;)
https://github.com/vagrant-libvirt/vagrant-libvirt
It's been happening for a while now...
In my career, Vagrant has provided a good solution to move towards more automated deployment, where Docker would have been too big a paradigm shift, and/or not really greatly justify its use.
From [1] I dont think Ruby would ever be able to compete in that space. Even Hashicorp, the company that was born out of vagrant left Ruby and Chose Go. I am thinking someday Crystal post 1.0 would be able to put up a fight in that space.
I still remember I wrote somewhere, that one day Vagrant will be rewritten from Ruby to Go and got some very negative feedback from someone. ( It was in the Parker era.... )
Vagrant, and the whole HashiCorp products are all infrastructure product it makes sense to be running on Go rather than Ruby.
Nothing to say or ask really. But Thank You and congratulation. At some point I thought you have abandoned Vagrant. Its nice to see Hashicorp continue to update and take care of their first product. And honestly all the HashiCorp product are so much better or simpler than their competitors ( cough K8s cough ). Really wish you and your company continue to move forward with great products and services.
It'd potentially open up having remote stuff be hosted in HashiCorp Cloud (HashiCloud?) directly. ;)
That could be pretty lucrative over time...
We experimented with docker, but it is still extremly slow on windows and our production machine is provisioned with ansible, so vagrant is a natural fit...
Very happy most of the time, only some strange ssh errors happen from time to time...
We’re using UTM, which does the job as a frontend to qemu, but it’s be nice to switch back to a vagrant based declarative file.