Skip to content

Step 1: Repo and preflight (T-14)

Who: Everyone (team lead included), plus the Team lead collects the team roster. When: By T-14 (14 days before day one). About 30 to 45 minutes in Azure Cloud Shell.

Complete this step first. It gives you a private repository with the kit on main, a signed-in az and gh, your .local/settings.json file, and a passing whatif preflight. GitHub Actions runs workflows only from the default branch, so the kit must be merged to main before anything deploys. Check that you have the accounts and access from Requirements first. If anything blocks you, contact your designated team lead first (no coach is on duty before day one; pre-hackathon support is best-effort).

  • One repo of your own. Create a private GitHub repo from the apex-accelerator template and use it throughout the event. Use main for challenge work. The template supplies the APEX agents, which appear in Copilot Chat’s agent picker.
  • Azure Cloud Shell for Step 1. Import the kit and set up the pipeline in Azure Cloud Shell (PowerShell) in your browser. You get your vm-dev01 workstation in Step 3 (T-3).
  • One import. A single command (Import-Kit.ps1) copies the kit into factory/, pre-populates factory/evidence/, and places app/ContosoUniversity, .github/modernization/, .github/skills/, and the CoE archetype (infra/bicep/university/) at the repo root.
  • One workstation (vm-dev01) for all challenges. Once vm-dev01 is deployed in Step 3: Datacenter and workstation, you clone your repo to C:\src\<your-repo> on main and run 100% of C1 to C10 there.
  • Working artifacts live in factory/evidence/ on main. Team deliverables (C1, C4, C10) are committed once in the team/pod lead’s repo.
Each member's private repository is created from the public apex-accelerator template. Import-Kit.ps1 copies the published hackathon kit into its factory/ folder and places the app and archetype at the repo root.
Your repo comes from the template. Import-Kit.ps1 places factory/, the app and the archetype into that single repo. Open full size
  1. Create the repo. Open the apex-accelerator template, choose Use this template > Create a new repository, set the owner to your partner org, and make it Private. Add your team lead and any coach accounts your event owner publishes as collaborators (Settings > Collaborators).

  2. Open Azure Cloud Shell and sign in to GitHub. Open Azure Cloud Shell in your browser, switch the shell picker to PowerShell, and sign in to GitHub:

    Terminal window
    gh auth login --hostname github.com --git-protocol https --web
    gh auth setup-git
    $u = gh api user | ConvertFrom-Json
    git config --global user.name ($u.name ?? $u.login)
    git config --global user.email "$($u.id)+$($u.login)@users.noreply.github.com"
  3. Clone your repository in Cloud Shell.

    Terminal window
    mkdir -p ~/src
    cd ~/src
    git clone https://github.com/<your-org>/<your-repo>.git
    cd <your-repo>
Ignore the template’s own README

Your new repo opens on the template’s README and its Quick Start. Follow this page instead. Don’t run npm run setup, change the Actions pull request permission, or run Weekly Maintenance/Governance Policy Baseline: the kit doesn’t use them. Ignore the template’s failed Monday scheduled runs.

Done when pwd in Azure Cloud Shell shows ~/src/<your-repo>.

  1. Import. In Azure Cloud Shell, at the root of ~/src/<your-repo>, run:

    Terminal window
    curl -fsSLO https://raw.githubusercontent.com/jonathan-vella/apex-factory-hackathon/main/scripts/Import-Kit.ps1
    pwsh ./Import-Kit.ps1
    rm Import-Kit.ps1

    This creates factory/ (with factory/evidence/ templates pre-populated) and imports app/ContosoUniversity, .github/modernization/, .github/skills/, and the CoE archetype (agent-output/university/ and infra/bicep/university/) into the repo root.

  2. Commit and push the import on a branch.

    Terminal window
    git switch -c feat/import-kit
    git add -A
    git commit -m "chore: import the factory kit"
    git push -u origin feat/import-kit

Done when ls factory lists scripts, infra, app, db, templates, evidence and archetype, ls app lists ContosoUniversity, and your feat/import-kit branch is on GitHub.

If the import fails
  • The import refuses to overwrite an existing factory/ unless you add -Force. Repeat the three lines and pass pwsh ./Import-Kit.ps1 -Force. -Force preserves factory/.local/, your archetype work, and app/ContosoUniversity (pass -ReplaceArchetype or -ReplaceApp only if you want to overwrite them).

