1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! What every Isoloom backend renders with, so the targets render the same decisions the same
//! way. It sits between the plan (`isoloom-plan`, the facts) and the backends (Compose,
//! Kubernetes, Vagrant, Terraform, Ansible), which implement its
//! [`Backend`](backend::Backend) port.
//!
//! - **The port:** [`backend`] (the [`Backend`](backend::Backend) trait a target's renderer
//! implements) and its [`Error`].
//! - **The builders**, one per language a target writes: [`hcl_builder`] (Terraform), [`ruby`]
//! (a Vagrantfile's literals), [`powershell`] (a Windows machine's) and [`inventory`]
//! (Ansible's); shell is `isoloom_spec::shell`, below every crate.
//! - **The configuration renderers** ([`configure`]): a machine's recipe as the shell and
//! PowerShell libraries' calls, the Dockerfile its container builds from, and Isoloom's runner,
//! the process of a container that runs services.
//! - **A VM's set-up:** [`steps`] (each [`Step`](isoloom_plan::Step) as Linux shell or
//! PowerShell), the scripts kept across restarts ([`boot`]), [`secrets`] delivered at run time,
//! the network's [`constraints`], the [`controller`] that runs the playbooks, and the
//! [`project`] copied in.
//! - **The network pieces:** [`router`], VLAN [`trunks`], [`ipv6`] and a VM's
//! [`more_addresses`].
//! - **The containers' shared parts:** [`container`]; where a check reaches its host:
//! [`checks`].
//! - **The run manifest's pieces** every target's `run.json` is built from: [`run_manifest`].
//!
//! Everything here is a pure function of the plan: no I/O, no clock, no environment.
//!
//! ```
//! use isoloom_plan::{Environment, Lab, Step};
//! use isoloom_spec::model::Target;
//!
//! let lab = Lab::parse(
//! "version: 1\nname: demo\nnetworks: { lan: { cidr: 10.9.0.0/24 } }\nmachines:\n web: { networks: { lan: 10 }, os: debian@12 }\n",
//! )
//! .expect("the spec parses");
//! let env = Environment::build(&lab.for_target(Target::Vagrant), Target::Vagrant, None);
//! let ready = isoloom_render::steps::linux(&env, "web", &Step::Ready).expect("every VM gets ready");
//! assert!(ready.ends_with("echo ready > /var/lib/isoloom/ready\n"));
//! ```
pub use ;
pub use ;
pub use ;