Repository navigation
feat(infrastructure): add Azure deployment foundations - #196
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Shutdown omits inactive revisions that may still have terminating replicas, allowing setup to proceed before those replicas have stopped.
9 open issues
Include inactive revisions when checking for terminating replicas · New Resolve relative TF_DATA_DIR paths against the module root · New Reject secret URLs that reference a different vault · New Make registry access conditional to support public images · New Accept empty replica lists before checking the shutdown deadline · New Use a generic proxy example for npm installations · New Document required Container Registry and Key Vault provider registrations · New Test opt-in deployment storage access grants · New Test command labels with independent expectations · New
3 files not reviewed
infrastructure/azure/.terraform.lock.hcl: Generated fileinfrastructure/azure/foundation/.terraform.lock.hcl: Generated fileinfrastructure/azure/provision/.terraform.lock.hcl: Generated file
What changed in this PR
Adds reusable Azure deployment foundations for Hub, supporting manual operation and a future installation wizard without introducing a wizard entry point.
Changes:
- Adds separate-state registry, Key Vault, and temporary database-role provisioning modules.
- Refactors release shutdown and adds revision validation, safe diagnostics, authoritative resource IDs, and targeted drift handling.
- Expands infrastructure checks and supports npm-proxy image builds with offline dependency pruning.
| File | Description |
|---|---|
infrastructure/README.md |
Documents optional modules, access requirements, and release behavior. |
infrastructure/installer/command/describe/index.ts |
Adds fixed, argument-free command labels. |
infrastructure/azure/versions.tf |
Broadens the supported Terraform version range. |
infrastructure/azure/variables.tf |
Adds an optional installation resource-group name. |
infrastructure/azure/tests/fixtures/azure-assigned/main.tf |
Seeds Azure-assigned properties for rerun tests. |
infrastructure/azure/tests/deployment.tftest.hcl |
Covers resource IDs, networking, and drift preservation. |
infrastructure/azure/storage.tf |
Orders containers after the optional deployment grant. |
infrastructure/azure/stop-hub/index.ts |
Extracts revision validation, deactivation, and replica draining. |
infrastructure/azure/stop-hub/index.test.ts |
Covers shutdown ordering, responses, failures, and deadlines. |
infrastructure/azure/provision/tests/provision.tftest.hcl |
Checks provisioning-job isolation and secret references. |
infrastructure/azure/provision/main.tf |
Adds the temporary database-role provisioning module. |
infrastructure/azure/provision/.terraform.lock.hcl |
Locks the provisioning module’s AzureRM provider. |
infrastructure/azure/outputs.tf |
Exposes authoritative installation resource IDs. |
infrastructure/azure/networking.tf |
Adds the database subnet’s Storage service endpoint. |
infrastructure/azure/main.tf |
Uses the optional resource-group name. |
infrastructure/azure/foundation/tests/foundation.tftest.hcl |
Checks registry, vault, and deployment-access settings. |
infrastructure/azure/foundation/main.tf |
Adds installation-owned registry and Key Vault resources. |
infrastructure/azure/foundation/.terraform.lock.hcl |
Locks the foundation module’s AzureRM provider. |
infrastructure/azure/environment.tf |
Preserves Azure’s infrastructure resource-group assignment. |
infrastructure/azure/deployment-access.tf |
Adds an opt-in deployment storage grant. |
infrastructure/azure/deploy-hub/index.ts |
Integrates shared shutdown and refines release diagnostics and activation. |
infrastructure/azure/deploy-hub/index.test.ts |
Extends release, activation, redaction, and teardown coverage. |
infrastructure/azure/database.tf |
Preserves the Azure-assigned PostgreSQL zone. |
infrastructure/azure/.terraform.lock.hcl |
Adds an AzureRM provider checksum. |
infrastructure/.gitignore |
Ignores local dependency and working directories. |
hub/script/check-image/index.ts |
Validates and forwards the npm registry build argument. |
hub/docs/deployment.md |
Documents proxy-backed image builds. |
hub/Dockerfile |
Adds proxy-based dependency installation and offline runtime pruning. |
.github/workflows/hub-infrastructure.yml |
Checks all Terraform modules across both matrix versions and runs shutdown tests. |
Review effort: Max (auto)
weastler
force-pushed
the
weastler-azure-deployment-foundations
branch
from
November 10, 2026 22:06
b161744 to
8882e83
Compare
alliscode
approved these changes
Nov 12, 2026
weastler
force-pushed
the
weastler-azure-deployment-foundations
branch
from
November 12, 2026 18:03
8882e83 to
5fec7b5
Compare
Add optional registry/vault and private-network provisioning modules, native release safety gates, and proxy-backed image builds. Preserve the latest Hub admission and session configuration in deployment guidance. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Record the signed linux_amd64 provider checksum in both optional module locks so readonly initialization remains valid for subsequent validation and mocked tests on CI runners. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Inspect inactive revisions as well as active ones, accept completed drains at the deadline, and resolve sensitive plan paths like Terraform after -chdir. Add independent native regression and safe-command-label coverage to CI. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reject provisioning secret URLs outside the configured vault and allow public digest images without ACR authentication. Cover secret isolation, optional pull grants, and authenticated deployment storage access using mocked Terraform tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Document registry and vault provider registration, optional provisioning registry access, and Terraform-relative plan placement. Direct operators to their approved npm proxy rather than a company-specific feed. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
weastler
force-pushed
the
weastler-azure-deployment-foundations
branch
from
November 12, 2026 22:21
ec56c88 to
c3a9133
Compare
weastler
added a commit
that referenced
this pull request
Nov 12, 2026
<!-- Use a conventional commit-style title, such as "fix(hub): retain prototype history". --> ## Why <!-- Explain the problem and why this change matters in a short, plain-English paragraph. Link the issue when applicable. --> 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 <!-- Describe what becomes different for a first-time reader. Explain necessary terms. Include accurate Mermaid diagrams when they clarify the proposal, using before/after diagrams when helpful. Add screenshots for meaningful UI changes. --> <!-- Omit validation sections, checklists, and routine test/CI summaries such as "CI is green" or "tests passed". Mention only known verification gaps that affect the change, not disclaimers about drafting this description. --> <!-- For UI changes, prune obsolete and duplicate stories in the affected catalogues as part of the change. Explain removed UI or consolidated coverage where needed; see hub/docs/storybook.md#ui-changes-and-pull-request-evidence. --> `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.       A live Azure deployment and recovery exercise remain unverified; local and synthetic evidence do not establish cloud behavior. --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Why
The Azure installation wizard needs reusable provisioning and release foundations that operators can also use without the wizard. This PR separates those foundations from the guided installation flow so they can be reviewed independently.
What changes
Adds optional Terraform modules for an installation-owned container registry and Key Vault, and a temporary private-network job that provisions fresh database roles. Each module has its own state and lifecycle. The main installation exposes authoritative resource IDs, supports an explicit deployment storage grant, and retains Azure-assigned properties without ignoring other configuration drift.
Native release commands validate revision metadata, drain active and inactive replicas before setup, avoid reactivating an already-active revision, and accept empty output from successful Azure mutations. Command failures identify the operation without exposing private tool output. The shared shutdown suite runs directly in Node.js, and the pure command-label helper has no installer runtime dependency. Terraform checks cover all three modules on both matrix versions; no wizard job or entry point is introduced here.
The Hub image can resolve locked dependencies through an explicit npm proxy and prune runtime dependencies offline. Deployment guidance preserves the current GitHub sign-in and administrator-enrollment behavior while documenting manual configuration rather than promising a runnable wizard.
Live Azure release, recovery, and proxy-backed Docker builds remain unverified. Existing Linux-only artifact filesystem tests fail on macOS before exercising storage; their code and tests are unchanged.