qemu

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package qemu provides functionality to bring up Talos QEMU VMs to develop/test the provider.

Index

Constants

View Source
const (

	// TalosctlBinary is the default name of the talosctl binary.
	TalosctlBinary = "talosctl"
)

Variables

View Source
var DefaultOptions = Options{
	Name:         "bare-metal",
	CIDR:         "172.42.0.0/24",
	CNIBundleURL: "https://github.com/siderolabs/talos/releases/latest/download/talosctl-cni-bundle-amd64.tar.gz",
	NumMachines:  4,
	Nameservers:  []string{"1.1.1.1", "1.0.0.1"},
	MTU:          1440,

	CPUs:     "3",
	DiskSize: 6 * 1024 * 1024 * 1024,
	MemSize:  3072 * 1024 * 1024,
}

DefaultOptions are the default options for the set of machines.

Functions

This section is empty.

Types

type Machines

type Machines struct {
	// contains filtered or unexported fields
}

Machines represents a set of Talos QEMU machines.

func New

func New(options Options, logger *zap.Logger) (*Machines, error)

New creates a new set of Talos QEMU machines.

func (*Machines) Destroy

func (machines *Machines) Destroy(ctx context.Context) error

Destroy destroys the existing set of machines.

func (*Machines) Run

func (machines *Machines) Run(ctx context.Context) error

Run starts the provisioner by provisioning a QEMU cluster with the given number of machines. If the cluster already exists, it is loaded instead.

type Options

type Options struct {
	Name         string
	CIDR         string
	CNIBundleURL string
	TalosctlPath string
	CPUs         string

	Nameservers []string

	NumMachines int
	MTU         int

	DiskSize uint64
	MemSize  int64
}

Options for the set of machines.

Jump to

Keyboard shortcuts

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