Getting an Azure subscription is a good start. Then you can run through this page to set up your laptop ready for many of the labs on the Citadel site.
If you do not have a GitHub ID already then sign up.
MacOS or Linux
If you are working on MacOS or a Linux distro then you can just use Bash in your preferred terminal. Skip the WSL step and install the binaries.
Windows 10 / 11
We recommend using the Windows Subsystem for Linux (WSL) and installing the binaries into linux rather than at the Windows OS level. This page assumes that you will take that route.
If your personal preference is to work within Windows and to use PowerShell then we understand. You can install both git and az at the OS level instead and then skip to vscode. However you should be aware that you won’t be able to use some of the examples in the labs as they are based on Ubuntu 22.04 running in WSL and use pipelines in Bash.
Run as Administrator.
You will be guided to set up a local admin ID and password.
E.g., for Ubuntu/Debian:
sudo apt update && sudo apt install jq git tree stress
git jq --help tree ~ stress
You may want to add
export JQ_COLORS="1;90:0;35:0;35:0;91:0;33:1;37:1;37"to your ~/.bashrc file to improve the colours.
az version az login az account show --output jsonc az account show --output json | jq -r .user.name
For standard CLI use we favour the Windows Terminal on Windows. It will pick up on all of your WSL distros as well as creating profiles for Command Prompt, PowerShell and Cloud Shell.
Refer to the [Windows Terminal documentation] if you wish to customise.
Visual Studio Code
Visual Studio Code (vscode) is assumed as our default IDE.
- Install Visual Studio Code
- Install the Remote Development extension pack
- Open extensions (
- Open extensions (
Open Ubuntu in Windows Terminal
Open vscode for the current directory
The vscode engine will be automatically downloaded upon first run, and then Visual Studio Code will open on the desktop.
Is “WSL: <distro>” shown at the bottom left?
Open Source Control (
Click on the ellipsis (…) on the Source Control sidebar
Click on Show Git Output
Does the top of the output look similar to this?
[info] Log level: Info [info] Validating found git in: "git" [info] Using git "2.34.1" from "git"
Visual Studio Code Extensions
Install additional extensions
Use the shortcodes to quickly find the right extension. Some will install into the front end and some directly into WSL.
Extension Shortcode Azure Account ms-vscode.azure-account Azure Resource Manager tools msazurermtools.azurerm-vscode-tools Hashicorp Terraform hashicorp.terraform JSON Tools eriklynd.json-tools
Only required for the virtual machine imaging labs.
Ansible is used in a few of the labs. As per the Ansible docs, Ansible on Azure is installed using the Python installer, pip. It is preinstalled in the Cloud Shell’s container image.
sudo apt update && sudo apt install -y python3-pip
pip3 install ansible[azure]
The remaining steps are option if you are familiar with Ansible and wish to configure it yourself. If you would like a default config then feel free to continue.
Create the ansible config file and directory structure
umask 022 cat << ANSIBLE_CFG > ~/.ansible.cfg [defaults] inventory = ~/ansible/hosts roles_path = ~/ansible/roles deprecation_warnings=False nocows = 1 ANSIBLE_CFG mkdir -pm 755 ~/ansible/roles && cd ~/ansible cat << ANSIBLE_HOSTS > ~/ansible/hosts [localhost] 127.0.0.1 ANSIBLE_HOSTS
Install the Ansible collection for Azure
ansible-galaxy collection install azure.azcollection
Install Azure modules
wget https://raw.githubusercontent.com/ansible-collections/azure/dev/requirements-azure.txt sudo pip3 install -r requirements-azure.txt
Most of this site has a slight bias towards OSS technologies rather than traditional Windows Server and PowerShell. Most Linux users will prefer to use the Azure CLI. Having said that, it is always useful to have the PowerShell Az module installed as there are some operations that can only be achieved with PowerShell cmdlets. The good news is that PowerShell and the PowerShell Az module are cross platform.
Help us improve
Azure Citadel is a community site built on GitHub, please contribute and send a pull requestMake a change