Rename mesh-control -> mesh-controller, substrate -> foundation
One name per thing, per the HQ glossary: the module/container/image/binary/repo becomes mesh-controller, the seat the-controller, and the store+broker pair the foundation (embedded base bundles, default template and example lock renamed with their go:embed directives). No behaviour change — a pure vocabulary rename. Claude-Session: https://claude.ai/code/session_01D6qtiYU3P9jk3pnAXyAFyx
This commit is contained in:
@@ -111,7 +111,7 @@ func failed(step Step, err error) error {
|
||||
|
||||
// Options are the things that differ between machines.
|
||||
type Options struct {
|
||||
// Template is the substrate bundle this machine's own bundle is made from.
|
||||
// Template is the foundation bundle this machine's own bundle is made from.
|
||||
Template string
|
||||
// Out is where the produced bundle is written, so a person can read what was applied.
|
||||
Out string
|
||||
@@ -128,12 +128,12 @@ type Options struct {
|
||||
// runtime, a control plane opening its stores.
|
||||
Wait time.Duration
|
||||
|
||||
// Node is the name this machine is known by in the mesh. Everything after the substrate names
|
||||
// Node is the name this machine is known by in the mesh. Everything after the foundation names
|
||||
// it: the record, the token, the assignment, the push.
|
||||
Node string
|
||||
|
||||
// Catalogue is a checkout of the mesh's catalogue repository, which is where the registry's and
|
||||
// the control plane's manifests are read from. Empty stops the installer after the substrate:
|
||||
// the control plane's manifests are read from. Empty stops the installer after the foundation:
|
||||
// there is no pivot without manifests, and pretending otherwise would leave a machine that
|
||||
// looks installed and cannot upgrade itself.
|
||||
Catalogue string
|
||||
@@ -181,7 +181,7 @@ type Options struct {
|
||||
Extras []string
|
||||
}
|
||||
|
||||
// pivots reports whether this run goes past the substrate.
|
||||
// pivots reports whether this run goes past the foundation.
|
||||
func (o Options) pivots() bool { return strings.TrimSpace(o.Catalogue) != "" }
|
||||
|
||||
// Deps are the ways this program reaches outside itself. Injected so the whole of it can be
|
||||
@@ -245,11 +245,11 @@ type Result struct {
|
||||
Applied int `json:"applied,omitempty"`
|
||||
Changed bool `json:"changed,omitempty"`
|
||||
|
||||
// Running is the substrate's containers, confirmed up.
|
||||
// Running is the foundation's containers, confirmed up.
|
||||
Running []string `json:"running,omitempty"`
|
||||
// Answered is what the temporary control plane said back — not merely that it is up.
|
||||
Answered string `json:"temporary-control-plane,omitempty"`
|
||||
// Temporary is what the substrate's control plane is called, which is not what the module's is.
|
||||
// Temporary is what the foundation's control plane is called, which is not what the module's is.
|
||||
Temporary string `json:"temporary-container,omitempty"`
|
||||
|
||||
// Node is this machine's name in the mesh, and how it came to be enrolled and heard from.
|
||||
@@ -289,15 +289,15 @@ type Result struct {
|
||||
// answer to it is to run this again: re-running is the retry, and it is one a person chooses after
|
||||
// reading which step failed and why.
|
||||
//
|
||||
// **Genesis is a pivot** (novox/hq ADR 0067). Steps 1 to 5 raise a substrate whose control plane is
|
||||
// **Genesis is a pivot** (novox/hq ADR 0067). Steps 1 to 5 raise a foundation whose control plane is
|
||||
// named by the digest of its own configuration, because nothing has ever served that image and
|
||||
// nothing could have. Steps 6 to 10 turn that into a mesh that can maintain itself: this machine
|
||||
// enrols, the registry module is installed, the carried image is pushed INTO that registry — which
|
||||
// gives it a manifest digest, its first — and the control plane is reinstalled as an ordinary
|
||||
// module pinned to it. The temporary one is then dropped from the bundle and the host removes it.
|
||||
//
|
||||
// **What makes the last part expressible is a name.** The substrate's control plane is called
|
||||
// `temp-mesh-control` and the module's is called `mesh-control`. Two containers, two owners:
|
||||
// **What makes the last part expressible is a name.** The foundation's control plane is called
|
||||
// `temp-mesh-controller` and the module's is called `mesh-controller`. Two containers, two owners:
|
||||
// nothing is handed over, nothing has to stop being owned without being destroyed, and destruction
|
||||
// by omission is the right end for something named "temp".
|
||||
//
|
||||
@@ -309,7 +309,7 @@ type Result struct {
|
||||
// be fixed remotely — so no step may leave one:
|
||||
//
|
||||
// 1–3 nothing on the machine but a written file. Re-run: the bundle is produced again.
|
||||
// 4 a partly-raised substrate, recorded in the state file. Re-run: apply converges the rest.
|
||||
// 4 a partly-raised foundation, recorded in the state file. Re-run: apply converges the rest.
|
||||
// 5 everything up; something did not answer yet. Re-run: it is asked again.
|
||||
// 6 a node record and possibly a spent token. Re-run: `node list` finds the record, the
|
||||
// identity file says whether this machine enrolled, and a fresh token is issued if not.
|
||||
@@ -458,7 +458,7 @@ func Run(ctx context.Context, o Options, d Deps, say func(string)) (Result, erro
|
||||
o.Out, rewritten.Resources))
|
||||
|
||||
// ---- 4. apply -----------------------------------------------------------------------
|
||||
say("apply — raising the substrate")
|
||||
say("apply — raising the foundation")
|
||||
report, err := ApplyBundle(ctx, o, sys, rewritten.Declaration, d.Run, say)
|
||||
result.Applied, result.Changed = len(report.Outcomes), report.Changed()
|
||||
if err != nil {
|
||||
@@ -472,7 +472,7 @@ func Run(ctx context.Context, o Options, d Deps, say func(string)) (Result, erro
|
||||
}
|
||||
|
||||
// ---- 5. verify ----------------------------------------------------------------------
|
||||
say("verify — the substrate is up, and the control plane replies")
|
||||
say("verify — the foundation is up, and the control plane replies")
|
||||
verified, err := Verify(ctx, rewritten.Declaration, d.Run, o.Timeout, o.Wait, say)
|
||||
result.Running, result.Answered = verified.Running, verified.Answered
|
||||
if err != nil {
|
||||
@@ -484,7 +484,7 @@ func Run(ctx context.Context, o Options, d Deps, say func(string)) (Result, erro
|
||||
// control plane is named by an image id, which no registry serves, so nothing can ever
|
||||
// replace it with a newer one. That is the whole of what the pivot fixes, and it needs
|
||||
// manifests, and manifests come from a checkout somebody has to point this at.
|
||||
result.Stopped = "no --catalog was given, so this stopped at the substrate. " +
|
||||
result.Stopped = "no --catalog was given, so this stopped at the foundation. " +
|
||||
"The control plane is named by the digest of its own configuration and no registry " +
|
||||
"serves it, so this mesh cannot yet upgrade itself. Run again with " +
|
||||
"--catalog <a checkout of the mesh's catalogue> to finish the pivot; every step " +
|
||||
@@ -497,7 +497,7 @@ func Run(ctx context.Context, o Options, d Deps, say func(string)) (Result, erro
|
||||
// ---- 6. enrol -------------------------------------------------------------------------
|
||||
//
|
||||
// From here on the mesh is being told things, and the way to tell it anything is to run its
|
||||
// own binary inside its own container. `temporary` is the substrate's control plane; the
|
||||
// own binary inside its own container. `temporary` is the foundation's control plane; the
|
||||
// module's is a different container with a different name and does not exist yet.
|
||||
temporary := controlPlane{container: rewritten.TempName, run: d.Run, timeout: o.Timeout}
|
||||
|
||||
@@ -588,9 +588,9 @@ func Run(ctx context.Context, o Options, d Deps, say func(string)) (Result, erro
|
||||
}
|
||||
|
||||
// ---- 14. store ------------------------------------------------------------------------
|
||||
// A database PROVIDER. The substrate's store is the control plane's own memory and offers
|
||||
// A database PROVIDER. The foundation's store is the control plane's own memory and offers
|
||||
// nothing to anything; the first thing that wants a database is the catalogue, next.
|
||||
say("store — a database provider, which the substrate's own store is not")
|
||||
say("store — a database provider, which the foundation's own store is not")
|
||||
if err := InstallFromCatalogue(ctx, o, permanentControl, "postgres", say); err != nil {
|
||||
return result, failed(StepStore, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user