Skip to content

How it works

You don’t need this page to deploy. Read it to understand what the stages build and why the pipeline is safe to run.

One workflow, platform.yml, runs in your own repo. You pick a stage and walk away. Each stage runs the kit’s scripts.

StageProfileWhere triggeredWhenWhat it doesTime
whatifMember (Path A)Azure Cloud Shell · pwshT-14 (Path A Step 1)Runs preflight (Test-Preflight.ps1 -Fix) and registers missing Azure resource providers and the public IP feature (member also re-runs preflight automatically at T-3).About 15 min; allow up to 15 more for new provider registrations to propagate
whatifLead (Path A & Path B)Azure Cloud Shell · pwshT-14 (Path A Step 1 or Path B Step 1), and again before Step 2 only if roster.json changedPreviews ALZ-lite and runs preflight across every roster subscription (batch with -f members=1-200 above 256 members).About 15 min at T-14; allow up to 15 more for provider registrations
foundationLead (Path A & Path B)Azure Cloud Shell · pwshT-7 (Path A Step 2 or Path B Step 2)Deploys ALZ-lite for the team (after reader-group bootstrap): management groups, group Reader on mg-factory, hub, policies.15 to 25 min
memberMember (Path A); Lead (own index in Path A, or all / range in Path B)Azure Cloud Shell · pwshT-3 (Path A Step 3 or Path B Step 3)Deploys the datacenter, runs the datacenter test, and only if that passes onboards vm-app01 to Azure Arc.35 to 60 min per concurrent wave (MAX_PARALLEL defaults to 20 in the lead repo)
vendingLead (Path A & Path B)Azure Cloud Shell · pwshT-1 (Path A Step 4 or Path B Step 4)Verifies full-roster reader-group sync and datacenter/Arc readiness, connects subscriptions to the hub, restarts VMs, records exemptions if needed and tests connectivity.Measured: about 62 min for 3 members; estimate: 75 min for 5; batch with -f members=1-50 above 50 members
teardownBoth (Path A); Lead only (Path B)Azure Cloud Shell · pwshT+2 (Path A or Path B)Removes member scopes first, then the shared foundation when confirmed.About 20 min without SQL MI (up to 2 hours with SQL MI), then about 25 min for the foundation

The order is fixed by the event: Step 1 (repo and preflight), Step 2 (foundation and the Graph grant), Step 3 (each member’s datacenter and vm-dev01 setup), and Step 4 (vending, which verifies each member’s datacenter and Arc connection automatically). The deployment guide has the timeline.

all runs whatif, foundation, member and vending in the event order in one go. Use it only in a test lab: it runs a single repo rather than separate member and team-lead repos.

A team has one shared services subscription and one workload subscription per member, all in one Microsoft Entra tenant. Each stage builds one layer.

  • Management groups (foundation, T-7): mg-factory under Tenant Root, with mg-factory-platform for the shared services subscription and mg-factory-corp for the workload subscriptions. Foundation assigns built-in Reader at mg-factory to mg-factory-readers, and assigns the core policies at mg-factory-corp.
  • Pipeline setup (T-14): rg-cicd holds each repo’s pipeline identity: in the shared services subscription for the lead, and the workload subscription for a member.
  • Shared services subscription (foundation, T-7): rg-hub holds vnet-hub, Azure Firewall afw-hub/afwp-hub and private DNS. rg-management holds log-management and id-sqlmi-directory.
  • Each workload subscription, datacenter (member stage, T-3): rg-datacenter holds vm-app01 (vm-app01 · Bastion, Arc-connected), vm-dev01 (vm-dev01 · C:\src\<your-repo> (pwsh), provisioned with the full challenge toolchain: node 24 LTS, azd, .NET 10, SSMS, VS Code + Copilot as your single workstation for C1–C10, while pipeline setup and teardown run from Azure Cloud Shell · pwsh) and Bastion.
  • Each workload subscription, spoke (vending, T-1): rg-spoke holds vnet-spoke, its hub peering and routes. Vending also adds a subscription budget, not a resource in rg-spoke.

The CoE archetype (C5) and the modernized app (C6 and C7) deploy into each member’s spoke later, with azd and a container image. They are not part of the pipeline. The end state shows all of it.

