Skip to main content

Step

Enum Step 

Source
pub enum Step {
Show 24 variants Prelude, DiskGrow, Disks { disks: Vec<DataDisk>, }, Settings, Hosts { entries: Vec<(Ipv4Addr, Vec<String>)>, }, Routes { routes: Vec<Route>, default: Option<Ipv4Addr>, }, Ipv6 { addresses: Vec<(Ipv4Addr, Ipv6Addr)>, routes: Vec<Route6>, }, Trunks, MoreAddresses { addresses: Vec<MoreAddresses>, }, Volumes { paths: Vec<String>, }, SharedVolume { volume: String, path: String, role: SharedRole, }, Project, Files { files: Vec<MachineFile>, }, Inputs { persist: bool, }, Secrets, WaitFor { machine: String, ports: Vec<u16>, }, Run { path: String, kind: RunKind, creates: Option<String>, }, Configure { resources: Vec<Resource>, fresh: bool, }, Reboot, Command, Setup { paths: Vec<String>, }, Egress, Tc, Ready,
}
Expand description

One set-up step of a VM.

Variants§

§

Prelude

The spec’s constraints: proxy, package mirrors, NTP (before anything downloads).

§

DiskGrow

Grows the root file system to the disk the machine was given.

§

Disks

Formats its data disks (once, when blank) and mounts them, at every boot.

Fields

§disks: Vec<DataDisk>

The disks, in spec order (a raw one is left as it is).

§

Settings

The machine’s environment, sysctls and ulimits.

§

Hosts

The other machines by name, at the address this one reaches each at.

Fields

§entries: Vec<(Ipv4Addr, Vec<String>)>

One (address, names) per other machine, its own name first.

§

Routes

Routes to the networks it isn’t on, then its default route through a gateway.

Fields

§routes: Vec<Route>

The routes.

§default: Option<Ipv4Addr>

The default route’s next hop.

§

Ipv6

Its IPv6 addresses, each on the interface holding its IPv4 address on that network, then its IPv6 routes through the router.

Fields

§addresses: Vec<(Ipv4Addr, Ipv6Addr)>

One (IPv4 address, IPv6 address) per IPv6 network: the IPv4 one finds the interface.

§routes: Vec<Route6>

The routes.

§

Trunks

802.1Q interfaces for the VLANs it reaches through a trunk.

§

MoreAddresses

Its further addresses on a network (lan: [10, 11]), each on the interface holding its primary address there.

Fields

§addresses: Vec<MoreAddresses>

One entry per network where it has several.

§

Volumes

The directories of its own volumes.

Fields

§paths: Vec<String>

The mount paths.

§

SharedVolume

A shared volume: served over NFS by its owner, mounted by the others.

Fields

§volume: String

The volume’s name.

§path: String

Where this machine has it.

§role: SharedRole

This machine’s part.

§

Project

The project copied to /opt/isoloom.

§

Files

The machine’s files, each placed at its path with its owner and mode (a source read from the unpacked project).

Fields

§files: Vec<MachineFile>

The files, in spec order.

§

Inputs

The inputs made available to the steps.

Fields

§persist: bool

Kept on disk (a reboot comes and /tmp is emptied at boot).

§

Secrets

Waits for isoloom run to deliver its secrets, then puts each file in place, now and at every boot (see crate::SecretFile). Before anything that may read one: the app’s steps, its command and its setup scripts.

§

WaitFor

Waits until a machine it depends on answers.

Fields

§machine: String

The machine.

§ports: Vec<u16>

The ports it must answer on.

§

Run

One of its app’s scripts or playbooks.

Fields

§path: String

The script or playbook, from the project folder.

§kind: RunKind

How it runs.

§creates: Option<String>

A path whose existence means it already ran (a script’s creates).

§

Configure

A run of its recipe’s other steps (packages, files, users, services…), between its scripts, playbooks and reboots, rendered by the configuration library of its OS.

Fields

§resources: Vec<Resource>

The steps, in recipe order.

§fresh: bool

Whether no script, playbook or reboot ran before it in this set-up, so nothing has changed yet (the services after one restart: the rule errs on restarting).

§

Reboot

Restarts the machine; the steps after it run once it is back.

§

Command

Its own command, run as a service from now on (see crate::Process).

§

Setup

Its setup scripts, run once with its service up, as root from the project folder.

Fields

§paths: Vec<String>

The scripts, from the project folder.

§

Egress

Offline: no new connection leaves the environment.

§

Tc

Link impairment on its own interfaces.

§

Ready

Marks the machine ready, once its healthcheck passes when it has one.

Trait Implementations§

Source§

impl Clone for Step

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Step

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Step

Source§

impl PartialEq for Step

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Step

Auto Trait Implementations§

§

impl Freeze for Step

§

impl RefUnwindSafe for Step

§

impl Send for Step

§

impl Sync for Step

§

impl Unpin for Step

§

impl UnsafeUnpin for Step

§

impl UnwindSafe for Step

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.