Closed mloskot closed 1 year ago
I encourage also take a look at https://github.com/goyek/goyek
Here is a few reasons why it was created https://github.com/goyek/goyek#mage. The API is inspired by testing, cobra, flag, http packages so it should be easier to adopt for Go devs (and more idiomatic).
@pellared
I encourage also take a look at https://github.com/goyek/goyek
The goal of this PR is to not to discuss and decide what builder to pick. It will/may be discussed in future (/cc @jayunit100)
The goal here is to test VirtualBox-based setup on Windows host without WSL, and mage
is just convenient for the goal at hand. That's it.
The thread of this PR is not the right place for exchanges on why scripting tasks with A is superior over B and vice versa.
The goal of this PR is to not to discuss and decide what builder to pick.
I find it normal in code reviews is to discuss how something are implemented. I just wanted to give you feedback and share with you an alternative way to accomplish the same goal. I am not requesting any changes 🤷
can you re-target the PR to the to the main-windows-native
branch ? that way we have
main-qemu
for qemu m1 folks andmain-windows-native
for windows laptops
then once its 100% stable we'll merge mage
into mainline@jayunit100
can you re-target the PR to the to the
main-windows-native
branch ?
Sure. Can you create main-windows-native
branch from current master
?
Then I will be able to switch the PR-s base from master
to main-windows-native
.
that way we have
main-qemu
for qemu m1 folks andmain-windows-native
for windows laptops
Good idea!
In https://github.com/kubernetes-sigs/sig-windows-dev-tools/pull/253#issuecomment-1525271825 @claudiubelu mentioned problems with Kubernetes on Ubuntu 22.04. So, in order to enable ourselves here with variety of test boxes, I've created Ubuntu 20.04 box based on roboxes/ubuntu2004
- https://app.vagrantup.com/mloskot/boxes/sig-windows-dev-tools-ubuntu-2004
So, SWDT Vagrantfile can be modified for local testing or perhaps box could be declared in variables.yaml
.
Then, testers can switch between boxes using user-specific non-versioned variables.local.yaml
which will be picked automatically by Vagrantfile (thanks to mage
).
By the way of answering @jayunit100 's comment in https://github.com/kubernetes-sigs/sig-windows-dev-tools/pull/264#discussion_r1179569876, I've realised that I should have named all my boxes with -test-box
suffix to make it clear that here we are not proposing to switch SWDT over to mloskot/sig-windows-dev-tools-*
boxes for good, but temporarily for period of this testing phase.
pushed a branch you can PR against https://github.com/kubernetes-sigs/sig-windows-dev-tools/tree/master-windows-native
/lgtm /approve lets merge, i retargetted the branch for u
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: jayunit100, mloskot
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Features
This PR includes two features:
These are experimental Vagrant boxes which attempt to address issues like WinRM not starting, and boot timeouts, OS and VirtualBox guest additions update, and enable/disable VirtualBox features explicitly (for documentation, control, easier troubleshooting). These boxes have proved to be a working solution, and significantly speed up cluster provisioning for testing. Check the boxes repository for details: https://github.com/mloskot/sig-windows-dev-tools-boxes
Add Magefiles - https://magefile.org - as functional equivalent to the existing Makefile, but as a portable solution for all platforms supported by Go. Magefiles remove requirement of use of WSL as a proxy providing GNU Make on Windows host, aks true windows support.
Tester's Quickstart (with Mage)
TODO: This guide could be copied into the
README.md
before mergegh pr checkout 264
variables.yaml
tovariables.local.yaml
and modifyvariables.local.yaml
as you desire, for example:mage -l
to list all available Mage targets (as checkmage
works for you)mage all | tee m.log
or justmage | tee m.log
to download required Kubernetes software, download Vagrant boxes (1 and 2), run Vagrant to provision the two-node cluster, run smoke tests (it is known the smoke tests may fail).Run
mage status
in separate console. As soon as Vagrant completes provisioning the two VM-s, open new console and start runningmage status
every couple of minutes to watch the cluster status. Themage status
is a convenient proxy to execute sequence ofAlternatively, you can run
vagrant ssh controlplane
and inspect the cluster withkubectl
.Alternatively, you can download kubeconfig form the
controlplane
node to run any Kubernetes client directly from the Windows host:My initial run logs https://gist.github.com/mloskot/2670e7e7331f90e390eb5a750de7bf78