feat: add a test k3s cluster running on kubevirt

This commit is contained in:
Ryan Yin
2024-03-23 02:05:54 +08:00
parent c258b3b1c8
commit 2319300f48
13 changed files with 338 additions and 26 deletions

View File

@@ -53,3 +53,22 @@ export def darwin-switch [
export def darwin-rollback [] {
./result/sw/bin/darwin-rebuild --rollback
}
# ==================== Virutal Machines related =====================
# Build and upload a VM image
export def upload-vm [
name: string
mode: string
] {
let target = $".#($name)"
if "debug" == $mode {
nom build $target --show-trace --verbose
} else {
nix build $target
}
let remote = $"root@rakushun:/var/lib/caddy/fileserver/vms/kubevirt-($name).qcow2"
rsync -avz --progress --copy-links result $remote
}