Rebuild the cluster from files
Install once in the console or the TUI, keep the files, and rebuild unattended later. A rebuild gives a new cluster: a new cluster id, new secrets and new node ids (a first node keeps its id if you pin it, below). It restores the cluster’s shape, not its data: no instances, volumes, images, users or keys come back. Decide that before you wipe anything.
Keep the files
Section titled “Keep the files”Do this once per node, after the install works. Keep the files off the cluster they describe: they hold secrets, so treat them like passwords.
| File | What it is | How to keep it |
|---|---|---|
install.yaml |
Stage 1: disks, NIC, host name, root, kind | stratum-installer stage1 export on the node |
node.yaml (first node) |
Stage 2: networks, service addresses, region, admin, storage | stratum-installer config get --yaml, or stratumctl admin nodes config |
| Assignment (each joiner) | The role, rack, links and disks the first node gave it | stratumctl admin nodes joins export |
A joiner’s node.yaml is built from its assignment at approval: there is
nothing else to keep for it.
install.yaml, from each node
Section titled “install.yaml, from each node”Each node keeps a record of its install at /etc/stratum/installer/install.yaml.
It has the root password hash and the join code replaced by <redacted>. The
export turns it back into a file the installer loads:
# on the nodestratum-installer stage1 export --out install.yamlstratum-installer stage1 export --root-hash-file root.hash --out install.yaml- Root.
--root-hash-filenames a file holding the crypt hash (for example frommkpasswd -m yescrypt). Without it the hash is left out and root signs in with the SSH keys the record keeps. The export fails if the record keeps none. - Wipe. The file has
wipe_other_disks: trueandwipe_confirmfor the OS disks, which hold the previous install and would otherwise be refused as “holds data”. Running it erases those disks. The record’s ownwipe_extraandwipe_confirmare replaced by this. - Resolved values. Disks are the literal
/dev/disk/by-idpaths. A host-name template,nic.matchanddisk_selectappear as the install resolved them, so the file names this machine, not a fleet. - A joiner needs
--join-endpointand--join-code. The stored code is redacted, and a code needs a live cluster, so a code cannot be kept in a file. Export with any well-formed code (XXXX-XXXX-XXX) and put the new cluster’s in at rebuild time. - For a node whose release has no
stage1 export, copy its record off and run the export anywhere with--from-record. - The output is checked by the validation the installer runs at boot.
--outwrites the file readable by its owner only.
node.yaml, from the first node
Section titled “node.yaml, from the first node”- During the install, or within 5 minutes after it, on the node:
stratum-installer config get --yamlprints the exactnode.yamlthe install wrote, secrets included. It needs the install code and the installer’s address, like everystratum-installercommand (Stage 2). After those 5 minutes the install service stops. - Any time later:
stratumctl admin nodes config <node-id> --out node.yaml. Every secret in it reads<redacted>: the admin password, registry pull credentials, the operator webhook, the release-mirror token, a join token. The loader refuses a secret that still reads<redacted>and names the key, so an unfilled file is never applied by accident. Replace each with a real value, or delete the key. The download carries the node’sidentity.node_id.
The assignment, from each joiner
Section titled “The assignment, from each joiner”stratumctl admin nodes joins list # the join id of each nodestratumctl admin nodes joins export nj-8w2k4m1p > node-2.yamlIt prints the assignment as YAML (--output json for JSON), without the keys the
cluster adds to the record, so joins approve -f node-2.yaml loads it. A join
that has no assignment yet (pending or rejected) has nothing to export. Links keep
their addresses, which must be free in the new cluster’s networks. They are the
same networks if the first node’s node.yaml is. See
joins export.
What a rebuild needs
Section titled “What a rebuild needs”- The first node’s
install.yaml(kind: new-cluster) and itsnode.yaml(modeha-init) with the secrets filled in, placed for the unattended install. Thenode.yamlmode must match theinstall.yamlkind. - Every joiner’s
install.yamland exported assignment. - The ISO of the release you rebuild on, and the same hardware: disk ids and NIC names are literal.
- A written decision on the data: it is gone.
Rebuild
Section titled “Rebuild”-
Wipe all nodes by installing each from its
install.yaml: the OS disks and every other disk that holds data are erased. Do the first node first, with itsnode.yamlbeside the file; its stage 2 runs by itself. -
Wait for the first node to be READY (
stratumctl admin readiness), then create a join code:Terminal window stratumctl admin nodes join-code create --ttl 24hA code is reusable until it expires, up to 7 days, so one serves every joiner.
-
Install each joiner. In its
install.yaml, setjoin.code(andjoin.endpointif the API address changed) to the new values, then install. -
Approve each joiner with its own assignment, by the serial it registered with:
Terminal window stratumctl admin nodes joins approve --serial SN0002 -f node-2.yamlJoins run one at a time, while the cluster is green (approve).
-
Revoke the code (
stratumctl admin nodes join-code revoke <id>) and run the verify checklist. Then set up Ceph again and restore data on the new cluster.
What differs from the old cluster: the cluster id, every secret (OpenBao,
Postgres, the admin password if you did not set it), certificates, and each
joiner’s node id. A first node whose identity.node_id is kept in node.yaml
keeps its id; an id is n- followed by 8 lowercase letters or digits. Anything
that pinned the old cluster id or a node id (a Terraform state, saved API tokens,
stratumctl profiles) needs updating.
