vagrant
vagrant copied to clipboard
Status of vagrant-go
As of Vagrant 2.3, Vagrant ships with a second executable called vagrant-go. This represents the current state of our work to reimplement Vagrant in Go, as a part of our road to Vagrant 3.0.
Try out vagrant-go with with our Vagrant documentation.
The vagrant-go project is currently alpha which means:
- While the core workflows are functional, there are known issues and features that don't work yet. We maintain a list of these in the documentation linked above.
- We are inviting the community to try it out and report any new issues. Please take it for a spin if you can!
- The code is still under heavy development, so we ask that community members start a discussion with the team before submitting pull requests.
Hi @soapy1!
This is great news! It seems though that your provided doc link is dead.
Oh, yep! The documentation will be live once Vagrant 2.3 is released. In the meantime you can see it at https://github.com/hashicorp/vagrant/blob/main/website/content/docs/experimental/vagrant_go.mdx
Thanks @soapy1!
So I misunderstood your original post, do you have - by any chance - an ETA for 2.3 that you can share? Also, is there anything particular that can be currently contributed (e.g. unit tests or testing in general)?
Heya @ChristoWolf, 2.3 should be out pretty soon. We are just finishing up some testing. While the Vagrant-go binary is meant to be very alpha, we still want to ensure that the default Vagrant-ruby doesn't have any regressions.
Also, is there anything particular that can be currently contributed (e.g. unit tests or testing in general)?
Testing out Vagrant-go and submitting issues you find is much appreciated! We have some known issues that are on our radar. But, we expect there to be many more bugs given that this is an alpha release. The linked docs has some info on how you can get started using it and outlines some important differences. And the contributing documentation has been updated with instructions on how to get a development install of Vagrant-go working.
As of Vagrant 2.3, Vagrant ships with a second executable called vagrant-go. This represents the current state of our work to reimplement Vagrant in Go, as a part of our road to Vagrant 3.0.
Try out vagrant-go with with our Vagrant documentation.
This is a dead link btw.
The vagrant-go project is currently alpha which means:
* While the core workflows are functional, _there are known issues and features that don't work yet_. We maintain a list of these in the documentation linked above. * We are inviting the community to try it out and report any new issues. _Please take it for a spin if you can!_ * The code is still under heavy development, so we ask that community members _start a discussion with the team before submitting pull requests_.
As the downstream packager in openSUSE: what are you as upstream expecting from distributions packaging vagrant? Should we include vagrant-go as well in our packages or can we omit them until you consider vagrant-go stable enough?
And do I understand it correctly, that the golang part is at the moment completely optional?
This is a dead link btw.
We'll be updating the docs site soon! In the mean time you can see the docs at https://github.com/hashicorp/vagrant/blob/main/website/content/docs/experimental/vagrant_go.mdx
As the downstream packager in openSUSE: what are you as upstream expecting from distributions packaging vagrant? Should we include vagrant-go as well in our packages or can we omit them until you consider vagrant-go stable enough?
👍 Since vagrant-go isn't a stable release I wouldn't expect a distribution packaging Vagrant to include vagrant-go in their packages. At this point users should only really be running vagrant-go as an experiment.
@soapy1 With vagrant 3.x made in Go, it is expected that the plugins for vagrant written in ruby keep working? Or will be required to reimplement them in go? 🤝
Just downloaded and installed Vagrant 2.3 on Windows 11: no vagrant-go installed and I can't find any additional option into the installer that allows me to install it. What am I missing?
I'll admit to being new to vagrant, but this delay on the Go binary can't be right... Is there something obvious I am doing wrong?
$ time vagrant --version Vagrant 2.3.0
real 0m0.156s user 0m0.113s sys 0m0.048s
$ time vagrant-go --version
Vagrant 2.3.0 (024f366ed+CHANGES)
real 0m12.705s user 0m11.036s sys 0m1.054s
Similarly, vagrant up and destroy on a trivial Dockerfile (Docker provider): vagrant up: 0m4.790s vagrant destroy -f: 0m5.442s vagrant-go up: 1m41.701s vagrant-go destroy -f: 0m30.231s (also, this bombed...)
This is on an Ubuntu 22.04 server, using the 2.3.0 binaries available from these instructions: https://www.vagrantup.com/downloads.
Similar timings on a "vagrant" binary created via 'make bin' on a git clone.
Let me know how I can assist.
🎉 🙌 🚀 Excited to see Vagrant 2.3.0 is now released, and vagrant-go is included! Congrats @chrisroberts & Vagrant dev team!
brew info --cask vagrant
==> vagrant: 2.3.0
https://www.vagrantup.com/
/opt/homebrew/Caskroom/vagrant/2.3.0 (3 files, 60.5MB)
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/vagrant.rb
==> Name
Vagrant
==> Description
Development environment
==> Artifacts
vagrant.pkg (Pkg)
==> Analytics
install: 8,160 (30 days), 24,862 (90 days), 126,068 (365 days)
file $(which vagrant-go)
/usr/local/bin/vagrant-go: Mach-O 64-bit executable x86_64
Note: This output was from an installation on an M1 Macbook.
Of course, the Homebrew distributed version includes binaries that are still only compiled for Amd64 / x86_64. I have been really looking forward to the release of vagrant-go and hoping that this GoLang port would allow easier compilation to native Apple Silicon / arm64 architecture. Alas, the Homebrew package has not yet made this version easily installable yet.
Given that it's in alpha / beta status, this is probably to be expected... but I'm still really interested in building and testing out native Vagrant on Apple Silicon. I did have some luck installing a native arm64 version of Ruby gems + vagrant. Yet, this installation was in an RVM gemset and quite fragile due to the way the vagrant executable binstubs were originally expecting to be installed. I see now why the native gem installation for the old Ruby-based vagrant is unsupported.
Q: Is there a way that I can build vagrant-go locally for amd64 architecture?
For example, should I just issue go build from the top-level in the repo? 🤷
Let me know how I can assist.
after updating to the latest release 2.3.1 i gave it a try and its the same for me. Quite all operations are very slow. A simple call without any arguments takes up to 11 Seconds until help ouptut is rendered :)
@abbbi from my cursory review of 2.3 releases it seems like vagrant-go is launching the legacy ruby vagrant serve process every single time vagrant-go is run... I can't imagine that's supposed to work that way?
Separately, I tried running vagrant serve myself to see if I could get vagrant-go status to use that instance... it still logged messages suggesting it was creating its own vagrant serve process and yet when I terminate (Ctrl+C) the vagrant-go status process (as it takes forever), both it and the entirely separate vagrant serve processes terminate!?
I just discovered vagrant-go and got my hopes up I'd get rid of the Ruby syntax in the Vagrantfile and instead write everything in go. That's doesn't seem to be the case at all. Are there any plans to provide this feature?
I just discovered vagrant-go and got my hopes up I'd get rid of the Ruby syntax in the Vagrantfile and instead write everything in go. That's doesn't seem to be the case at all. Are there any plans to provide this feature?
Bro, its Hashicorp you're dealing with, if you're familiar with their tools (Terraform, Packer, etc..) you'd probably know its safe to assume Vagrantfile will be HCL implemented style which will probably cover most of the use-cases anyone needs.
As usual, it is probably not a good idea to use the vagrant-go internal API for integration inside a go application. Are there any plans on publishing a lib or API for go? Tips on integrating vagrant on the current stable implementation are welcome. :)
@soapy1: Is there anything that we can do currently to help with the Windows support?
Is Vagrant 3.0 still happening? was asked long time ago on the Vagrant discussion space, but it remains unanswered. I think, it's worth to resonate it here.
Hello @chrisroberts, can you give us any update about Vagrant 3.0 and the direction of the project is going to in 2024?
In fact, I am already tired of the problem of Vagrant's huge size and very slow running based on Ruby. In Windows, after Vagrant is installed, its volume is almost 1GB, and every installation or uninstallation requires restarting the computer. I am looking forward to Vagrant go
Let's abandon the ancient language of Ruby together and embrace the modern language of Golang