mirror of
https://github.com/dsx-ai-factory/nvke.git
synced 2026-12-07 04:35:58 +08:00
nico-sim's darwin-qemu backend boots arm64 NVKE node images under HVF on
Apple's vmnet network, and the controller's Tilt stack provisions those VMs
end to end while the management plane stays in kind.
- darwin-qemu: QEMU with HVF over vmnet-helper, Apple DHCP leases, swtpm for
FDE guests, cloud-init phone_home served on the vmnet gateway.
- Control-plane VIPs over BGP on macOS, with static host routes installed
through a scoped sudoers rule and re-applied every 30 seconds.
- VM management targets (vms, vm-stop/start/delete, vms-clean) backed by
stop/start support in the lifecycle engine and GET /sim/instances.
- cpu4-mem8gb seed instance type.
- os-image: HVF bakes on Apple silicon default to linux-generic.
- controller/hack/mac-vm-dev-{up,down,e2e}.sh guided bring-up, teardown and
e2e on the Mac.
Signed-off-by: Cullen McDermott <9535761+cullenmcdermott@users.noreply.github.com>
42 lines
1.9 KiB
Bash
Executable File
42 lines
1.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
# Run the nico-vms e2e specs against the stack hack/mac-vm-dev-up.sh brought
|
|
# up, as hack/ci/nico-vms-e2e.sh runs them on a Linux KVM host. Each entry
|
|
# creates its own tenant cluster and deletes it again; a failed one is kept
|
|
# for debugging, and the run stops there.
|
|
#
|
|
# Environment:
|
|
# LABEL_FILTER Ginkgo label filter (default: the arm64 CI lane's, less
|
|
# parallel-lifecycle: its Calico tenant cannot exist here,
|
|
# because NVKE allows a custom pod CIDR only with OVN and
|
|
# Calico's default 192.168.0.0/16 overlaps vmnet's node network)
|
|
# E2E_TIMEOUT suite timeout (default: 270m, as in CI)
|
|
# NKE_E2E_UPGRADE_HOPS upgrade hops to run (default: 1, as in CI)
|
|
|
|
set -euo pipefail
|
|
# shellcheck source=hack/mac-vm-dev-lib.sh
|
|
source "$(dirname "${BASH_SOURCE[0]}")/mac-vm-dev-lib.sh"
|
|
reexec_in_flox "$@"
|
|
|
|
LABEL_FILTER="${LABEL_FILTER:-nico-vms && (happy-path || ovn || multi-pod-cidrs)}"
|
|
E2E_TIMEOUT="${E2E_TIMEOUT:-270m}"
|
|
export NKE_E2E_UPGRADE_HOPS="${NKE_E2E_UPGRADE_HOPS:-1}"
|
|
mkdir -p "${STATE_DIR}"
|
|
|
|
jq -n --arg context "kind-${KIND_CLUSTER_NAME}" \
|
|
'{kube: {context: $context}, lifecycle: {preserveOnFailure: true}}' >"${STATE_DIR}/e2e-config.json"
|
|
|
|
cd "${CONTROLLER_DIR}/test/e2e"
|
|
# The fleet releases fixture gives the release matrix its metadata, as in CI.
|
|
# Ginkgo enforces the timeout; Go's own would kill the run without a report.
|
|
NVKE_CONTROLLER_RELEASES_DIR="${CONTROLLER_DIR}/test/fixtures/fleet-releases" run go test -v -timeout 0 . -args \
|
|
-e2e.config="${STATE_DIR}/e2e-config.json" \
|
|
-ginkgo.v \
|
|
-ginkgo.fail-on-empty \
|
|
-ginkgo.fail-fast \
|
|
-ginkgo.timeout="${E2E_TIMEOUT}" \
|
|
-ginkgo.label-filter="${LABEL_FILTER}" \
|
|
-ginkgo.junit-report="${STATE_DIR}/e2e-junit.xml" 2>&1 | tee "${STATE_DIR}/e2e.log"
|