pub struct MachinePlan {Show 35 fields
pub shape: MachineShape,
pub addresses: IndexMap<String, Ipv4Addr>,
pub more_addresses: IndexMap<String, Vec<Ipv4Addr>>,
pub addresses6: IndexMap<String, Ipv6Addr>,
pub names: Vec<String>,
pub routes: Vec<Route>,
pub routes6: Vec<Route6>,
pub default_gateway: Option<Ipv4Addr>,
pub is_gateway: bool,
pub offline: bool,
pub ports: Vec<PublishedPort>,
pub volumes: Vec<Volume>,
pub files: Vec<MachineFile>,
pub disks: Vec<DataDisk>,
pub settings: Settings,
pub inputs: Vec<String>,
pub secrets: Vec<SecretFile>,
pub size: Size,
pub arch: Arch,
pub rate_limit: Option<String>,
pub image: Option<Image>,
pub vm_image: Option<VmImage>,
pub boot: Option<Boot>,
pub depends_on: Vec<String>,
pub lifecycle: MachineLifecycle,
pub os: Option<String>,
pub winrm: Option<Winrm>,
pub winssh: bool,
pub tpm: Option<Tpm>,
pub external: Option<External>,
pub host_vars: IndexMap<String, Value>,
pub outside: IndexMap<String, OutsideAddress>,
pub process: Process,
pub hardware: Hardware,
pub recipe: Option<Recipe>,
}Expand description
One machine of the environment.
Fields§
§shape: MachineShapeHow the target produces it.
addresses: IndexMap<String, Ipv4Addr>Its address on each of its networks, in its order (the first is its primary network).
more_addresses: IndexMap<String, Vec<Ipv4Addr>>Its addresses after the primary one on each network where it has several (lan: [10, 11]), in its networks’ order.
addresses6: IndexMap<String, Ipv6Addr>Its IPv6 address on each IPv6 network that derives them (not on addresses: auto ones).
names: Vec<String>Its names: its own, then its aliases, then (with dns.private) each of them under the
private zone’s domain.
routes: Vec<Route>Routes to the networks it isn’t on.
routes6: Vec<Route6>IPv6 routes to the IPv6 blocks it isn’t on, through the router.
default_gateway: Option<Ipv4Addr>Its default route through a gateway machine, if one routes one of its networks.
is_gateway: boolWhether it is the gateway of one of its networks (it forwards).
offline: boolWhether nothing it is on reaches the internet and no gateway decides for it.
ports: Vec<PublishedPort>The ports it publishes on the host.
volumes: Vec<Volume>Its volumes, in spec order.
files: Vec<MachineFile>The files placed on it, in spec order.
disks: Vec<DataDisk>Its data disks, in spec order.
settings: SettingsThe settings a container gets from its runtime and a VM from its set-up.
inputs: Vec<String>The inputs it reads (environment variables given at run time).
secrets: Vec<SecretFile>The secrets it gets as files, delivered at run time (never their values).
size: SizeIts size.
arch: ArchIts CPU architecture.
rate_limit: Option<String>The bandwidth cap on each of its links (rate_limit, a tc rate such as 10mbit).
image: Option<Image>What it runs from, on this target.
vm_image: Option<VmImage>The VM’s own image per target (vm.image: a box URL, a Proxmox or cloud image), when
the spec gives one.
boot: Option<Boot>How the VM boots, when not the way its image does (vm.boot).
depends_on: Vec<String>The machines it waits for, as the spec lists them.
lifecycle: MachineLifecycleThe set-up steps of a VM, in order (empty for the other shapes).
os: Option<String>The OS of its VM implementation (debian-12, windows-server-2022…), whatever the
target: an existing host keeps the OS its vm: names.
winrm: Option<Winrm>How its Windows VM answers WinRM (None off Windows, and on a box reached over OpenSSH).
winssh: boolWhether its Windows VM’s box is reached over OpenSSH instead (vm.image.winssh).
tpm: Option<Tpm>Its virtual TPM 2.0, when it gets one (vm.tpm, or Windows 11’s own).
external: Option<External>Its SSH endpoint as an existing host (external:), when the spec gives one.
host_vars: IndexMap<String, Value>Its variables from the provision: steps’ host_vars, merged in step order.
outside: IndexMap<String, OutsideAddress>Its addresses on the outside networks it joins, after its own networks.
process: ProcessIts own command, working directory, before steps and healthcheck.
hardware: HardwareThe GPUs, host devices and nested virtualization it asks for.
recipe: Option<Recipe>Its configuration resolved (an app’s steps), which its container’s build or its VM’s set-up renders: the one source every CM renderer reads.
Implementations§
Source§impl MachinePlan
impl MachinePlan
Sourcepub fn is_windows(&self) -> bool
pub fn is_windows(&self) -> bool
Whether it runs Windows.