Context
Split out from #108 ("Move desired apps from vault configuration to target
configuration") — a separate, follow-on feature, not required for that core
move to land. #108 has since merged (#110), so this is now unblocked.
Folds in the framing and scope guardrails from #107 ("Define Flightdeck as
a Capistrano-style deployment system"), closed as a duplicate of this issue.
Framing
Flightdeck is much closer to a Capistrano-style deployment system than to a
long-running scheduler/orchestrator such as Nomad or Kubernetes:
Flightdeck manages versioned deployments of containerized applications
and encrypted configuration artifacts to hosts.
The current model already looks like a release-based deployment system —
build a concrete release from versioned artifacts, place it under a release
directory, keep shared state separately, switch current to the new
release, retain previous releases for rollback/history. The release itself
is a composition of independently versioned inputs: app bundles (app_refs),
per-app vault/env bundles (apps.<name>.env_refs), and generated deployment
metadata. (Update: there's no separate "Flightdeck bundle" anymore as of
#111/#115 — the machinery-bundle concept it referred to was removed
entirely once there was nothing server-side left to ship in it.)
Proposal
The target's apps mapping (app name -> that app's own env_refs, as of
#114/#115 — was a flat list when this issue was written) should be written
into the generated release/deployment manifest.
This gives each release an explicit desired app set and allows
deployment-time comparison with the previous release:
previous: [a, b, c]
desired: [a, b]
removed: [c]
Apps removed from the target configuration can then be explicitly stopped
instead of being left running as orphaned applications.
The generated manifest remains release-scoped state rather than
introducing continuous reconciliation. It should also carry other useful,
non-secret deployment metadata: manifest/schema version, release
timestamp/identifier, target identifier, and the source refs (and their
resolved tags) for app bundles and each app's vault/env bundles. It must
never contain decrypted secrets or env values.
Architectural boundary
Keep Flightdeck deployment-time oriented rather than turning it into a
continuously running reconciler:
versioned release artifacts
↓
compose release
↓
generate release manifest / desired app state
↓
compare with previous release manifest
↓
apply transition from release N to N+1
↓
stop apps removed from desired state
Avoid expanding this into continuous scheduling/reconciliation, service
placement, health-based rescheduling, service discovery, or cluster
orchestration. Those belong to systems such as Nomad/Kubernetes and would
materially change Flightdeck's scope.
Depends on
#108 (merged via #110) — apps now lives on the target, not the vault,
which is what makes a per-release desired-state manifest coherent.
Context
Split out from #108 ("Move desired apps from vault configuration to target
configuration") — a separate, follow-on feature, not required for that core
move to land. #108 has since merged (#110), so this is now unblocked.
Folds in the framing and scope guardrails from #107 ("Define Flightdeck as
a Capistrano-style deployment system"), closed as a duplicate of this issue.
Framing
Flightdeck is much closer to a Capistrano-style deployment system than to a
long-running scheduler/orchestrator such as Nomad or Kubernetes:
The current model already looks like a release-based deployment system —
build a concrete release from versioned artifacts, place it under a release
directory, keep shared state separately, switch
currentto the newrelease, retain previous releases for rollback/history. The release itself
is a composition of independently versioned inputs: app bundles (
app_refs),per-app vault/env bundles (
apps.<name>.env_refs), and generated deploymentmetadata. (Update: there's no separate "Flightdeck bundle" anymore as of
#111/#115 — the machinery-bundle concept it referred to was removed
entirely once there was nothing server-side left to ship in it.)
Proposal
The target's
appsmapping (app name -> that app's ownenv_refs, as of#114/#115 — was a flat list when this issue was written) should be written
into the generated release/deployment manifest.
This gives each release an explicit desired app set and allows
deployment-time comparison with the previous release:
Apps removed from the target configuration can then be explicitly stopped
instead of being left running as orphaned applications.
The generated manifest remains release-scoped state rather than
introducing continuous reconciliation. It should also carry other useful,
non-secret deployment metadata: manifest/schema version, release
timestamp/identifier, target identifier, and the source refs (and their
resolved tags) for app bundles and each app's vault/env bundles. It must
never contain decrypted secrets or env values.
Architectural boundary
Keep Flightdeck deployment-time oriented rather than turning it into a
continuously running reconciler:
Avoid expanding this into continuous scheduling/reconciliation, service
placement, health-based rescheduling, service discovery, or cluster
orchestration. Those belong to systems such as Nomad/Kubernetes and would
materially change Flightdeck's scope.
Depends on
#108 (merged via #110) —
appsnow lives on the target, not the vault,which is what makes a per-release desired-state manifest coherent.