Skip to content

epic: NetScript enterprise deployment framework (cloud-agnostic + bare-metal, CLI + Aspire) #327

Description

@rickylabs

NetScript Enterprise Deployment Framework

Turn NetScript into an enterprise-grade, cloud-agnostic AND bare-metal-compatible deployment framework, with first-class support through BOTH the CLI and Aspire. NetScript is Deno-native, so Deno deployment targets (especially the new Deno Deploy) are first-class strategic surface. The whole design is grounded on Aspire's publish/deploy model.

This is a child epic of the Road-to-0.0.1-stable umbrella and must not block it — it links in as a child once filed.

Research corpus (77 cached sources), the full architecture spec, the SERVY assessment, and the decision/gap tracker were produced under the harness run epic-deployment-aggregation (branch research/deployment-aggregation). This issue embeds the load-bearing conclusions inline.


How NetScript maps onto Aspire's deploy model

  • Two-command spine: aspire publish emits static artifacts (compose/Helm/Bicep) for review/GitOps; aspire deploy resolves params + applies. NetScript's CLI wraps both for cloud targets and drives bare-metal directly.
  • Compute-environment (compose / k8s / AKS / ACA / App Service) is orthogonal to Aspire-environment (dev/staging/prod).
  • Pipelines are step-graphs (AddStep / WithPipelineStepFactory, replacing the deprecated WithPublishingCallback). The TypeScript AppHost drives the full container/cloud lane todayaddContainer('denoland/deno:2')/addDockerfile, addDockerComposeEnvironment/addKubernetesEnvironment/addAzureContainerAppEnvironment, per-resource publishAsDockerComposeService/publishAsKubernetesService/publishAsAzureContainerApp callbacks, and app-level pipeline.addStep(...) are all TS-expressible (verified via the ?aspire-lang=typescript doc tab). The only genuinely C#-only capability is authoring brand-new custom resource types, which NetScript's container lane does not need.
  • Deno app publish shape is realized with the built-in TS container primitives above (PublishAsNodeServer is Node-runtime-specific and won't run Deno). The ada2a5 AddDenoApp + denoland/deno:2 single-stage publish + OTEL_DENO is optional DX sugar on top, not a prerequisite.
  • Deployment state is cached/idempotent (~/.aspire/deployments/{sha}/{env}.json); CI/CD is two-layer (outer GH-Actions/AzDO pipeline invokes the inner Aspire step-graph non-interactively).

CLI surface (generalized beyond today's Windows-only tree)

  • Evolve config deploy.windows.*deploy.targets.* (multi-target).
  • netscript deploy <target> <verb> router: cloud targets wrap aspire publish/aspire deploy; bare-metal targets drive an OsServicePort directly.

Bare-metal successor (SERVY verdict: MODERNIZE)

SERVY upstream (aelassas/servy, C#/MIT, v8.5) is healthy — the rot is entirely NetScript-side (Windows-locked, doc/code divergence, no rollback/multi-instance, weak secrets, fake-only tests, dead docker/script config, deno:2.5 pin). Reuse the sound ProcessPort/WindowsServicePort seam and generalize WindowsServicePortOsServicePort with servy (Windows) + systemd (Linux) adapters, on a deno compile single-binary artifact, adding rollback / multi-instance / secrets / OTEL / health-gate.


Per-target readiness & tier proposal

Target Model Driven via First-party Deno Proposed tier
Deno Deploy (new platform) deno-native source build CLI → deno deploy / GitHub-push Yes (first-party) 1 (beta)
deno compile bare-metal (Linux/Windows) single binary + systemd/servy CLI → OsServicePort Yes (deno-native) 1 (beta)
Docker / Compose (self-host) image + compose CLI → aspire publish/deploy (TS AppHost) TS addContainer/publishAsDockerComposeService (ada2a5 = optional DX) 1 (beta)
Kubernetes generated manifests/Helm CLI → aspire publish (TS AppHost) TS addKubernetesEnvironment/publishAsKubernetesService (ada2a5 = optional DX) 2 (stable)
Azure ACA / App Service / AKS Aspire compute-env CLI → aspire deploy (TS AppHost) TS addAzureContainerAppEnvironment/publishAsAzureContainerApp (ada2a5 = optional DX) 2 (stable)
GCP Cloud Run / Koyeb / DigitalOcean / Render Docker image / droplet CLI emits; provider CLI Docker path (no native) 2 (stable)
Sevalla / Dokploy / Coolify Docker / self-host compose CLI emits compose no native Deno 3 (track)
Vercel / Cloudflare / AWS Lambda unofficial runtime / isolate / container RFC-14 Nitro unified-mode not first-party 3 (track)

Watch-item verdicts

  • deno compile single-binary — ADOPT NOW (mature 5-triple cross-compile, asset embedding; the bare-metal artifact).
  • deno desktop — TRACK (v2.9 VFS + Deno.autoUpdate; but code signing/notarization not automated).
  • Pulumi #3838 (Deno provider, 0.140) — TRACK (0.140 milestone = intent, not shipped; real blocker is gRPC-server-in-Deno, npm:@grpc/grpc-js support for server-side denoland/deno#23714).
  • Nitro deno_server preset — TRACK (still needs --unstable; central to RFC-14 unified-mode).
  • RFC-14 unified-mode — PRODUCT DECISION (Nitro v3 + oRPC + Fresh 2, mode-parity, sagas excluded, ~3-5 months) — see open decisions.

Critical path (corrected 2026-07-03)

There is no upstream hard dependency on the critical path. The earlier "the Aspire container/cloud lane is gated on the ada2a5 AddDenoApp seam because custom publish steps are C#-only" finding was an artifact of reading only the default C# doc tab and is substantially false — re-verifying the ?aspire-lang=typescript tab shows the TS AppHost drives the whole container lane today (evidence: sources/aspire/*--ts-tab.md). Phases 0-3 (config contract, bare-metal successor, Deno Deploy adapter, AND the Aspire container lane) all have no upstream blocker and can proceed in parallel. ada2a5 AddDenoApp becomes an optional DX enhancement to fold in later (TRACK). The only capability that remains C#-only — authoring brand-new custom resource types — is not needed by this lane.


Product decisions — RESOLVED (2026-07-03, delegated to epic supervisor)

The user delegated all six with a prioritize-don't-ship-everything mandate. These are calls, not questions; all reversible.

# Decision Verdict Milestone
D1 RFC-14 unified-mode (tier-3 serverless via Nitro) WATCH / separate track — not v1. 3-5mo, distinct arch, excludes sagas, --unstable Nitro preset; Aspire+Deno Deploy already give a strong cloud story without it. deferred (watch)
D2 Flagship one-click Deno Deploy = beta marquee (deno-native, no Dockerfile, shortest path, Deno-team play); Aspire Docker/Compose ships alongside in beta as the cloud-agnostic proof; k8s/Azure = stable. 0.0.1-beta
D3 Bare-metal hardening line v1 = systemd + deno compile + atomic rollback + health-gated activation + OTEL_DENO + restricted-perm env-file secrets. Defer multi-instance/HA + external secret store to stable. beta / stable split
D4 deno compile signing Accept manual/documented for v1; do not block. Cross-platform signing is platform-specific scope; add a pipeline hook now, automate at stable. beta (doc) / stable (auto)
D5 deploy.windows.* migration CLEAN BREAK to deploy.targets.* — no back-compat alias (user override 2026-07-03: "we're alpha, breaking changes are allowed, go production-grade directly"). Windows lane re-keyed to deploy.targets.windows + one-line migration note. 0.0.1-beta
D6 Pulumi IaC adapter PURE WATCH — not a planned lane. #3838 is OPEN + blocked (gRPC-server-in-Deno denoland/deno#23714 unshipped); Aspire already covers IaC (Bicep/Helm/compose). deferred (watch)

Strategic plays (informational, not blocking): Deno Deploy first-class support = Deno-team play (D2 marquee); ada2a5 AddDenoApp = Aspire-team play (folded into the Aspire lane as optional DX when it lands). No NEEDS USER: items — all six decided (D5 now a user-overridden clean break); D2 positioning is the most product-facing and cheaply revisitable.

Priority ordering

0.0.1-beta (tier-1): deploy.targets.* contract (clean break, no windows alias) · deployment doctrine archetype · OsServicePort+SystemdAdapter+deno compile+rollback+health-gate+OTEL+basic secrets · Deno Deploy adapter (marquee) · Aspire Docker/Compose via TS AppHost · docs/code divergence fix.
0.0.1-stable (tier-2): k8s + Azure via TS AppHost · Docker-image providers (Cloud Run/Koyeb/Render/DigitalOcean) · CI/CD template gen + state/secret hardening · bare-metal HA + external secret store + signing automation · one-click convergence + release-skill.
Watch (deliberately not v1): RFC-14 unified-mode + Nitro preset (D1) · tier-3 serverless (Vercel/CF/Lambda) · Pulumi #3838 (D6) · exotic self-host (Sevalla/Dokploy/Coolify — generic compose emit) · ada2a5 AddDenoApp (optional DX fold-in) · deno desktop (reference only).


Sub-issue slices (filed 2026-07-03 — [Deploy-Sx], grouped by phase)

0.0.1-beta.1 (tier-1):

0.0.1-stable (tier-2):

Backlog / Triage (watch — deliberately not v1):


TIER-4 — Desktop / single-process / offline-first (NEW — milestone 0.0.1-beta.8 core, 0.0.1-stable hardening; low priority; ships FULLY as one tier — no single-process-early / desktop-later split)

NetScript apps shippable to end-user devices as a 1-click, offline-first desktop package, running the backend in-process (true single-process) rather than as separate loopback processes. Grounded in the completed eis-chat deno desktop spike (docs/DESKTOP-SHELL.md, option (b) shipped in prod → option (c) true single-process target). This reclassifies desktop out of the earlier deno desktop — TRACK watch-item posture into a first-class Tier-4.

Precursor (must land before beta.8):

beta.8 core (ship together):

stable (hardening + gate):

Naming hygiene: #349 (RFC-14 tier-3 serverless + Nitro deno_server) remains a WATCH sibling here — it is a different "unified" sense (serverless bundling), not merged into the desktop single-process scope. See #371/#372 for the KV-layer "unified" sense (already solved).


The full phased execution plan (per-phase goals, deliverables, DAG, acceptance gates) is in the pinned PLAN comment below.


Grounded on 77 cached sources (Aspire deployment suite, Deno Deploy/sandbox, 10 providers, watch items, netscript-start POC). Full spec: deployment-architecture-spec.md; SERVY assessment: servy-assessment.md; decision/gap tracker: decision-gap-tracker.md — harness run epic-deployment-aggregation.

RFC #820 restructure (owner-ratified 2026-07-17 — PR #822)

Option-A addendum (2026-07-17)

Windows hybrid tier (owner-directed 2026-07-17)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions