Skip to content

feat(infrastructure): add guided Azure deployment wizard - #197

Open
weastler wants to merge 3 commits into
weastler-azure-deployment-foundationsfrom
weastler-azure-deployment-wizard
Open

weastler wants to merge 3 commits into
weastler-azure-deployment-foundationsfrom
weastler-azure-deployment-wizard

Conversation

@weastler

@weastler weastler commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Why

Operators need a guided way to install and update Hub without losing saved answers, bypassing maintenance safeguards, or guessing whether a failed deployment completed. This PR builds on #196 and keeps the deployment engine and terminal interface together as one runnable flow. The reusable design gallery follows in a separate PR.

What changes

npm run setup:server opens an Azure wizard with searchable target choices, adjacent field errors, private resumable drafts, and full-screen or accessible inline presentation. It coordinates protected state, image publication, temporary database provisioning, and the existing serialized release. Failed builds can retry with a corrected npm proxy; failed Terraform steps require a fresh plan and approval. Operational-lock recovery and Hub shutdown each require explicit safety checks and fresh consent.

Completion restores the shell and prints the service URL, immutable image, saved configuration, and verified Azure resource links. Local diagnostics omit answers, credentials, command output, and consent. The welcome retains the GitHub Replica label. HTTP readiness does not verify authorization; optional Hub sign-in still requires manual configuration. No authentication setup or Hub product behavior changes here.

These final synthetic examples use the real Ink presentation components with fabricated cloud data. They are design references, not deployment, sign-in or recovery evidence. The receipt is split into two views so all resource links and manual sign-in guidance remain visible.

Welcome and cloud selection — synthetic — 112 columns × 38 rows

Field validation error — synthetic — 112 columns × 38 rows

Guarded Hub downtime consent — synthetic — 112 columns × 44 rows

Separate operational lock-clearing consent — synthetic — 112 columns × 44 rows

Deployment receipt and primary resources — synthetic — 112 columns × 36 rows

Remaining resource links and manual sign-in guidance — synthetic — 112 columns × 28 rows

A live Azure deployment and recovery exercise remain unverified; local and synthetic evidence do not establish cloud behavior.

@weastler
weastler requested review from a team and nshki as code owners November 6, 2026 18:25
Copilot AI auto review requested due to automatic review settings November 6, 2026 18:25
@weastler

weastler commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Final synthetic terminal presentation examples, regenerated from the gallery on top of this wizard revision. These are real Ink components with fabricated cloud data, not evidence of deployment, sign-in, or lock recovery. Each image label records its terminal viewport in columns × rows. The receipt is split into two views so all resource links and manual sign-in guidance remain visible.

Welcome and cloud selection — synthetic — 112 columns × 38 rows

Field validation error — synthetic — 112 columns × 38 rows

Guarded Hub downtime consent — synthetic — 112 columns × 44 rows

Separate operational lock-clearing consent — synthetic — 112 columns × 44 rows

Deployment receipt and primary resources — synthetic — 112 columns × 36 rows

Remaining resource links and manual sign-in guidance — synthetic — 112 columns × 28 rows

@weastler
weastler added this pull request to stack #199 November 6, 2026 18:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved critical issues allow unattended removal of network restrictions on sensitive Terraform state, cross-subscription deployment input collisions, and loss of operator settings that can leave installations offline.

11 open issues
1 file not reviewed
  • infrastructure/package-lock.json: Generated file
What changed in this PR

Adds npm run setup:server, a guided Azure installation and update wizard connecting terminal configuration to Hub’s existing Terraform and serialized release tooling.

Changes:

  • Adds searchable prompts, adjacent validation, full-screen or inline presentation, and private resumable drafts.
  • Coordinates Azure provisioning, image publication, database setup, deployment approvals, and recovery.
  • Adds local diagnostics, deployment reports, automated coverage, and installer CI checks.

This pull request requires changes. Unresolved critical and moderate findings block approval. Live Azure deployment and recovery remain unverified, and refreshed terminal screenshots are pending.