Your import is on the feat/import-kit branch. Merge it now so main holds the kit and .github/workflows/platform.yml.

  1. Merge the branch with gh (or in the GitHub web UI under Pull requests):

    Terminal window
    gh pr create --base main --head feat/import-kit --title "chore: import the factory kit" --body "Import the Partner Modernization Factory kit."
    gh pr merge --merge --delete-branch
  2. In Cloud Shell, bring main up to date:

    Terminal window
    git switch main
    git pull

Done when factory/ and app/ContosoUniversity/ are visible on main on GitHub and git branch --show-current prints main.

Assign member indexes before 1.4 (Team lead)

Section titled “Assign member indexes before 1.4 (Team lead)”

Before anyone creates settings in Step 1.4, the team lead assigns each member a distinct index and shares it privately. Scripts accept positive whole-number member indexes starting at 1, with the team lead as 1. Members must use the index their team lead assigns, not choose their own.

From now on, all your work is on main. Once vm-dev01 is deployed at T-3, you work in C:\src\<your-repo> on main on vm-dev01 (git pull --rebase before pushing). Team deliverables (C1, C4, C10) are committed once in the team/pod lead’s repo and shared in the team channel; member deliverables (C3, C5–C9) are committed in your own repo.

  1. Verify your Azure subscription in Cloud Shell. Find your tenant ID (Azure portal, Microsoft Entra ID > Overview) and your subscription ID (Subscriptions).

    Terminal window
    az account set --subscription '<subscription-id>'
    az account show --output table

    Check that az account show prints your workload subscription, and compare its subscription ID with the portal, not the name: the CLI caches names.

  2. Create your settings file. Run it from factory/ with the unique index your team lead assigned before this step:

    Terminal window
    cd ~/src/<your-repo>/factory
    ./scripts/Initialize-Settings.ps1

    It asks for your tenant ID and workload subscription ID, your member index, your location (press Enter for swedencentral) and the shared services subscription. It shows the subscription name it is about to save: answer Y only when that name is yours. Note your generated 6-character suffix ($s.suffix)—you will pass -Suffix <suffix> when you set up vm-dev01 in Step 3.3.

  3. Check your vCPU quota.

    Terminal window
    $s = Get-Content .local/settings.json | ConvertFrom-Json
    az vm list-usage --location $s.location --output table

    For the rows Total Regional vCPUs and Standard DASv6 Family vCPUs, CurrentValue + 16 must be no larger than Limit. If not, ask for a quota increase under Usage + quotas and tell your team lead.

Done when Get-Content .local/settings.json shows tenantId, subscriptionId, location, memberIndex and suffix, and the quota check passes. factory/.local/ is git-ignored, so your IDs never go to GitHub.

About the settings questions
  • Member index: your team lead assigns you a positive whole-number member index unique within your team, starting at 1 with the team lead as 1. Ask your team lead if you don’t have one, and don’t pick your own. It isn’t the six-character suffix the script generates. Later pages show these as $s.memberIndex and $s.suffix, read from factory/.local/settings.json.
  • Shared services subscription, members: press Enter to skip it for now. You can add it in Step 4: Vending when your team lead shares it (./scripts/Initialize-Settings.ps1 -SharedSubscriptionId '<shared-services-subscription-id>'). Re-running never changes your other values.
  • Shared services subscription, team lead: enter it now. The script prints its name on a Shared: line: check it is your shared services subscription and not another one you own.
  • Wrong subscription name: az account list --refresh --output table updates the cached names. Initialize-Settings.ps1 can’t tell a mistyped but valid ID from a real one, so read the name it shows.

1.5 Send your roster values and set up the pipeline

Section titled “1.5 Send your roster values and set up the pipeline”

