Prereqs
You will need a few things before you can run the accelerator's bootstrap and work on Azure Landing Zones.
Table of Contents
Overview
For the bootstrap you will need a few prerequisites as summarised below. This page includes links to the official documentation, but you will also find the commands repeated here to save you jumping around too much.
-
Access to an Azure tenant with one to four subscriptions for use in the Platform Landing Zone area:
- management (mandatory)
- connectivity (recommended)
- identity
- security
(It is assumed that the subscriptions will be directly under the Tenant Root Group in Management Groups.)
-
An ID with Global Administrator
Note that you will need to temporarily elevate a Global Administrator ID and assign root level privileges for the duration of the bootstrap. (As per the elevate and demote pages in this series.)
-
A GitHub organization
If you are an individual GitHub user then you can create an organization for free. For example, my GitHub organization for testing is
richeney-org.You will also need the ability to create personal access tokens in the context of your organization.
-
PowerShell with the ALZ module installed
-
Visual Studio Code with the Hashicorp Terraform extension
Create personal access tokens
-
Authenticate to GitHub
-
Go to Settings
Click on your profile at the top right and select Settings
-
Switch setting context at the top of the page to your organization
The URL will switch to
https://github.com/organizations/orgName/settings/profile. -
Navigate to Developer Settings > Personal Access Tokens > Fine-grained tokens
Bootstrap
Create a personal access token for the bootstrap process.
-
Click on Generate new token.
- Token Name:
Azure Landing Zone accelerator - Description:
Short-lived token for the ALZ Accelerator bootstrap process - Resource Owner: Switch to your organization
- Expiration: Custom, select short period.
- Repository access: All repositories
- Token Name:
-
Add Repositories permissions
Permission Access Actions Read and write Administration Read and write Contents Read and write Environments Read and write Secrets Read and write Variables Read and write Workflows Read and write -
Add Organizations permissions
Permission Access Members Read and write Self-hosted runners Read and write -
Generate the token.
-
Copy the token value and keep it somewhere safe.
Private Runners
Create a personal access token for the private runners
-
Click on Generate new token.
- Token Name:
Azure Landing Zone private runners - Description:
Long-term token used by the private runners - Resource Owner: Switch to your organization
- Expiration: Select no expiration.
- Repository access: All repositories
- Token Name:
-
Add Repositories permissions
Permission Access Administration Read and write -
Add Organizations permissions
Permission Access Self-hosted runners Read and write -
Generate the token.
-
Copy the token value and keep it somewhere safe.
ALZ PowerShell module
As per the bootstrap page:
-
Open PowerShell 7
-
Trust the
Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted -
Install the ALZ module
Install-Module -Name ALZ -Scope CurrentUserAdditional commandsIf the module is already installed then you can run this command to check for an update.
Update-Module -Name ALZCheck the version number(s):
Get-InstalledModule -Name ALZ -AllVersionsRemove an older versions:
Uninstall-Module -Name ALZ -RequiredVersion X.Y.ZRequiredVersion should be set to the major.minor.patch that you are removing. It is recommended to have a. the latest version and b. only one version, or you may see an error from the ALZ Accelerator.
The ALZ PowerShell module is open source at https://github.com/Azure/ALZ-PowerShell-Module.
Setup
-
Bash, plus Visual Studio Code with the Hashicorp Terraform extension
These labs assume you will be working in a Bash environment, and you have vscode configured with the Terraform extension. See our Setup page for a recommended config.
ℹ️ If the pages prove very popular then I will add PowerShell for those who prefer to stay within the Windows OS level.