-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Provider for Tart (VMs on Apple Silicon) #12760
Comments
@fkorotkov any updates? |
@jottr, just a quick update that since macOS Ventura is in public beta and seems safer now to be installed, we'll start working on Linux support in Tart starting next week. Please follow cirruslabs/tart#62 for updates. Getting Linux support in Tart is prerequisite to having a Vagrant provider. Once Linux support is there we can start looking at Vagrant provider. My understanding is that provider development is moving to Go but I haven't found much information beside the announcement post. Will appreciate any insights in that area. Will be cool to try out Go which I'm personally more familiar with than with Ruby. 😅 |
@fkorotkov Let me know if you start working on this. I'm looking for an excuse to do more in golang and would be happy to help. |
@jottr good timing! We've just release initial support for Linux. I just created a repository for the plugin at https://github.com/cirruslabs/vagrant-plugin-tart. Will try to put out some initial implementation this week hence there is now some documentation available. Please keep an eye on the repository about development updates. Once there is something people can play with I'll post here an update. |
@fkorotkov will this be a new Go based Vagrant plugin? |
Hope so! Have no desire to touch Ruby 😅 |
So I did some investigation and it seems everything is doable... I was looking mostly into the Ruby plugin for Parallels and it seems one will need to implement all the actions but in the new Go world. But I don't think it's reasonable for the Tart team to try to implement the integration on our own. We don't use Vagrant and are lacking the expertise on that end. Plus we have many other things on our plate to justify allocation resources. We believe someone from Vagrant community or HashiCorp should champion the plugin development and we'll provide support from Tart side like we did with Linux support. If anyone interested please ping and let's schedule a meeting to discuss the potential combined effort. |
First, it's very exciting to see projects like Tart for running Virtual Machine on M1/M2, and it's also very exciting to see folks hacking against the Go side of Vagrant! However, Vagrant-go is currently not super stable. So, while the provider plugin interface is available you may not want to dig into quite yet. In general, I would advise against writing Go provider plugins for right now (other plugin interfaces like for guest/host plugins are pretty stable at this point). We are actively working on making this better and will keep you updated! |
@fkorotkov I can't say I can build all of this out in to a full provider that does everything VirtualBox does, but I can help get a basic provider up and running. I also see there's a golang provider plugin on the cirruslabs github org but it's undocumented and not clear how far along it is. I'd suggest building in Ruby, but I detail why below. Tart QuestionsSome basic needs and requirements, how do we do these things in Tart via CLI?
In theory a basic provider could be built purely out of shell commands that call Tart. Additional Questions
General Recommendations
My Personal Stake:
|
Also it seems from what I can tell that you can start a Tart VM from CLI, but there are no There would need to be an asynchronous mechanism to start and stop named VMs independent of the current shell environment that currently does not exist. |
Additionally, a lot of Tart commands print out human friendly responses, but do not have machine friendly responses, a JSON/XML parameter for responses would be very helpful and avoid a lot of potential bugs when interacting with the Tart CLI |
I've created a number of tickets for things that would be very helpful for a vagrant Tart provider: cirruslabs/tart#302 cirruslabs/tart#301 cirruslabs/tart#300 cirruslabs/tart#299 cirruslabs/tart#298 cirruslabs/tart#297 cirruslabs/tart#303 cirruslabs/tart#304 These would be invaluable and make Tart much more flexible, particularly for VM scripting and automation |
Hey @tomjn, thank you for the interest and a lot of questions/feature requests! I've commented on some of them and will try to answer other your questions inline below.
https://github.com/cirruslabs/vagrant-tart was created to just play around. As we learned that it's not advised to try to implement a provider in Go we put it on hold.
Heard of it a month after we launched Tart but still not sure how common this slang is. 🤷♂️ Name was chosen after Apple Tart desert aka Tartine in France. Plus
Interesting! Just bough https://tart.run domain that will redirect to the latest release for now. At some point we'll definitely have a dedicated site but it's not a priority now. If you choose to bundle tart with VVV, then I guess you won't have the problem. But as part of cirruslabs/tart#305 we'll probably make the Desktop App self-updatable or even add it to App Store (for free of course).
I'm a bit concerned about this part since our team has very limited experience with Ruby. I personally did some Ruby back in 206-2017 but I didn't like it at all. I'm afraid choosing Ruby will limit our ability to help with the development. Also I'm still not quite understand the state of current Do you maybe want to have a call to chat through some details? Email me at [email protected] in that case. |
Good to see!
it has its quirks, Ruby isn't my primary language either. The biggest concern here is less Ruby and more Vagrants APIs. A golang plugin will only work with In terms of what the ruby plugin will actually do? Not a lots, issue commands and then interpret the output and send vagrant what it needs. I doubt anybody expects to embark on a grand architectural adventure with a ruby plugin right now. When vagrant-go is in more use and more mature we can think about a golang port, but it's not clear how a golang provider would work and if that'll still be the same in a years time right now. Something else to keep in mind is that it's likely that a Tart provider will be used as a template for other Hyperkit based VMs
That sounds good, but for now I'd like to be sure everything is possible and noted down, and there are still things on my side I want to resolve first, vagrant related projects aren't my day job so I want to cordon off the time to sort this out properly uninterrupted, and make sure anybody who's interested has a framework to work within. I hope I've given you plenty of food for thought and tasks in the meantime :) |
@fkorotkov if it helps, I've a very primitive ruby provider that uses the same structure as VirtualBox, currently it only checks if Tart is installed. However it's useful to know that:
I believe a decent amount of progress can be made based on the issues I raised in the Tart repo, the most pressing being that running the |
The primary use of the word |
@craighurley I grew up and live in that region :) It's used for both, just checking they were aware |
Same. Can confirm. 🤷♂️ |
What's the current state of this? Is there a 'vagrant-tart' plugin(ruby gem) in the works? If they is where is it(not public)? Accepting contributions and/or help? |
@adrianteri I have a WIP project but it's been slow going with work, the Tart devs have been very helpful and I've been able to figure out a lot of what needs to be done. My hope was to open the repo up once I could start a VM and run a basic provisioner from |
Can you share? Hope you've documented this ... |
https://github.com/tomjn/vagrant-tart-ruby I've figured out what the box format is and settled on how to interact with Tart itself ( shell scripts similar to the Hyper-V providers powershell scripts, the next step is building a box file out of a VM, for which I installed Ubuntu 22 in a Tart VM then tried checking out the chef/bento box repo and running the scripts. Last I tried I ran them in the wrong order and messed the VM up though which is a bit silly of me. |
Is this still something that is actively maintained? I am checking into replacing VMWare Fusion with something more lightweight / easier to use. We keep getting issues in using Vagrant + VMWare Fusion + Packer Built CentOS image on a macOS Apple Silicon. Not sure if this would be a good alternative |
Getting it up and running is more challenging than I had anticipated, and it's been a one man journey so far. The Tart devs have been helpful and made changes from their end so that end of things has been going very well, but the actual vagrant part is difficult, especially on my own. As a result though I managed to figure out the box format and get things scaffolded, I haven't gotten to the point where I can start a VM with I'm still very interested in getting this working though, but I don't think it'll be done in a timely manner if i'm the only one working on the vagrant side, it's the first vagrant plugin/provider I've ever built so there's a steep learning curve. Suffice to say if I did get it running I'd be making a big song and dance about it here asking for fellow maintainers and testers to get new boxes setup |
Thanks @tomjn trying to master that piece of cake ! I was initially searching for a replacement of Vagrant / VirtualBox on my Mac, searching around UTM I find Tart. I hope the thread is not dead :) |
Hello, I have managed to produce a usable provider (in Ruby), which supports most of the Vagrant commands: https://letiemble.github.io/vagrant-tart/. The Gem is available on RubyGems. Feel free to test it and give some feedback. |
@letiemble I gave your project a go today and it’s working great! We automate infrastructure testing using Test Kitchen which uses Vagrant to control VMs. We switched to CirrusCLI to use tart, which was fine, but missed some nice features that Test Kitchen offers. Thanks to your tool, I’m able to switch back to Test Kitchen! There is a little bit of hassle getting Test Kitchen to set the Thank you for putting this together!! |
Thank you for this. If it is fully working, it seems like official recognition is all that is left, to be able to close this issue. Is that a simple matter of adding it to the list of providers here? I've looked through the comments and it doesn't seem like any official member of the HashiCorp organization has commented on this issue. I'm not sure if there's something we need to do to get their attention. |
We just open sourced Tart -- virtualization toolset to build, run and manage virtual machines on Apple Silicon. At the moment Tart only supports macOS VMs but soon we'll add Linux support as well.
Tart was designed to be integrated into CIs and other tools. We already have a Packer Builder Plugin. There is already an interest in Tart Vagrant Provider and we are willing to work/help to build it.
Creating this issue as an alternative/additional option of #12518.
The text was updated successfully, but these errors were encountered: