Skip to content

Deployment

Sven Aelterman edited this page Oct 29, 2024 · 19 revisions

What you'll need

You can use Azure Cloud Shell which comes preloaded with all necessary tools. If you prefer to use your own workstation:

  • Bicep

    On Windows, install Bicep using winget install -e -h -s winget --id Microsoft.Bicep.

  • VS Code, preferably with the Bicep and PowerShell extensions

    Recommended VS Code extensions:

    • Bicep
    • PowerShell

    On Windows, install VS Code using winget install -e -h -s winget --id Microsoft.VisualStudioCode --override '/SILENT /mergetasks="!runcode,addcontextmenufiles,addcontextmenufolders"'.

  • PowerShell 7

    On Windows, install PowerShell 7 using winget install -e -h -s winget --id Microsoft.PowerShell.

  • The Az PowerShell modules

    Install the Az modules using Install-Module Az.

Optional, but strongly recommended

Create a Key Vault to hold certain deployment time secrets, such as the usernames and passwords for VMs and domain.

Getting started

  1. Clone this repo; or fork it to your account and then clone.
  2. Open the cloned repo with VS Code. If using Cloud Shell, you don't need to open the entire repo.
  3. If using VS Code, open a PowerShell 7 (pwsh) terminal.

Gather info: network address space, security group, AD information (if using AD auth)

Deploying the hub

  1. Create a bicepparam file.

    • Start from a sample file or create a new file using the VS Code Bicep extension.
  2. Complete all parameters required for your chosen deployment type.

  3. Ensure you're logged in to Azure with an account with the appropriate permissions on your research hub subscription. Owner is the recommended role (because RBAC assignments are made), but User Access Administrator combined with Contributor also works.

  4. Execute the deployment using the deploy.ps1 file with the following required parameters:

    • -TemplateParameterFile
    • -TargetSubscriptionId
    • -Location

    The script supports the -WhatIf and -Verbose parameters.

Deploying a spoke

Content pending.