Skip to content

Start here ​

Pick what you want to do. Each purpose has its own section in Running Sonar, with the commands, what Sonar shows, what to expect and the access it needs. How to change the configuration afterwards is in Configuration.

I want to...Go to
Watch a ZTP run (simplified machine provisioning), machine by machineWatch a ZTP run
Watch machines come up from an OEM image or an ISO and register with ArcWatch the OEM image or ISO route
Follow OS configuration, then the Validate step in AzureWatch OS configuration and Validate
Follow a deployment: step tree, live logs from the seed nodeWatch a deployment
Understand one ZTP stage: Boot, Bootstrap, Vouchers and the claim, Install OS, Device, Network, Restore, HandoffRunning Sonar, stage by stage
Know which account and folders read the logs in each phase, and how Sonar reaches the nodeLog access
Follow an update, an add node or a repair, or look at a deployed clusterFollow an update, Add node or repair, a deployed cluster, one stage on its own
Learn the page with no deployment (demo data or a replay)Demo and replay
Look at an existing cluster without touching it, and keep a recordRead-only audit and recording
Run it from a pipeline or an unattended sessionPipeline or unattended
Record a session and share itRecord and share
Restart Sonar in the middle of a runRestart mid-run
Change the config: add a node, change the route, point it at another clusterUpdate the configuration

What you will see ​

A top bar (cluster, status, Details, Log access), one tile per mode (Discovery, Provisioning, OS configuration, Validate, Deployment, Update), a summary with a card per machine, the steps of the selected mode and the live logs. The tour of the page explains each part with screenshots; Details in the top bar shows what Sonar read from your configuration and where it came from.

Three ways to configure Sonar ​

All three end in the same configuration object, so everything after the start behaves the same.

1. From the master infrastructure file (the default) ​

One file describes the instance for ZTP, OS configuration, the ARM deployment and Sonar: infrastructure.yml (schema 5, azurelocal-toolkit config/variables/). Sonar reads it directly. Nothing to write or keep in step.

powershell
Connect-AzAccount
./Start-AzlSonar.ps1 -InfrastructureFile ./infrastructure.yml

Add a machine to the file and Sonar notices (it logs a notice to restart, see what happens to a running Sonar). To keep a config file that you can commit or edit by hand, generate it once:

powershell
Import-Module ./src/AzlSonar/AzlSonar.psd1
ConvertTo-AzlSonarConfig -InfrastructureFile ./infrastructure.yml -OutFile ./config/clus01.json

Which keys are read, and where they land: From the master infrastructure.yml. The file only holds keyvault:// references and Sonar never reads them: the account that reads the logs comes from -Credential or a prompt.

2. Commands that fill in a config file ​

powershell
Import-Module ./src/AzlSonar/AzlSonar.psd1

# Guided: asks for each value. Signed in to Azure, it offers your subscriptions and pre-fills the resource group.
New-AzlSonarConfig -Path ./config/clus01.json -Interactive

# Or in one go:
New-AzlSonarConfig -Path ./config/clus01.json -SubscriptionId <subscription-id> -ResourceGroup rg-example-azl `
    -ClusterName clus01 -Route simplified -IdentityModel ActiveDirectory
Add-AzlSonarNode -Path ./config/clus01.json -Name node01 -Address 192.0.2.11 -Seed
Add-AzlSonarNode -Path ./config/clus01.json -Name node02 -Address 192.0.2.12

Set-AzlSonarConfig  -Path ./config/clus01.json -Key pollSeconds -Value 30   # change any one key later (checked before it is written)
Test-AzlSonarConfig -Path ./config/clus01.json     # says what is missing, naming the key
Get-AzlSonarConfig  -Path ./config/clus01.json     # the configuration Sonar will run with
./Start-AzlSonar.ps1 -ConfigPath ./config/clus01.json

The guided setup never asks for or stores a password.

3. A config file by hand ​

Copy examples/sonar.config.commented.jsonc: every key is explained in it, with which are required and the defaults. Then ./Start-AzlSonar.ps1 -ConfigPath ./config/clus01.json. -ConfigPath works exactly as before.

Started with nothing? ​

./Start-AzlSonar.ps1 with no arguments uses ./sonar.config.json or ./config/sonar.config.json when one exists. Otherwise it prints these three ways with the exact commands and, in an interactive session, offers to run the guided setup.

Released under the MIT License.