Moving modules out
The modules leave the workspace's own tree and move into one public
repository, released from there to a source over HTTP. The workspace then
installs them through modules.yaml like any other source, and they land in the same modules/<name> they left. The move
goes one module at a time and stays reversible at every step.
Today
- Every module lives in the workspace under
modules/, declared inmodules.yamlas onerepo: localentry. - Dependencies between modules are in
requires.yaml: baserequireshostname,selinux,repos,packages,ssh,accounts,nftables;sshrequiresaccounts;packages,nginxandamneziawgrequirerepos;dockerrequiresreposandnftables;awg-keeperrequiresamneziawgandxray;client-vpnrequiresamneziawg,docker,xray,awg-keeper,nginx.
The repository
The module repository has the layout of a workspace: every module is
modules/<name>/, and its own modules.yaml lists them all in one
repo: local entry, so suil validate and the module tests run there as in
any workspace.
Every module is versioned on its own. Its tags are <name>-<version>, its
commitizen config and changelog are in its directory, and a bump counts only
the commits under modules/<name>/. A pushed tag is the release: CI packs
the module and adds it to the index of the source, see
05-manifest.md.
Moving a module
- The module's directory is copied into the repository, without history,
and released with
cz bump, which tags<name>-0.1.0; CI publishes it to the source. - In the workspace's
modules.yamlthe module leaves therepo: localentry for the entry of the source, as<name>: 0.1.0under itsmodules. - The workspace stops tracking
modules/<name>/: whether installed modules are committed or ignored by Git is the workspace's choice. suil installlays the module back intomodules/<name>.- Module names do not change, so
data/is not touched: roles and nodes select the same names, and encrypted values stay where they are.
Leaves move before what requires them, so a module always finds what it requires already moved or still local. Meta modules move last.
Checking a module
After each module every role must resolve the same module order and write the
same node.yaml and <module>.yaml under .runs/ on
suil apply --dry-run as before the move. The signature covers the module's
files alone, and the installed files are the ones that were tracked, so no
module is forced by the move.
Rollback
A rollback is the previous modules.yaml and the module's directory, both
restored from the workspace's Git history. Nothing on a node needs a hand.
Acceptance
- Every moved module is pinned to its version under the source entry of the
workspace's
modules.yaml; thelocalentry keeps only what the workspace writes itself. - A clean clone of the workspace runs
suil installand gets every module inmodules/. - Every role resolves the same module order and the same
.runs/catalogue as before the move, and no module is forced.