Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status of vagrant-go #12819

Open
soapy1 opened this issue Jul 28, 2022 · 20 comments
Open

Status of vagrant-go #12819

soapy1 opened this issue Jul 28, 2022 · 20 comments

Comments

@soapy1
Copy link
Contributor

soapy1 commented Jul 28, 2022

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.
@soapy1 soapy1 pinned this issue Jul 28, 2022
@ChristoWolf
Copy link

Hi @soapy1!

This is great news!
It seems though that your provided doc link is dead.

@soapy1
Copy link
Contributor Author

soapy1 commented Aug 1, 2022

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

@ChristoWolf
Copy link

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)?

@soapy1
Copy link
Contributor Author

soapy1 commented Aug 2, 2022

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.

@dcermak
Copy link
Contributor

dcermak commented Aug 8, 2022

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?

@soapy1
Copy link
Contributor Author

soapy1 commented Aug 8, 2022

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.

@pedrofurtado
Copy link
Contributor

@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?
🤝

@mjordan79
Copy link

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?

@seanbright
Copy link

What am I missing?

Vagrant [go] does not work on Windows

@kingphil
Copy link

kingphil commented Aug 16, 2022

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.

@trinitronx
Copy link

🎉 🙌 🚀 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? 🤷

@abbbi
Copy link

abbbi commented Oct 4, 2022

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 :)

@g0t4
Copy link

g0t4 commented Oct 31, 2022

@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!?

@thallgren
Copy link

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?

@dev-ninja-ops
Copy link

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.

@z0rb
Copy link

z0rb commented Mar 23, 2023

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. :)

@ChristoWolf
Copy link

@soapy1: Is there anything that we can do currently to help with the Windows support?

@mloskot
Copy link

mloskot commented Jan 5, 2024

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.

@RyuuyaS
Copy link

RyuuyaS commented Jan 10, 2024

Hello @chrisroberts, can you give us any update about Vagrant 3.0 and the direction of the project is going to in 2024?

@flylan
Copy link

flylan commented Jan 31, 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

17 participants