deploy

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: AGPL-3.0 Imports: 26 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const TartMacOSBridgedInterfaceEnvVar = tartMacOSBridgedInterfaceEnvVar

TartMacOSBridgedInterfaceEnvVar names the host interface Tart VMs are bridged to; unset means Tart's shared NAT network.

Variables

This section is empty.

Functions

func ConfigureNamedGuestHostname added in v0.27.0

func ConfigureNamedGuestHostname(vm build.VirtualMachineConfig) error

ConfigureNamedGuestHostname uses the guest agent, so even a cloned guest with an inherited network identity is selected by its provider identity, not its IP. Defaults are deliberately untouched. Tart uses its existing SSH provisioning.

func CreateTargetExists added in v0.7.0

func CreateTargetExists(config alchemy_build.VirtualMachineConfig) (bool, error)

func DestroyTargetExists added in v0.7.0

func DestroyTargetExists(config alchemy_build.VirtualMachineConfig) (bool, error)

func DiscoverInstances added in v0.27.0

func DiscoverInstances(bases []build.VirtualMachineConfig) ([]build.VirtualMachineConfig, error)

DiscoverInstances queries the hypervisor, not the registry. Defaults are supplied by the caller, so old installations need no metadata or migration.

func InspectInstanceID added in v0.27.0

func InspectInstanceID(config alchemy_build.VirtualMachineConfig) (id string, exists bool, err error)

InspectInstanceID returns the hypervisor's identifier of the VM for config, which changes when the VM is destroyed and created again under the same name. It works for stopped VMs. exists is false when no VM exists. UTM uses its bundle UUID; Tart uses the local VM directory identity because clones can share hardware IDs.

func InstanceStorageDirectory added in v0.27.0

func InstanceStorageDirectory(vm build.VirtualMachineConfig) string

InstanceStorageDirectory selects the filesystem used for the new clone.

func LinuxLibvirtDomainName added in v0.14.0

func LinuxLibvirtDomainName(config alchemy_build.VirtualMachineConfig) string

LinuxLibvirtDomainName returns the managed libvirt domain name for a VM config.

func LinuxLibvirtURI added in v0.14.0

func LinuxLibvirtURI() string

LinuxLibvirtURI returns the configured libvirt connection URI.

func RecordInstance added in v0.27.0

func RecordInstance(vm build.VirtualMachineConfig) error

RecordInstance stores metadata only after successful creation. Unknown image provenance is represented by an empty image_version, never an invented version.

func RemoveInstanceRecord added in v0.27.0

func RemoveInstanceRecord(vm build.VirtualMachineConfig) error

func RunDestroy added in v0.7.0

func RunDestroy(config alchemy_build.VirtualMachineConfig) error

func RunHypervVagrantDeployOnWindows added in v0.2.0

func RunHypervVagrantDeployOnWindows(config alchemy_build.VirtualMachineConfig) error

func RunHypervVagrantDestroyOnWindows added in v0.7.0

func RunHypervVagrantDestroyOnWindows(config alchemy_build.VirtualMachineConfig) error

func RunHypervVagrantStartOnWindows added in v0.7.0

func RunHypervVagrantStartOnWindows(config alchemy_build.VirtualMachineConfig) error

func RunHypervVagrantStopOnWindows added in v0.7.0

func RunHypervVagrantStopOnWindows(config alchemy_build.VirtualMachineConfig) error

func RunLinuxQemuDeployOnLinux added in v0.14.0

func RunLinuxQemuDeployOnLinux(config alchemy_build.VirtualMachineConfig) error

func RunLinuxQemuDestroyOnLinux added in v0.14.0

func RunLinuxQemuDestroyOnLinux(config alchemy_build.VirtualMachineConfig) error

func RunLinuxQemuStartOnLinux added in v0.14.0

func RunLinuxQemuStartOnLinux(config alchemy_build.VirtualMachineConfig) error

func RunLinuxQemuStopOnLinux added in v0.14.0

func RunLinuxQemuStopOnLinux(config alchemy_build.VirtualMachineConfig) error