File Description
scripts/​tsconfig.json Narrows infrastructure type-checking scope.
package.json Adds the root setup:server command.
infrastructure/​vitest.config.ts Configures installer and orchestration tests.
infrastructure/​tsconfig.json Configures installer TypeScript and JSX checking.
infrastructure/​terraform/​index.ts Adds Terraform planning, approvals, change guards, and retry.
infrastructure/​package.json Defines installer commands and dependencies.
infrastructure/​installer/​write-private-json/​index.ts Writes private JSON files atomically.
infrastructure/​installer/​wizard/​session.test.ts Tests questionnaire resumption and recovery acknowledgement.
infrastructure/​installer/​wizard/​index.ts Connects drafts, configuration, deployment, and completion.
infrastructure/​installer/​types.ts Defines configuration, command, phase, and UI contracts.
infrastructure/​installer/​terminal/​welcome/​index.tsx Adds responsive GitHub Replica welcome art.
infrastructure/​installer/​terminal/​view.ts Models terminal questions and presentation state.
infrastructure/​installer/​terminal/​theme/​index.ts Centralizes terminal colors and styling.
infrastructure/​installer/​terminal/​shell/​index.tsx Arranges responsive prompts, notices, progress, and activity.
infrastructure/​installer/​terminal/​scroll-panel/​index.tsx Adds scrolling for constrained terminal viewports.
infrastructure/​installer/​terminal/​scroll-panel/​index.test.tsx Tests input and feedback visibility in short viewports.
infrastructure/​installer/​terminal/​progress/​index.tsx Displays deployment stages and blocked/completed states.
infrastructure/​installer/​terminal/​progress/​index.test.tsx Tests progress indicators and configure-only routing.
infrastructure/​installer/​terminal/​index.tsx Bridges asynchronous prompts and terminal lifecycle management.
infrastructure/​installer/​terminal/​index.test.tsx Tests interaction, notices, cancellation, resizing, and restoration.
infrastructure/​installer/​terminal/​field/​index.tsx Renders editable fields with adjacent validation feedback.
infrastructure/​installer/​terminal/​field/​index.test.tsx Tests corrections, rejected input, and parser errors.
infrastructure/​installer/​terminal/​elapsed/​index.tsx Displays monotonic elapsed time.
infrastructure/​installer/​terminal/​elapsed/​index.test.tsx Tests timing continuity and interval cleanup.
infrastructure/​installer/​telemetry/​index.ts Records private, allowlisted local diagnostic events.
infrastructure/​installer/​session/​lock/​index.ts Adds local writer ownership and stale-lock recovery.
infrastructure/​installer/​session/​index.ts Validates and persists resumable draft sessions.
infrastructure/​installer/​session/​index.test.ts Tests persistence, ownership, isolation, and recovery.
infrastructure/​installer/​search-select/​index.tsx Adds searchable, keyboard-operated choices.
infrastructure/​installer/​search-select/​index.test.tsx Tests filtering, scrolling, and selection behavior.
infrastructure/​installer/​prompt-for-recovery/​index.ts Provides retry, details, and exit choices.
infrastructure/​installer/​prompt-for-field/​index.ts Shares field validation across terminal interfaces.
infrastructure/​installer/​prompt-for-field/​index.test.ts Tests parser failures and sensitive-input rejection.
infrastructure/​installer/​index.tsx Adds interactive and automated entry points, cancellation, and cleanup.
infrastructure/​installer/​deployment-summary/​index.ts Formats deployment results and Azure resource links.
infrastructure/​installer/​deployment-summary/​index.test.ts Tests report contents, link encoding, and field exclusions.
infrastructure/​installer/​config/​index.ts Parses, loads, and saves reusable deployment configuration.
infrastructure/​installer/​config/​index.test.ts Tests validation and private atomic persistence.
infrastructure/​installer/​config/​fields/​index.ts Defines shared field constraints and editing feedback.
infrastructure/​installer/​command/​index.ts Adds command execution, cancellation, and output limits.
infrastructure/​installer/​command/​index.test.ts Tests execution, diagnostics, and output handling.
infrastructure/​installer/​command/​describe/​index.test.ts Tests static release-operation labels.
infrastructure/​installer/​command/​cancel.test.ts Tests cancellation before and during execution.
infrastructure/​installer/​cloud-picker/​index.tsx Offers Azure while marking AWS unavailable.
infrastructure/​installer/​cloud-picker/​index.test.tsx Tests supported cloud selection.
infrastructure/​installation.example.json Provides a non-secret deployment configuration example.
infrastructure/​azure/​install/​types.ts Defines Azure orchestration, recovery, and result contracts.
infrastructure/​azure/​install/​settings.ts Derives installation-owned Azure resource names.
infrastructure/​azure/​install/​secrets/​index.ts Creates or reuses Key Vault credentials and completion markers.
infrastructure/​azure/​install/​result/​index.ts Validates final deployment metadata.
infrastructure/​azure/​install/​result/​index.test.ts Tests metadata validation and approved result fields.
infrastructure/​azure/​install/​provision/​index.ts Coordinates temporary database provisioning and cleanup.
infrastructure/​azure/​install/​preflight/​index.ts Checks prerequisites and Azure deployment identity.
infrastructure/​azure/​install/​preflight/​index.test.ts Tests Terraform compatibility and subscription filtering.
infrastructure/​azure/​install/​lease/​recover/​index.ts Adds safety checks and consent for lease recovery and shutdown.
infrastructure/​azure/​install/​lease/​inspect/​index.ts Inspects ownership, state locks, jobs, and Hub activity.
infrastructure/​azure/​install/​lease/​index.ts Acquires, releases, and reports operational leases.
infrastructure/​azure/​install/​index.ts Coordinates Azure installation and maintenance releases.
infrastructure/​azure/​install/​image/​index.ts Publishes immutable images with targeted recovery options.
infrastructure/​azure/​install/​group/​index.ts Verifies installation resource-group ownership.
infrastructure/​azure/​install/​configure/​index.ts Discovers authorized Azure targets and collects configuration.
infrastructure/​azure/​install/​backend/​index.ts Prepares Terraform state storage, access settings, and backend files.
infrastructure/​azure/​install/​backend/​index.test.ts Tests backend ownership and access safeguards.
infrastructure/​.npmrc Applies the dependency release-age policy.
docs/​README.md Links the installer terminal-design guide.
.github/​workflows/​hub-infrastructure.yml Adds installer type-check and test jobs.

Review effort: Max (auto)

Comment thread infrastructure/azure/install/index.ts Resolved
Comment thread infrastructure/azure/install/index.ts Resolved
Comment thread infrastructure/azure/install/index.ts Resolved
Comment thread infrastructure/installer/index.tsx Resolved
Comment thread infrastructure/installer/index.tsx Resolved
Comment thread infrastructure/installer/index.tsx Resolved
weastler and others added 3 commits November 10, 2026 14:08
Package the complete installer on the Azure foundations, with resumable private configuration, guarded recovery, and deployment receipts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Isolate normalized installation targets, preserve validated operator settings, reject unsafe workspace paths, and keep command cleanup and private diagnostics outside blanket deployment approval.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@weastler
weastler force-pushed the weastler-azure-deployment-wizard branch from fd0cb97 to d55c603 Compare November 10, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants