A working Azure setup is two halves: a real account with guard rails so it cannot run up a bill, and a set of local tools so most work never needs the cloud at all. This part creates the free account and a budget, installs and signs in to the Azure CLI, then sets up Azurite, Functions Core Tools, Docker and the editor extensions, ending with a smoke test of every piece.
This is the fifth part of the Azure series, and the first hands-on one. Parts 1 to 4 built the concepts: what a cloud is, the hierarchy, the physical layout, Resource Manager. This part builds the workbench that the rest of the path uses.
The setup has two halves, and the split is deliberate:
Microsoft offers a free account for new customers. At the time of writing, its terms have three layers (check the current terms when you sign up, as they change):
| Layer | What you get |
|---|---|
| Credit | a sum of credit (USD 200 or the local equivalent) to spend on almost any service during the first 30 days |
| 12 months free | monthly free amounts of selected popular services, for the first 12 months |
| Always free | small monthly amounts of a long list of services, for as long as you have the account |
Signing up needs a phone number and a credit or debit card. The card is for identity verification; the free account does not charge it unless you choose to upgrade. When the 30-day credit runs out or expires, the subscription is disabled rather than charged, until you decide whether to move to pay-as-you-go.
Two details that catch people out:
If your employer or school already gives you an Azure subscription (many developer programmes include monthly credit), use that instead; everything in this path works the same.
The first thing to do in a new subscription, before creating a single resource, is to create a budget. In the portal: search for Cost Management, open Budgets, choose Add, and set:
| Setting | Learner-friendly value |
|---|---|
| Scope | your subscription |
| Amount | a small number, for example 5 or 10 in your currency |
| Reset period | monthly |
| Alerts | at 50%, 90% and 100% of actual cost, plus 100% of forecasted cost |
| Alert recipients | your email address |
The forecast alert is the most useful one: it fires when Azure predicts you will go over by the end of the month, often days before you actually do.
Every experiment in this path follows the same lifecycle, built on Part 2's rule that deleting a resource group deletes everything in it:
az group create --name rg-learn-storage --location westeurope
# ... experiment ...
az group delete --name rg-learn-storage --yes --no-waitNothing can be forgotten, because nothing exists outside a resource group. Part 6 covers what costs money while idle, but this habit alone removes nearly all the risk.
The Azure CLI (az) is the command-line client for Resource Manager from Part 4. It runs on Windows, macOS and Linux, and this path uses it constantly because commands can be read, copied and repeated in a way portal clicks cannot.
# Windows (winget)
winget install --exact --id Microsoft.AzureCLI
# macOS (Homebrew)
brew update && brew install azure-cli
# Debian or Ubuntu
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bashOpen a new terminal afterwards so it picks up the updated PATH, then check:
az versionThe CLI updates often. az upgrade updates it in place.
az loginThis opens a browser (or, on Windows, a system sign-in window) where you sign in with your Azure account. Behind the scenes it is the OAuth flow from the Azure Identity series: you authenticate with Entra ID, and the CLI receives tokens it caches in your user profile (the .azure folder in your home directory) and refreshes automatically. Recent versions then show a list of your subscriptions and ask which one to use.
On a machine without a browser, such as a remote server or a container, use the device code flow instead: the CLI prints a short code, and you enter it on another device's browser.
az login --use-device-codeBefore creating anything, always check which subscription is active. Running commands against the wrong subscription is a classic mistake once you have more than one:
az account show --output table
az account list --output table
az account set --subscription "<subscription name or id>"Every az command returns JSON by default. Three global options make it far more usable:
| Option | What it does | Example |
|---|---|---|
--output table (-o table) | prints a readable table instead of JSON | az group list -o table |
--output tsv | prints bare values, ideal for scripts | az group show -n rg-learn -o tsv --query id |
--query | filters and reshapes the JSON with a JMESPath expression | az group list --query "[].name" |
--query is worth learning early, because it turns any command into a precise question: az resource list --query "[?location=='westeurope'].name" lists the names of every resource in West Europe.
To make tables the default for your own interactive use:
az config set core.output=tableTo make Part 4 concrete, you can ask the CLI for the access token it attaches to Resource Manager requests:
az account get-access-token --query expiresOn --output tsvThat query deliberately prints only the expiry time and leaves the token itself out. If you do print the raw accessToken, treat it like a password: anyone holding it can act as you until it expires. Pasting it into a JWT decoder you trust (one that decodes locally) shows the claims the Azure Identity series described: your identity, the tenant, the audience, the expiry.
These tools let most of the path run with no Azure subscription involved at all.
Several emulators, as well as Redis, run most easily as containers. Install Docker Desktop (Windows or macOS) or Docker Engine (Linux), then check:
docker version
docker run --rm hello-worldAzurite is Microsoft's open-source emulator for Azure Storage. It emulates three of the four storage services on fixed local ports:
| Service | Local port | Emulated? |
|---|---|---|
| Blob storage | 10000 | yes |
| Queue storage | 10001 | yes |
| Table storage | 10002 | yes |
| Azure Files | n/a | no, Files is not emulated |
The Azure Queue Storage series already used it. There are three ways to run it; pick one:
# 1. As a Docker container (nothing else to install)
docker run -d --name azurite -p 10000:10000 -p 10001:10001 -p 10002:10002 \
mcr.microsoft.com/azure-storage/azurite
# 2. As a global npm package (needs Node.js)
npm install -g azurite
azurite --silent --location ./azurite-data --debug ./azurite-data/debug.log
# 3. As the Azurite extension in VS Code (start it from the command palette)Code and tools find Azurite through one special connection string that means "the local emulator, with its well-known development account":
UseDevelopmentStorage=trueAzurite is a close emulation, not a perfect one. It does not implement every feature or enforce every limit of the real service, so anything subtle (performance, exact error behaviour, newer features) should be checked against a real storage account before relying on it.
Azure Storage Explorer is a free desktop app for browsing storage accounts: containers, blobs, queues and tables. It connects to Azurite out of the box (under "Emulator & Attached") and to real storage accounts once you sign in. Being able to see the blob that your code just uploaded, or the message sitting in a queue, makes the Storage topic much easier to follow.
Core Tools (the func command) runs Azure Functions on your machine, with the same runtime the cloud uses. It is also how you create function projects and, later, deploy them. Install version 4:
# Windows (winget)
winget install Microsoft.Azure.FunctionsCoreTools
# macOS (Homebrew)
brew tap azure/functions && brew install azure-functions-core-tools@4
# Any OS with Node.js
npm install -g azure-functions-core-tools@4Check it with func --version. Functions that use storage triggers need a storage account even locally, and that is what Azurite provides: a local function app's settings point at UseDevelopmentStorage=true. The Functions topic starts from here.
Two more local services come up later; they only need Docker, so there is nothing to install now:
docker run -d --name redis -p 6379:6379 redis). The data services topic uses it.The code in this path is C# on current .NET. Check the SDK is installed:
dotnet --list-sdksVisual Studio Code with a few extensions covers everything in this path (Visual Studio and JetBrains Rider work just as well):
| Extension | What it adds |
|---|---|
| C# Dev Kit | C# editing, debugging and test running |
| Azure Resources | browse your subscriptions and resource groups in the sidebar |
| Azure Functions | create, run, debug and deploy function apps |
| Azurite | start and stop the storage emulator from the editor |
| Bicep | syntax, validation and completion for Bicep files |
The Azure extensions sign in with their own login, separate from the CLI's; sign in once from the Azure sidebar.
With everything installed, one short run confirms each piece works. None of it costs money, and the cloud part cleans up after itself.
# 1. CLI and account: who am I, and which subscription is active?
az account show --output table
# 2. Resource Manager: create an empty resource group, list it, delete it.
# An empty resource group costs nothing.
az group create --name rg-smoke-test --location westeurope
az group list --output table
az group delete --name rg-smoke-test --yes
# 3. Azurite: with the emulator running, create a container and upload a file.
echo "hello azure" > hello.txt
az storage container create --name smoke --connection-string "UseDevelopmentStorage=true"
az storage blob upload --container-name smoke --name hello.txt --file hello.txt \
--connection-string "UseDevelopmentStorage=true"
az storage blob list --container-name smoke --output table \
--connection-string "UseDevelopmentStorage=true"
# 4. Core Tools and .NET
func --version
dotnet --list-sdksAfter step 3, open Azure Storage Explorer, look under the emulator's blob containers, and you should see smoke with hello.txt inside. That moment, a file sitting in "Azure Storage" that never left your machine, is the local-first idea this whole path relies on.
| Tool | Check with | Used for |
|---|---|---|
| Azure account with a budget | Cost Management, Budgets | the few cloud-only parts |
| Azure CLI | az version, az account show | managing Azure from the terminal |
| Docker | docker version | running emulators and Redis |
| Azurite | Storage Explorer shows the emulator | Blob, Queue and Table storage, locally |
| Azure Storage Explorer | opens and connects | seeing what your code stored |
| Functions Core Tools | func --version | running functions locally |
| .NET SDK | dotnet --list-sdks | all the C# code |
| VS Code + extensions | Azure sidebar signed in | editing, debugging, browsing |
Use the cloud sparingly and safely; use your laptop for everything else. A real account gets a budget first (an alarm, not a brake) and the habit of one resource group per experiment, deleted afterwards. The Azure CLI is a scriptable client for Resource Manager, signed in through the same Entra OAuth flow as everything else. Azurite, Core Tools and Docker run Storage, Functions and the other services locally, so most of this path costs nothing and works offline.
func.The account has a budget, but a budget only tells you after money is being spent. Part 6 explains how Azure decides what to charge in the first place: meters, the dimensions every service is priced on, which resources keep costing money while doing nothing, how to estimate a bill before building anything, and the habits that keep a learning subscription at zero.