swarmctl bao init: save bao's raw output before parsing, and accept null key lists
This commit is contained in:
parent
479cdd6efb
commit
870a0a6697
1 changed files with 395 additions and 73 deletions
|
|
@ -649,7 +649,7 @@ The forge creates a human's account on their first SSO login, and this fails unt
|
|||
|
||||
Walk through the first-run setup, interactively.
|
||||
|
||||
Run it as root, in a terminal. It checks `docs/1-getting-started/setup.md` first, so a rerun continues at the first open step, then takes the open steps one at a time. It prompts for what a step needs, shows a running action as one live line, and prints anything to record in colour under a ⚠️ warning, such as the secret store's keys and root token. It prints those once and stores none of them. A step that needs a service this host doesn't run names the deploy option to enable and the host to run `swarmctl setup` on. A step without a verb yet prints its command and waits until you confirm you ran it.
|
||||
Run it as root, in a terminal. It checks `docs/1-getting-started/setup.md` first, so a rerun continues at the first open step, then takes the open steps one at a time. It prompts for what a step needs, shows a running action as one live line, and prints anything to record in colour under a ⚠️ warning, such as the secret store's keys and root token. It prints those once; `bao init` also saves the raw output in a 0600 file, whose path it prints. A step that needs a service this host doesn't run names the deploy option to enable and the host to run `swarmctl setup` on. A step without a verb yet prints its command and waits until you confirm you ran it.
|
||||
|
||||
For scripts, use `setup status` and the individual verbs.
|
||||
|
||||
|
|
@ -690,7 +690,7 @@ Exits 0 when every step it can see has finished, and 1 otherwise, including when
|
|||
|
||||
Initialise the swarm's secret store and bootstrap its granter.
|
||||
|
||||
Runs the `bao` CLI against the store over HTTPS, so the store need not run on this host. The root token never reaches a file, an argument list or an environment variable of this process.
|
||||
Runs the `bao` CLI against the store over HTTPS, so the store need not run on this host. The root token never reaches an argument list or an environment variable of this process; `init` saves `bao`'s raw output, which holds it, to one 0600 file.
|
||||
|
||||
**Usage:** `swarmctl bao <COMMAND>`
|
||||
|
||||
|
|
@ -705,7 +705,7 @@ Runs the `bao` CLI against the store over HTTPS, so the store need not run on th
|
|||
|
||||
Initialise the store, printing its keys and the root token once.
|
||||
|
||||
Prints the unseal or recovery keys and the root token to stdout, once, and stores none of them: record them off this host before doing anything else. Refuses an initialised store.
|
||||
Prints the unseal or recovery keys and the root token to stdout, once: record them off this host before doing anything else. Before parsing, it saves `bao`'s raw output to `bao-init.json` in `$XDG_STATE_HOME/swarmctl` (else `~/.local/state/swarmctl`), mode 0600; on output it can't parse it prints the raw output and that path and exits non-zero. Delete the file with `shred -u` once you have recorded the keys. Refuses an initialised store, and refuses to run while the file exists.
|
||||
|
||||
**Usage:** `swarmctl bao init [OPTIONS]`
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue