- Add searchReference to ApplicationListItem type - Fix result variable in toApplicationDetails function - Add query helper functions for req.query parameter handling - Fix req.query.* type errors in routes (applications, cache, classifications, objects) - Fix CompletenessCategoryConfig missing id property - Fix number | null type errors in dataService - Add utils/queryHelpers.ts for reusable query parameter helpers
6.1 KiB
Azure CLI - Quick Start Guide
📍 Waar voer je deze commando's uit?
Je voert deze commando's uit in de Terminal (command line) op je computer.
🖥️ Terminal Openen
Op macOS (jouw situatie):
-
Open Terminal:
- Druk op
Cmd + Space(Spotlight) - Typ "Terminal"
- Druk Enter
- Of: Applications → Utilities → Terminal
- Druk op
-
Of gebruik iTerm2 (als je die hebt geïnstalleerd)
Op Windows:
- PowerShell of Command Prompt
- Druk
Win + R, typpowershell, Enter
Op Linux:
- Open je terminal emulator (bijv. GNOME Terminal, Konsole)
✅ Stap 1: Check of Azure CLI Geïnstalleerd is
Voer dit commando uit in de terminal:
az --version
Als je een versie ziet (bijv. azure-cli 2.50.0): ✅ Azure CLI is geïnstalleerd, ga door naar Stap 2.
Als je een foutmelding krijgt (bijv. command not found): ❌ Azure CLI is niet geïnstalleerd, zie installatie hieronder.
📥 Stap 2: Azure CLI Installeren (als nodig)
Op macOS:
Optie A: Met Homebrew (Aanbevolen)
# Installeer Homebrew (als je die nog niet hebt)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Installeer Azure CLI
brew install azure-cli
Optie B: Met Installer
- Download: https://aka.ms/installazureclimac
- Open het
.pkgbestand - Volg de installatie wizard
Optie C: Met pip (Python)
pip3 install azure-cli
Op Windows:
- Download: https://aka.ms/installazurecliwindows
- Run de
.msiinstaller - Volg de installatie wizard
Op Linux:
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
Na installatie, check opnieuw:
az --version
🔐 Stap 3: Login bij Azure
Voer dit commando uit:
az login
Wat gebeurt er:
- Je browser opent automatisch
- Log in met je Azure account (hetzelfde account dat je gebruikt voor Azure Portal)
- Na succesvol inloggen, sluit je de browser
- De terminal toont je subscriptions
Als browser niet opent automatisch:
- Je krijgt een code en URL in de terminal
- Kopieer de code
- Open de URL in je browser
- Voer de code in
Verwachte output:
[
{
"cloudName": "AzureCloud",
"id": "12345678-1234-1234-1234-123456789012",
"name": "Subscription Name",
"state": "Enabled",
...
}
]
✅ Je bent nu ingelogd!
🔍 Stap 4: Haal ACR Credentials Op
Voer dit commando uit:
az acr credential show --name zdlas
Verwachte output:
{
"passwords": [
{
"name": "password",
"value": "abc123xyz..."
},
{
"name": "password2",
"value": "def456uvw..."
}
],
"username": "zdlas"
}
Noteer:
- Username:
zdlas(of wat er staat) - Password: Gebruik
passwords[0].value(de eerste password)
⚠️ Belangrijk: Deze credentials zijn gevoelig! Deel ze niet en gebruik ze alleen voor de service connection.
📋 Complete Stappen in Terminal
Hier is de complete reeks commando's:
# 1. Check of Azure CLI geïnstalleerd is
az --version
# 2. Login bij Azure (opent browser)
az login
# 3. Haal ACR credentials op
az acr credential show --name zdlas
Kopieer de output en gebruik de username en passwords[0].value in Azure DevOps.
🔄 Alternatief: Via Azure Portal (Zonder Azure CLI)
Als je Azure CLI niet wilt installeren, kun je credentials ook via Azure Portal ophalen:
-
Ga naar Azure Portal: https://portal.azure.com
-
Ga naar je Container Registry: Zoek naar
zdlas -
Klik op "Access keys" (links in het menu)
-
Je ziet:
- Login server:
zdlas.azurecr.io - Username:
zdlas(of admin username) - Password: Klik op "Show" naast password om het te zien
- Password2: Alternatieve password
- Login server:
-
Kopieer de username en password
✅ Dit is hetzelfde als az acr credential show!
🎯 Voor Jouw Situatie (Service Connection)
Gebruik deze credentials in Azure DevOps:
-
In de service connection wizard:
- Kies "Docker Registry" → "Others"
- Docker Registry:
zdlas.azurecr.io - Docker ID:
zdlas(of de username uit de output) - Docker Password:
passwords[0].value(uit de output) - Service connection name:
zuyderland-cmdb-acr-connection
-
Save
🚨 Troubleshooting
"az: command not found"
Oplossing: Azure CLI is niet geïnstalleerd
- Installeer Azure CLI (zie Stap 2 hierboven)
- Of gebruik Azure Portal alternatief (zie hierboven)
"az login" opent geen browser
Oplossing:
- Kopieer de code en URL uit de terminal
- Open de URL handmatig in je browser
- Voer de code in
"Subscription not found" of "Access denied"
Oplossing:
- Check of je ingelogd bent met het juiste Azure account
- Check of je toegang hebt tot de subscription waar de ACR staat
- Probeer:
az account listom je subscriptions te zien - Selecteer de juiste subscription:
az account set --subscription "Subscription Name"
"ACR not found"
Oplossing:
- Check of de ACR naam correct is:
zdlas - Check of je toegang hebt tot de ACR
- Probeer:
az acr listom alle ACR's te zien
💡 Tips
- Azure CLI blijft ingelogd - Je hoeft niet elke keer
az loginte doen - Check je subscription - Als je meerdere subscriptions hebt:
az account show - Wissel subscription -
az account set --subscription "Subscription Name" - Logout -
az logout(als je klaar bent)
📚 Meer Informatie
🎯 Quick Reference
Terminal openen:
- macOS:
Cmd + Space→ "Terminal"
Azure CLI commando's:
az --version # Check installatie
az login # Login bij Azure
az acr credential show --name zdlas # Haal credentials op
Azure Portal alternatief:
- Portal → Container Registry → Access keys
Klaar! 🚀