Skip to main content

Module inventory

Module inventory 

Source
Expand description

TOML inventory file format for cascade-copy / cascade deploy bins.

Schema:

# The seed host — `nix copy` from here runs locally (no SSH wrap).
# Typically the build host.
seed = "olive@seir"

# All other targets the cascade should distribute to. SSH addresses;
# `user@host` form. The cascade strategy decides which become
# intermediate sources for further fan-out.
nodes = [
    "root@hp01",
    "root@hp02",
    "root@hp03",
    "olive@mm01",
    "olive@mm02",
    "olive@mm03",
    "olive@mm04",
    "olive@mm05",
]

Loaded into a (Vec<CascadeNode>, NodeId) pair where:

  • nodes[0] is the seed at NodeId(0)
  • nodes[1..] are the targets at NodeId(1), NodeId(2), etc.
  • The returned NodeId is the seed (always NodeId(0))

Functions§

load_inventory
Load a TOML inventory file. Returns (nodes, seed_id, addr_map):