Members (other than the team lead):

  1. Send these four values privately to your team lead (a direct message or private team channel, never in a repo, issue, or pull request):

    • your workload subscription ID ($s.subscriptionId)
    • your member index ($s.memberIndex)
    • your Entra object ID (az ad signed-in-user show --query id -o tsv)
    • your work email
  2. Set up the member pipeline in your repo (run from factory/):

    Terminal window
    ./scripts/Initialize-PlatformPipeline.ps1 -Profile Member

    On a private repo it may warn that write access is the gate. That is expected when required reviewers are unavailable. GitHub’s current environment-plan guidance conflicts with the owner’s reported Free-plan private-repo test; verify Step 1.5 in your partner organization before T-14. See Requirements and check the setup any time with ./scripts/Test-PipelineSetup.ps1 -Profile Member.

Team lead:

  1. Use the distinct team member indexes you assigned and shared before Step 1.4: positive whole-number member indexes starting at 1, with you as 1. Collect the four values above from every member, yourself included.

  2. Save factory/.local/roster.json (git-ignored) with one row per member:

    [
    { "index": 1, "subscriptionId": "<workload-subscription-id>", "memberPrincipalId": "<entra-object-id>", "budgetEmail": "<email>" }
    ]
  3. Make sure your account has Owner at Tenant Root (a Global Administrator must elevate access to grant it) and Owner on the shared services subscription.

  4. Set up the lead pipeline in your repo (run from factory/):

    Terminal window
    ./scripts/Initialize-PlatformPipeline.ps1 -RosterPath .local/roster.json

    A repo has one profile: do not run -Profile Member in the team lead’s repo. To add or swap a member later, edit .local/roster.json, run this command again if workload subscriptions changed, and run Sync-FactoryReaderGroup.ps1 -Mode Sync before vending.

Done when Initialize-PlatformPipeline.ps1 reports its checks as passed.

Do not run the foundation stage yet. The team lead runs it at Step 2 (T-7), after the Step 1 preflight.

1.6 Run the T-14 preflight and manual checks

Section titled “1.6 Run the T-14 preflight and manual checks”

The whatif stage checks your subscription and registers missing Azure resource providers. See the stage timing table for the estimate, including time for provider registration to propagate.

  1. Run the whatif stage from factory/:

    Terminal window
    gh workflow run platform.yml -f stage=whatif
  2. Open the Actions tab on GitHub and approve the run if asked.

  3. Fix every FAIL the run log reports. If resource providers were just registered, wait 10 to 15 minutes and run gh workflow run platform.yml -f stage=whatif again.

  4. Confirm every row in the manual checks table below before T-14.

Team lead: Step 1.5 verifies that your account can assign Owner at Tenant Root when it creates the pipeline identity. The later whatif run checks the pipeline identity’s Tenant Root and shared-services permissions, plus every member in roster.json. Treat a warning on the Management groups row as a blocker and resolve it before Step 2 (T-7).

#CheckHow to verifyPreflight row
1Copilot seat and organization policyConfirm your GitHub account has an active Copilot seat and your organization allows Copilot Chat, custom agents (01-Orchestrator, 08-As-Built, Upgrade), and MCP servers (verified on vm-dev01 in Step 3.3).GitHub Copilot
2Azure Cloud Shell worksYou can run az version, pwsh --version, and gh --version in Azure Cloud Shell.Not a MANUAL row
3One subscription per memberConfirm with your team lead that no other member uses yours.Not a MANUAL row
4Your roles match your kit roleTeam lead: Owner at Tenant Root, Owner on the shared services subscription, and Owner on their own workload subscription. Members: Owner on your own workload subscription. Tenant Root Owner must be in place for pipeline setup by T-14.Not a MANUAL row
5MFA is registeredSign in to the Azure portal and confirm your MFA method works.MFA
6You can create private repos in the partner’s GitHub orgYou did this when you created your repo above. Private-repo Actions uses included compute first; the repo owner is billed for additional usage. Check the organization owner’s Billing & Licensing page, budget and payment method.GitHub repositories
7Azure licensingConfirm Windows Server AHB eligibility for vm-app01 or follow the AHB rule. Separately, confirm your per-user Windows 11 license grants rights to run Windows 11 on Azure for vm-dev01; the preflight input does not cover it.Azure Hybrid Benefit

Done when the whatif run is green and every manual check is confirmed.

The automated preflight’s GO is in the job log, not the run summary. WARN rows do not prevent GO; they do not waive your manual checks.

Next: the team lead continues to Step 2: Foundation and Graph grant (T-7). Members continue to Step 3: Datacenter and workstation (T-3).