pub struct Spec {Show 21 fields
pub version: u32,
pub name: String,
pub networks: IndexMap<String, Network>,
pub reach: Vec<Reach>,
pub dns: Option<EnvironmentDns>,
pub inputs: Vec<String>,
pub plain_inputs: Vec<String>,
pub secrets: IndexMap<String, SecretSource>,
pub machines: IndexMap<String, Machine>,
pub cloud: Option<CloudServices>,
pub volumes: IndexMap<String, SharedVolume>,
pub constraints: Option<Constraints>,
pub common: Option<Shared>,
pub groups: IndexMap<String, Group>,
pub provision: Vec<Provision>,
pub controller: Option<Controller>,
pub checks: Vec<Check>,
pub targets: Option<Vec<Target>>,
pub message: Option<String>,
pub tools: IndexMap<String, Tool>,
pub clones: IndexMap<String, Vec<String>>,
}Expand description
An environment spec. Field order in the file is kept (machines start in the order written).
Fields§
§version: u32The version of the isoloom.yml format the file is written in: 1, the only one so far.
name: StringThe environment’s id, in kebab case (supplier-portal): it names its containers, VMs,
networks and cloud resources, and the environment in isoloom status.
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. See
EnvironmentDns.
inputs: Vec<String>Names of the values a runner provides at launch (a token, a licence key): from the
environment of isoloom run, or a profile’s inputs. A machine receives the ones its own
inputs lists. Never baked into images.
plain_inputs: Vec<String>The inputs the authored spec marks sensitive: false (an URL, a mode): shown in a runner’s
events and logs. Every other input is masked. Set by lowering only.
secrets: IndexMap<String, SecretSource>Secrets, by kebab-case name: where isoloom run reads each value on the runner (env,
file, vault, sops). A machine lists the ones it gets in its own secrets, as
files. Values never reach a generated file, the resolved snapshot or a log.
machines: IndexMap<String, Machine>The environment’s machines, by name, started in the order written (after their
depends_on).
cloud: Option<CloudServices>An environment of cloud services rather than machines (IAM users and roles, functions,
buckets, queues…): a Terraform module in the project, applied into the user’s own cloud
account. A spec has either cloud: or machines.
volumes: IndexMap<String, SharedVolume>Volumes shared between machines: a machine volume with one of these names is this
volume, wherever it mounts it. One declared here can also outlive isoloom down
(persistent: true) or be one that exists already (external: <name>).
constraints: Option<Constraints>What the place it runs in imposes: an HTTP proxy, registry and package mirrors, time servers. Usually set by a profile, one customer’s network at a time.
common: Option<Shared>Machine fields shared by every machine (a machine’s own value wins). docker: and vm:
here only complete an implementation a machine declares itself.
groups: IndexMap<String, Group>Named sets of machines sharing fields (over common:, under the machine’s own; the most
specific group wins). They also become Ansible inventory groups, and isoloom exec
targets.
provision: Vec<Provision>Provisioning across machines, once every machine is up: Ansible playbooks run from a controller on the environment’s networks, with an inventory Isoloom writes.
controller: Option<Controller>The controller Isoloom adds for provision: (and checks run from it): a small VM, sized
and boxed like a machine. By default 1 CPU, 512 MB and a minimal Alpine box on Vagrant.
checks: Vec<Check>Black-box checks that prove the behavior on every target: scripts, or declared probes
(http, tcp, exec, script) run from a machine of the environment. Isoloom adds
derived checks of its own from ports and reach.
targets: Option<Vec<Target>>Narrows the targets derived from the implementations (e.g. not tested on Proxmox yet).
message: Option<String>Shown once the environment is up (isoloom run, isoloom message): how to start, in
Markdown. {{ machines.web.addresses.front }}-style placeholders take any value of the
resolved snapshot (isoloom inspect shows the paths).
tools: IndexMap<String, Tool>Observers beside the environment, on every network, that aren’t machines of it (not
in reach, resources or the derived checks): a toolbox to look from (shell), or any
container image.
clones: IndexMap<String, Vec<String>>Base machine name -> its clones, for machines that had a count. Filled when parsing.
Implementations§
Source§impl Spec
impl Spec
Sourcepub fn private_domain(&self) -> Option<String>
pub fn private_domain(&self) -> Option<String>
The private DNS zone’s domain, when dns.private is on.
Sourcepub fn volume_key(&self, machine: &str, volume: &str) -> String
pub fn volume_key(&self, machine: &str, volume: &str) -> String
The storage behind machine machine’s volume volume: the shared volume’s own name,
else one of its own (<machine>-<volume>).
Sourcepub fn volume_users(&self, volume: &str) -> Vec<&str>
pub fn volume_users(&self, volume: &str) -> Vec<&str>
The machines that mount shared volume volume, in spec order.
Sourcepub fn volume_owner(&self, volume: &str) -> Option<&str>
pub fn volume_owner(&self, volume: &str) -> Option<&str>
The machine holding shared volume volume: its owner, else its first user.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Spec
impl<'de> Deserialize<'de> for Spec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Spec
impl JsonSchema for Spec
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more