Skip to main content

Spec

Struct Spec 

Source
pub struct Spec {
Show 22 fields pub version: Version, pub name: String, pub networks: IndexMap<String, Network>, pub reach: Vec<Reach>, pub dns: Option<EnvironmentDns>, pub inputs: Inputs, pub secrets: IndexMap<String, SecretSource>, pub volumes: IndexMap<String, SharedVolume>, pub machines: IndexMap<String, Machine>, pub common: Option<Shared>, pub groups: IndexMap<String, Group>, pub provision: Vec<Provision>, pub controller: Option<Controller>, pub checks: Vec<Check>, pub message: Option<String>, pub overrides: Overrides, pub tools: IndexMap<String, Tool>, pub targets: Option<Vec<Target>>, pub constraints: Option<Constraints>, pub cloud: Option<CloudServices>, pub clones: IndexMap<String, Vec<String>>, pub spans: Spans,
}
Expand description

An environment spec, as written. Field order is kept (machines start in the order written).

Fields§

§version: Version

The version of the isoloom.yml format the file is written in: 1.

§name: String

The environment’s id, in kebab case (supplier-portal): it names its containers, VMs, networks and cloud resources.

§networks: IndexMap<String, Network>

The environment’s networks, by name: each an address block the machines on it share.

§reach: Vec<Reach>

Allowed traffic between networks; everything else between networks is blocked.

§dns: Option<EnvironmentDns>

The environment’s names in a private DNS zone: off unless private: true.

§inputs: Inputs

Values given at each start (a flag, a launch token): a list of names, or a map of name to { sensitive, description }. An input is sensitive unless it says otherwise: it reaches a machine as a file (files: [{ path, input }]), never as an environment variable.

§secrets: IndexMap<String, SecretSource>

Secrets, by kebab-case name: the store each value is read from at each start (env, file, vault, sops). A machine gets one as a file (files: [{ path, secret }]).

§volumes: IndexMap<String, SharedVolume>

Volumes shared between machines, by name: { owner, persistent }.

§machines: IndexMap<String, Machine>

The environment’s machines, by name, started in the order written (after their depends_on).

§common: Option<Shared>

Machine fields every machine shares (a machine’s own value wins).

§groups: IndexMap<String, Group>

Named sets of machines sharing fields, also Ansible inventory groups and overrides keys.

§provision: Vec<Provision>

The environment’s own Ansible, run from Isoloom’s Linux controller once every machine is up.

§controller: Option<Controller>

The controller added for provision: and playbook checks: { resources, keep_running }.

§checks: Vec<Check>

Black-box checks that prove the behaviour on every target.

§message: Option<String>

Shown once the environment is up, in Markdown, with {{ path }} placeholders: machines.<m>.ports.<name>.port, .published, .url, machines.<m>.addresses.<network> and cloud.outputs.<name>, each checked at validation.

§overrides: Overrides

Per-target facts with no portable meaning, by target (docker, vagrant, proxmox, aws, …).

§tools: IndexMap<String, Tool>

Observers beside the environment, on every network: a toolbox (shell), or any container image.

§targets: Option<Vec<Target>>

Narrows the targets the machines’ forms allow.

§constraints: Option<Constraints>

What the place it runs in imposes: an HTTP proxy, registry and package mirrors, time servers.

§cloud: Option<CloudServices>

An environment of cloud services rather than machines: a Terraform module applied into the user’s own cloud account.

§clones: IndexMap<String, Vec<String>>

Base machine name → its clones, for machines that had a count. Filled when parsing.

§spans: Spans

Where each field is written, for the problems found after parsing.

Trait Implementations§

Source§

impl Clone for Spec

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 Spec

Source§

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

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

impl Default for Spec

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl JsonSchema for Spec

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for Spec

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 Spec

Auto Trait Implementations§

§

impl Freeze for Spec

§

impl RefUnwindSafe for Spec

§

impl Send for Spec

§

impl Sync for Spec

§

impl Unpin for Spec

§

impl UnsafeUnpin for Spec

§

impl UnwindSafe for Spec

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<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.