func RunStart added in v0.7.0

func RunStart(config alchemy_build.VirtualMachineConfig) error

func RunStop added in v0.7.0

func RunTartDeployOnMacOS added in v0.6.0

func RunTartDeployOnMacOS(config alchemy_build.VirtualMachineConfig) error

func RunTartDestroyOnMacOS added in v0.7.0

func RunTartDestroyOnMacOS(config alchemy_build.VirtualMachineConfig) error

func RunTartStartOnMacOS added in v0.7.0

func RunTartStartOnMacOS(config alchemy_build.VirtualMachineConfig) error

func RunTartStopOnMacOS added in v0.7.0

func RunTartStopOnMacOS(config alchemy_build.VirtualMachineConfig) error

func RunUtmDeployOnMacOS

func RunUtmDeployOnMacOS(config alchemy_build.VirtualMachineConfig) error

func RunUtmDestroyOnMacOS added in v0.7.0

func RunUtmDestroyOnMacOS(config alchemy_build.VirtualMachineConfig) error

func RunUtmStartOnMacOS added in v0.7.0

func RunUtmStartOnMacOS(config alchemy_build.VirtualMachineConfig) error

func RunUtmStopOnMacOS added in v0.7.0

func RunUtmStopOnMacOS(config alchemy_build.VirtualMachineConfig) error

func SupportsCreate added in v0.14.0

func SupportsCreate(config alchemy_build.VirtualMachineConfig) bool

func SupportsDestroy added in v0.7.0

func SupportsDestroy(config alchemy_build.VirtualMachineConfig) bool

func SupportsStart added in v0.7.0

func SupportsStart(config alchemy_build.VirtualMachineConfig) bool

func SupportsStop added in v0.7.0

func SupportsStop(config alchemy_build.VirtualMachineConfig) bool

Types

type HypervVagrantExecutionSettings added in v0.7.0

type HypervVagrantExecutionSettings struct {
	VagrantDir string
	VagrantEnv []string
}

func ResolveHypervVagrantExecutionSettings added in v0.7.0

func ResolveHypervVagrantExecutionSettings(config alchemy_build.VirtualMachineConfig) (HypervVagrantExecutionSettings, error)

type InstanceRecord added in v0.27.0

type InstanceRecord struct {
	SchemaVersion  int                        `json:"schema_version"`
	Name           string                     `json:"name"`
	OS             string                     `json:"os"`
	Type           string                     `json:"type"`
	Arch           string                     `json:"arch"`
	Engine         build.VirtualizationEngine `json:"engine"`
	HypervisorName string                     `json:"hypervisor_name"`
	InstanceID     string                     `json:"instance_id"`
	CreatedAt      time.Time                  `json:"created_at"`
	ImageVersion   string                     `json:"image_version"`
}

InstanceRecord is supplemental metadata. Hypervisor state remains authoritative. SchemaVersion leaves room for additional lifecycle policy fields.

type NetworkMode added in v0.27.0

type NetworkMode struct {
	Mode   string `json:"mode"`
	Detail string `json:"detail"`
}

NetworkMode describes exposure, rather than promising a particular firewall configuration. Host-only networks are classified as nat because they do not expose the guest to the LAN.

func InspectNetworkMode added in v0.27.0

func InspectNetworkMode(vm alchemy_build.VirtualMachineConfig, creating bool) NetworkMode

InspectNetworkMode inspects the current VM, or the intended deployment when creating is true. Failed or incomplete inspection always returns unknown.

type StartTargetState added in v0.7.0

type StartTargetState = VirtualMachineState

type VirtualMachineState added in v0.7.0

type VirtualMachineState struct {
	Exists  bool
	Running bool
	State   string
}

func InspectStartTarget added in v0.7.0

func InspectStartTarget(config alchemy_build.VirtualMachineConfig) (VirtualMachineState, error)

func InspectStopTarget added in v0.7.0

func InspectStopTarget(config alchemy_build.VirtualMachineConfig) (VirtualMachineState, error)

Jump to

Keyboard shortcuts

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