Five steps. You run a stage in your own repo. The GitHub environment gh-lab accepts only the branches you list, with a reviewer where your plan allows. A guard step checks the subscription and prefix against your team's list and stops if it isn't on it. Microsoft Entra accepts a short-lived GitHub token that proves which repo and environment is asking. Azure then lets the managed identity run the kit's scripts, with no stored secret. A side panel compares the member profile (Owner on one workload subscription) with the team lead profile (Owner at Tenant Root).
The pipeline signs in with a short-lived token, not a password. Open full size

Setup creates a managed identity called id-factory-pipeline in a resource group called rg-cicd. GitHub proves who it is with a short-lived OIDC token (OpenID Connect), so there is no password or secret to leak. The identity is trusted only for one GitHub environment, gh-lab, in one repo.

  • Member profile: Owner on your own workload subscription. Nothing else. It runs whatif, member and teardown.
  • Team lead profile: Owner at Tenant Root, so it can create the kit’s management groups and move subscriptions (in a test lab, at a sandbox management group instead). It runs every stage, for every member on the roster.

Why Owner: the kit assigns roles and policies, which Contributor can’t do.

The risk is real: anyone who can run a workflow in the environment can use that identity. Use only a non-production tenant. Three guards limit it:

  1. The environment accepts only the branches you list. Current GitHub documentation says private-repo environments and deployment-branch rules require Pro for personal accounts or Team for organizations. The owner reported a successful private-repo Free test; verify the capability in your own organization, as explained in Requirements.
  2. A required reviewer approves each run where your GitHub plan offers it. GitHub lists Enterprise for required reviewers on private repos; if they are unavailable, write access is the gate, so keep the repo private and the writers few.
  3. The guard step refuses any subscription that isn’t on its approved list.

Subscription IDs, the roster, the reader group ID, and roster verification are stored as environment secrets, never in the repo or its logs. Run logs show identifiers as <id:abcd>. Never put an identifier in a repo variable, an issue or a pull request.

A repository configures at most one pipeline profile, and the two operating models differ in which repositories hold a pipeline:

  • Path A (Self-service teams): The team lead sets up the Lead profile in their own repository (covering every member on the roster, including their own index 1, without adding a second Member profile). Every other team member sets up the Member profile in their own repository.
  • Path B (Lead-provisioned cohort): Only the team lead’s repository configures a pipeline (Lead profile, covering all 1..n roster members). Student repositories have no gh-lab environment, OIDC managed identity, or pipeline secrets—attendees receive Write (push) collaborator access only so they can commit challenge deliverables and app commits on main without deployment permissions.

The kit scripts impose no upper cap on attendee count (MemberIndex accepts any integer 1 or greater). Spoke and datacenter address blocks scale deterministically by index (see Naming and IP plan):

  • Indexes 1 to 255: allocate /24 blocks at 10.10.<n>.0/24 (datacenter) and 10.20.<n>.0/24 (spoke).
  • Indexes 256 and above: allocate /24 blocks sequentially from non-overlapping 10.128.0.0/10 (datacenter) and 10.192.0.0/10 (spoke) pools.

When n approaches Azure or GitHub Actions platform limits, split stage dispatches into index ranges (for example -f members=1-50) or run multiple hubs:

Platform thresholdLimitHow to operate at scale
GitHub Actions single-job timeout6 hours (360 minutes) per jobSerial spoke vending in vending Phase 1 handles roughly 60 to 70 members per run. Above n = 50, dispatch vending in batches such as -f members=1-50, then -f members=51-100.
Azure Firewall Policy rule collection groups90 Rule Collection Groups per afwp-hubVending creates one rcg-member-<n> per member on afwp-hub. Plan at most 85 to 90 members per hub before standing up a second lead hub.
GitHub Actions ROSTER_JSON secret & matrix fan-out48 KiB per secret (~250 members) and 256 jobs per matrixOne ROSTER_JSON secret holds roughly 250 roster entries; above ~250 members, split across a second lead repo and hub (or batch matrix runs with -f members=1-200 and -f members=201-250).
Azure Virtual Network peerings650 peerings per vnet-hubEach vended member adds 2 hub peerings (vnet-datacenter and vnet-spoke), capping a single vnet-hub at 325 members when Firewall Policy capacity is partitioned across policies or hubs.