orchestrata_ultimate.promotion

Reference › orchestrata_ultimate › promotion

Deployment — what promote has to mean.

The promotion package makes promotion mean deployment. An environment moves along the pipeline dev, test, prod; each step is gated, and a promotion to a host environment pins a commit, puts it on a separate target checkout, restarts the services, proves the result, and records the sha. The curated narrative tells why the earlier receipt-only promotion was replaced.

The stage-gating layer is the promoter, with env_profile and promoter_targets. validate refuses a profile with missing keys, hosts on the wrong subnet or unreachable Redis and graph. test refuses prod, and runs the suite pinned to the environment. promote refuses when the previous stage has not passed; for prod it needs a passing test run of the exact commit being deployed and an explicit confirmation. The ledger of results is a JSON file.

The deployment engine is the runner over the stages_* modules, re-exported by stages: stages_resolve (refuses a dirty or unpushed commit, or unreachable infrastructure), stages_tree, stages_assets (refuses non-executable hooks), stages_units, stages_verify and stages_graphs. The first failing stage stops the run; a failure after the restart triggers a rollback to the previous sha. Shared plumbing is in stages_exec, stages_context and models.

Identity verification is a separate command-line tool and the last check of verify: identity with identity_core, identity_scope, identity_checks, identity_skips and identity_urls. projects and unit_deps are small helpers. Start with the promoter, then the runner.

Curated narrative

The hand-written story of this package: orchestrata_ultimate.promotion.

23 modules, 4,089 lines of code.

Modules

Module Summary LOC
__init__ Deployment — what promote has to mean. 40
env_profile Environment-profile helpers for scripts/promote_env.py. 146
identity Deployment identity verifier (U-T6). 325
identity_checks ExecStart/path extraction, judging and the c0/path-directive checks for identity_core.py (U-T6c). 295
identity_core Identity-check engine for promotion/identity.py (U-T6). 179
identity_scope Scope, identity records and discovery for identity_core.py (U-T6c). 326
identity_skips Unit-scope skip rules for identity.check_identity (U-VERIFY1). 87
identity_urls URL- and directive-value judging helpers for identity_core.py (U-T6b). 130
models Result types for a deployment. 103
projects Which directories in the workspace are PROJECTS, and which are worktrees. 89
promoter The stateful promoter — env_dir / ledger_path injected for testability. 358
promoter_targets Target-specific promotion bodies lifted out of Promoter (RUL-021 file budget). 119
runner Run the stages in order, roll back when verification fails. 285
stages The stages a deployment runs, in order, each idempotent and each provable. 100
stages_assets The assets/record-version stages: units + hooks onto the host, VERSION. 136
stages_context The context every promotion stage runs against. 48
stages_exec Subprocess plumbing every promotion stage runs through. 203
stages_graphs The graphs/ingest stages: bootstrap schema, ingest every workspace project. 208
stages_resolve The resolve/infra stages: pin the commit, probe declared endpoints. 206
stages_tree The tree/deps stages: advance the target checkout, sync dependencies. 126
stages_units The daemon-unit discovery + services stage. 294
stages_verify The verify stage: prove the deployment serves, or fail so the caller can roll back. 247
unit_deps Requires=/BindsTo= dependency-name parsing for promote's services stage. 39

Dependency diagram

Package dependency diagram orchestrata_ultimate.promotion