microvmrun

package
v0.41.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package microvmrun is the presentation half of the Dev VM targets: it drives test/microvm and formats what that package returns for a terminal.

It is separate from test/microvm because that package has a second consumer, the e2e cluster suite, which wants the fleet and not a status table. Keeping the printing here leaves the mage targets as thin as magefiles/AGENTS.md asks, without pushing terminal formatting into a package the test suite imports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Down

func Down(fleet string) error

Down tears a fleet down. An empty fleet name means the default one.

func Image

func Image(ctx context.Context, which string) error

Image fetches and verifies base images without starting anything.

It fetches only what was asked for, because the images are several hundred megabytes each and a Rocky-only fleet has no use for Ubuntu's.

func List

func List(fleet string) error

List prints a fleet's nodes and whether each is running.

func SSH

func SSH(ctx context.Context, fleet, node string, command ...string) error

SSH runs ssh against one node with the caller's terminal attached.

func Up

func Up(ctx context.Context, opts Options) error

Up brings up a fleet and prints what to do with it.

Types

type Options

type Options struct {
	// Controllers, Workers and Infra are how many of each group to create. Infra nodes join
	// as workers under a profile of their own.
	Controllers int
	Workers     int
	Infra       int
	// UbuntuControllers and UbuntuWorkers run Ubuntu instead of Rocky. Both opt in.
	UbuntuControllers int
	UbuntuWorkers     int
	// Distro is the engine the fleet is prepared for, k3s or rke2.
	Distro string
	// MemoryMiB and CPUs are per node. Zero means the package default, which is what makes
	// the refusal a big fleet hits actionable: the guard says to lower the per-node memory,
	// and these are how.
	MemoryMiB int
	CPUs      int
}

Options is what dev:vmUp was asked for, after its flag defaults have been applied.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL