LyraPhase / sprout-wrap

Scripts to prepare a Mac for Ruby / Python / Ansible / Chef / Intel Edison IoT development
The Unlicense
2 stars 0 forks source link

MacOS VM CI/CD #261

Open trinitronx opened 1 month ago

trinitronx commented 1 month ago

Migrated from LPSPRIG-1

The need for MacOS Virtual Machines & a working Test-Kitchen setup has plagued this project from the beginning. A solution utilizing Test Kitchen, Vagrant, Libvirt, QEMU, and OSX-KVM has been proven possible as proof-of-concept. Tools were rather complicated to set up but worked from late 2021 to early 2022.

Additionally, a remote Linux host accessed over SSH was possible to launch VMs remotely on a Linux server from another macOS workstation. This seems to be the holy grail of macOS VM CI/CD testing for this project!

Proof-of-concept is still working on the Linux server host side. However, the macOS workstation tools broke due to the complicated dependencies of Vagrant, vagrant-libvirt, ruby-libvirt, and other moving parts.

For this task:

trinitronx commented 1 month ago

Tested re-install of vagrant-libvirt with latest libvirt (10.8.0), vagrant (2.4.1), and qemu (9.1.0) from Homebrew:

$ vagrant plugin uninstall vagrant-libvirt
Uninstalling the 'vagrant-libvirt' plugin...
Successfully uninstalled diffy-3.4.2
Successfully uninstalled fog-core-2.3.0
Successfully uninstalled fog-json-1.2.0
Successfully uninstalled fog-libvirt-0.11.0
Successfully uninstalled fog-xml-0.1.4
Successfully uninstalled formatador-1.1.0
Removing nokogiri
Successfully uninstalled nokogiri-1.15.4-x86_64-darwin
Successfully uninstalled ruby-libvirt-0.8.0
Removing stackprof-flamegraph.pl
Removing stackprof-gprof2dot.py
Successfully uninstalled vagrant-libvirt-0.12.2
Successfully uninstalled xml-simple-1.1.9

$ vagrant plugin install vagrant-libvirt
Installing the 'vagrant-libvirt' plugin. This can take a few minutes...
Fetching xml-simple-1.1.9.gem
Fetching nokogiri-1.16.7-x86_64-darwin.gem
Fetching ruby-libvirt-0.8.4.gem
Building native extensions. This could take a while...
Fetching formatador-1.1.0.gem
Fetching fog-core-2.5.0.gem
Fetching fog-xml-0.1.4.gem
Fetching fog-json-1.2.0.gem
Fetching fog-libvirt-0.12.2.gem
Fetching diffy-3.4.2.gem
Fetching vagrant-libvirt-0.12.2.gem
Installed the plugin 'vagrant-libvirt (0.12.2)'!

$ ls -1 ~/.vagrant.d/gems/3.1.4/gems/
diffy-3.4.2
fog-core-2.5.0
fog-json-1.2.0
fog-libvirt-0.12.2
fog-xml-0.1.4
formatador-1.1.0
nokogiri-1.16.7-x86_64-darwin
ruby-libvirt-0.8.4
vagrant-libvirt-0.12.2
vagrant-vmware-desktop-3.0.4
xml-simple-1.1.9