Skip to content

Student onboarding (before Day 1)

Who: Every student in a lead-provisioned event. When: Before Day 1 kickoff (allow 20 to 30 minutes once your team lead sends your private Handoff Card).

Your team lead has already deployed the shared Azure landing zone, your simulated datacenter (vm-app01 and vm-dev01), Azure Arc, and your spoke network. Connect to vm-dev01 through Azure Bastion and follow the steps below to get your private repository and Copilot tools ready before Day 1 starts at 08:30. Use the same clone (C:\src\<your-repo> on main) for all ten challenges.

If anything blocks you, contact your designated team lead first.

Open the invitation link in your private Handoff Card and accept it with the GitHub account you gave your team lead, unless you already have access. Confirm you can access the assigned private repository. Keep the card private: it contains your repository URL, archetype suffix, and local settings command. Do not create a new repository.

2. Connect to vm-dev01 through Bastion and set up your workspace

Section titled “2. Connect to vm-dev01 through Bastion and set up your workspace”

Use the assigned repository owner, repository name, and archetype suffix from your Handoff Card in the bootstrap command below. The script signs you in, clones that existing repository, imports the kit, and writes local settings. It detects the shared hub subscription from the peering created by vending. The card’s Initialize-Settings.ps1 command is a manual alternative for initializing settings after cloning, not the bootstrap command.

Who runs this: Every student, on their own assigned vm-dev01.
Why: Every challenge (C1 to C10) runs inside your vm-dev01 workstation in Azure—reaching both GitHub and the private endpoints in your datacenter and spoke network from a single clone (C:\src\<your-repo> on main).

Keep two browser windows open on your own computer: one for Azure Bastion, the other for the Azure portal and this guide (allow portal pop-ups and Bastion clipboard access, and enter device sign-in codes on your own computer where your passkeys and password manager work). Each step below labels where you run it:

  1. [On your laptop — lab password] Have your vm-dev01 labadmin password ready from infra/datacenter/README.md (or from your team lead). Keep your private Handoff Card available for the assigned repository and suffix. Initialize-Workstation.ps1 detects the workload subscription and tenant on vm-dev01.

  2. [On your laptop browser — Azure portal] Connect to vm-dev01 through Bastion so you have a desktop inside the private datacenter network. Filter the portal to your directory and workload subscription, open Resource groups > rg-datacenter > vm-dev01 > Connect > Bastion, select Password, enter labadmin and the password from step 1, and choose Connect. On first sign-in, wait up to five minutes for VS Code extensions to finish installing.

  3. [On vm-dev01 — PowerShell 7 (pwsh)] Run Initialize-Workstation.ps1 to bootstrap vm-dev01 in one command. It installs Node.js 24 LTS and azd if your VM was deployed before the single-clone update, signs you in to GitHub (repo,workflow scopes), Azure CLI, and azd, sets AZURE_TOKEN_CREDENTIALS=AzureCliCredential, detects your MemberIndex and workload subscription from the VM's private IP and datacenter network. It detects the shared hub subscription only after hub peering exists; for Path A, add it after vending as described in Step 4. It clones your assigned private GitHub repository at C:\src\<your-repo> on main, imports the kit, writes factory/.local/settings.json and datacenter.json, and opens VS Code:

    Terminal window
    New-Item -ItemType Directory -Force C:\LabTools | Out-Null
    Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/jonathan-vella/apex-factory-hackathon/main/scripts/Initialize-Workstation.ps1' -OutFile C:\LabTools\Initialize-Workstation.ps1
    pwsh -NoProfile -File C:\LabTools\Initialize-Workstation.ps1 -GitHubOwner '<org>' -RepoName '<your-repo>' -Suffix '<suffix>'

    Replace <org> and <your-repo> with the owner and name from your Handoff Card's assigned repository URL, and <suffix> with its archetype suffix. Accept the invitation first. If you cannot access the assigned repository, stop and contact your team lead; do not create another repository.

    What Initialize-Workstation.ps1 runs under the hood (manual reference)

    If you ever need to run or inspect the individual sign-in, clone, and settings steps by hand in PowerShell 7 (pwsh) on vm-dev01:

    Terminal window
    gh auth login --hostname github.com --git-protocol https --scopes repo,workflow --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"
    Terminal window
    az login --tenant '<tenant-id>' --use-device-code
    az account set --subscription '<workload-subscription-id>'
    az account show --query name -o tsv
    [Environment]::SetEnvironmentVariable('AZURE_TOKEN_CREDENTIALS', 'AzureCliCredential', 'User')
    Terminal window
    git clone https://github.com/<org>/<your-repo>.git C:\src\<your-repo>
    cd C:\src\<your-repo>
    Terminal window
    cd C:\src\<your-repo>\factory
    ./scripts/Initialize-Settings.ps1 -TenantId '<tenant-id>' -SubscriptionId '<workload-subscription-id>' -SharedSubscriptionId '<shared-services-subscription-id>' -MemberIndex <index> -Location '<location>' -Suffix '<suffix>' -WriteLabCredentials
    Terminal window
    code C:\src\<your-repo>
  4. [On vm-dev01 — VS Code] Trust the workspace authors when prompted, sign in to GitHub Copilot (Accounts icon > Sign in with GitHub to use GitHub Copilot), and configure the Upgrade agent for local execution next to the app: in Extensions, enable GitHub Copilot upgrade and disable GitHub Copilot modernization (for Workspace) if installed. In Copilot Chat, set Session Target to Local, press F1 > MCP: List Servers > Upgrade > Configure Model Access to allow your models, select Upgrade in the agent picker, and send "hello". Also confirm 01-Orchestrator and 08-As-Built appear in the agent picker.

Run in PowerShell 7 (pwsh) on vm-dev01:

Terminal window
gh auth status
git config --global user.name
az account show --query name -o tsv
[Environment]::GetEnvironmentVariable('AZURE_TOKEN_CREDENTIALS', 'User')
git -C C:\src\<your-repo> branch --show-current
git -C C:\src\<your-repo> status --short --ignored -- app .github/upgrades
Get-Content C:\src\<your-repo>\factory\.local\settings.json

Done when GitHub is signed in, git has your name, Azure shows your workload subscription, AZURE_TOKEN_CREDENTIALS is AzureCliCredential, C:\src\<your-repo> is on main, settings.json has your suffix, memberIndex, and sharedSubscriptionId, and the git status command prints nothing. If the shared subscription was not detected, contact your team lead; the private Handoff Card also provides a local settings command. Keep vm-dev01 running during the event—never shut down or deallocate it while hacking.

Your team lead already pushed factory/evidence/readiness/test-datacenter.txt to your student repository in Step 3:

  1. In C:\src\<your-repo> on vm-dev01, confirm factory/evidence/readiness/test-datacenter.txt is present with PASS results.
  2. In the Azure portal, open Azure Arc > SQL Server instances, select the instance on vm-app01, open Migration > Assessments (choose Run assessment if not yet run), and confirm the Azure SQL Managed Instance readiness report is available for C3.

Done when factory/evidence/readiness/test-datacenter.txt is present on main and VS Code + Copilot Chat are ready on vm-dev01. Let your team lead know you are ready!

Next: join the 30-minute hackathon introduction at 08:30 on Day 1, then start C1: Define the opportunity at 09:00.