K-S5, for the Helm chart (inbuxa-charts #16). Spec: docs/spec/features/store-seed.md.
The gap: a server reads only config.json plus a few env vars; everything else is in the registry. A declared install like the chart had no way to create the first objects: domain, administrator, blob store, coordinator, cluster roles. The lab did it by hand through bootstrap- and recovery-mode pods.
inbuxa --seed <PATH>
Boots like --upgrade-store (no listeners, no services), upgrades the layout, writes the first-start defaults, then runs the file and exits.
The file is a JMAP request body: the same methodCalls an admin would POST to /jmap. It runs through the normal request handler as the system administrator, so it gets the API's validation, password hashing and follow-up tasks (DKIM). Creation-id references ("domainId": "#d") work.
{"$file": "/path"} is replaced by that file's contents, so secrets stay in mounted Secrets and the seed can sit in a ConfigMap or in git.
Applies once, to a new store. A note in the store (key Ks) says started <sha256>, then applied <sha256>.
Exit codes: 0 applied (or applied before), 1 failed, 2 refused (the store was set up another way, or an earlier run stopped partway). Failures name the call and error type, never the values.
It also removes the startup race. With the defaults written by the seed run, the pods no longer start on an empty store. Before, every pod wrote the defaults at once, and front/mta lost ("Another process modified the record") and stayed unready until restarted.
Tested on kind (release-features build of this branch):
Fresh database, then the seed as a Job (inbuxa-k8s-lab lab/chart/seed.json, seed-job.yaml): Applied the seed: 6 calls, 8 objects created or updated.
Chart installed with all 5 pods at once: all ready within seconds, 0 restarts, 0 errors.
Mail test: SMTP on the load balancer's 25 → found over IMAPS 993 after 0.6 s. The seeded admin signs in over IMAPS.
Seed Job run again: This store was seeded before: nothing to do., exit 0.
Unit tests for $file and the response summary (4). fmt ok, cargo build -p inbuxa ok, no clippy warnings in the changed files.
Note: this branch carries the same one-line boxing as #449, identical, so they merge in either order.
Docs owed: a page on docs.inbuxa.org for --seed (install/), once this merges.
K-S5, for the Helm chart (inbuxa-charts #16). Spec: `docs/spec/features/store-seed.md`.
**The gap:** a server reads only `config.json` plus a few env vars; everything else is in the registry. A declared install like the chart had no way to create the first objects: domain, administrator, blob store, coordinator, cluster roles. The lab did it by hand through bootstrap- and recovery-mode pods.
**`inbuxa --seed <PATH>`**
- Boots like `--upgrade-store` (no listeners, no services), upgrades the layout, writes the first-start defaults, then runs the file and exits.
- The file is a JMAP request body: the same `methodCalls` an admin would POST to `/jmap`. It runs through the normal request handler as the system administrator, so it gets the API's validation, password hashing and follow-up tasks (DKIM). Creation-id references (`"domainId": "#d"`) work.
- `{"$file": "/path"}` is replaced by that file's contents, so secrets stay in mounted Secrets and the seed can sit in a ConfigMap or in git.
- Applies **once, to a new store**. A note in the store (key `Ks`) says `started <sha256>`, then `applied <sha256>`.
- Exit codes: 0 applied (or applied before), 1 failed, 2 refused (the store was set up another way, or an earlier run stopped partway). Failures name the call and error type, never the values.
**It also removes the startup race.** With the defaults written by the seed run, the pods no longer start on an empty store. Before, every pod wrote the defaults at once, and front/mta lost ("Another process modified the record") and stayed unready until restarted.
**Tested on kind** (release-features build of this branch):
- Fresh database, then the seed as a Job (inbuxa-k8s-lab `lab/chart/seed.json`, `seed-job.yaml`): `Applied the seed: 6 calls, 8 objects created or updated.`
- Chart installed with all 5 pods at once: all ready within seconds, 0 restarts, 0 errors.
- Mail test: SMTP on the load balancer's 25 → found over IMAPS 993 after 0.6 s. The seeded admin signs in over IMAPS.
- Seed Job run again: `This store was seeded before: nothing to do.`, exit 0.
- Unit tests for `$file` and the response summary (4). fmt ok, `cargo build -p inbuxa` ok, no clippy warnings in the changed files.
**Note:** this branch carries the same one-line boxing as #449, identical, so they merge in either order.
**Docs owed:** a page on docs.inbuxa.org for `--seed` (install/), once this merges.
jcoffey-dev
added this to the 27.1 milestone 2026-11-18 18:49:28 +00:00
A server reads only config.json and a few variables; everything else is
in the registry, set through the API. An install that's declared rather
than clicked through, such as the Helm chart, had no way to create the
first objects: the domain, administrator, blob store, coordinator and
cluster roles.
inbuxa --seed <PATH> boots as --upgrade-store does, upgrades the layout,
writes the first-start defaults, then runs the file as a JMAP request
body, as the system administrator, through the normal request handler:
the API's validation, password hashing and follow-up tasks, with
creation-id references between calls. {"$file": "<PATH>"} stands for
a file's contents, so secrets stay in mounted files.
It applies once, to a new store, and notes that in the store (key Ks).
Exit 0 when applied or applied before, 1 when it failed, 2 when the store
was set up another way or an earlier run stopped partway.
Spec: docs/spec/features/store-seed.md. Also carries the boxed
--upgrade-store future from #449, so main builds with every backend.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
K-S5, for the Helm chart (inbuxa-charts #16). Spec:
docs/spec/features/store-seed.md.The gap: a server reads only
config.jsonplus a few env vars; everything else is in the registry. A declared install like the chart had no way to create the first objects: domain, administrator, blob store, coordinator, cluster roles. The lab did it by hand through bootstrap- and recovery-mode pods.inbuxa --seed <PATH>--upgrade-store(no listeners, no services), upgrades the layout, writes the first-start defaults, then runs the file and exits.methodCallsan admin would POST to/jmap. It runs through the normal request handler as the system administrator, so it gets the API's validation, password hashing and follow-up tasks (DKIM). Creation-id references ("domainId": "#d") work.{"$file": "/path"}is replaced by that file's contents, so secrets stay in mounted Secrets and the seed can sit in a ConfigMap or in git.Ks) saysstarted <sha256>, thenapplied <sha256>.It also removes the startup race. With the defaults written by the seed run, the pods no longer start on an empty store. Before, every pod wrote the defaults at once, and front/mta lost ("Another process modified the record") and stayed unready until restarted.
Tested on kind (release-features build of this branch):
lab/chart/seed.json,seed-job.yaml):Applied the seed: 6 calls, 8 objects created or updated.This store was seeded before: nothing to do., exit 0.$fileand the response summary (4). fmt ok,cargo build -p inbuxaok, no clippy warnings in the changed files.Note: this branch carries the same one-line boxing as #449, identical, so they merge in either order.
Docs owed: a page on docs.inbuxa.org for
--seed(install/), once this merges.A server reads only config.json and a few variables; everything else is in the registry, set through the API. An install that's declared rather than clicked through, such as the Helm chart, had no way to create the first objects: the domain, administrator, blob store, coordinator and cluster roles. inbuxa --seed <PATH> boots as --upgrade-store does, upgrades the layout, writes the first-start defaults, then runs the file as a JMAP request body, as the system administrator, through the normal request handler: the API's validation, password hashing and follow-up tasks, with creation-id references between calls. {"$file": "<PATH>"} stands for a file's contents, so secrets stay in mounted files. It applies once, to a new store, and notes that in the store (key Ks). Exit 0 when applied or applied before, 1 when it failed, 2 when the store was set up another way or an earlier run stopped partway. Spec: docs/spec/features/store-seed.md. Also carries the boxed --upgrade-store future from #449, so main builds with every backend.5f6d3906b7to2ba0e6777a