Azure
Overview
Waldur offers Microsoft Azure virtual machines through the Azure plugin of the Waldur Site Agent. The agent runs at the provider site, holds the Azure service principal credentials and talks to Azure Resource Manager; Waldur itself does not connect to Azure. Customers order machines from a Site Agent offering in the marketplace.
| Action in Waldur | Effect on Azure |
|---|---|
| Create a resource | A running virtual machine, with its own resource group, virtual network, subnet, public IP address and network interface |
| Terminate the resource | The virtual machine and its network objects are deleted |
| Pause or downscale (staff actions) | The virtual machine is deallocated, so compute is no longer billed; its disks remain |
| Restore the resource | The virtual machine is started again |
There are no start, stop or restart actions, and a plan change does not resize a machine. Usage is reported as allocation: the cores, memory and disk of the machine's size, for as long as the machine exists.
Setting up the integration takes three steps:
- Create a service principal in the Azure subscription the machines run in.
- Create a Site Agent offering in Waldur.
- Configure and run the agent with the credentials and the offering's UUID.
Prerequisites
- An Azure account with an active subscription
- Azure CLI installed - Install Azure CLI. The steps below use the CLI; the same can be done in the Azure Portal.
- Sufficient Azure permissions:
- To create service principals: Cloud Application Administrator role or higher in Microsoft Entra ID
- To assign roles: Owner or User Access Administrator role on the subscription
- A host at the provider site for the Waldur Site Agent, with HTTPS access to Waldur and to Azure
Prepare Azure
Log in to the Azure CLI
1 | |
This will open a browser window for authentication. Complete the login process.
Get your subscription ID
1 | |
Save this value - you'll need it for the agent configuration.
Register resource providers
To avoid errors when creating Virtual Machines and related resources, register the necessary resource providers:
1 2 3 4 5 6 7 8 | |
Verify registration:
1 2 | |
Create a service principal with a role assignment
Run the following command to create a service principal with Contributor access to your subscription:
1 2 3 4 | |
Replace <YOUR_SUBSCRIPTION_ID> with the subscription ID from Get your subscription ID.
Tip
You can use a different role if needed. See Azure built-in roles for other options.
Save the output
The command will output JSON containing all the credentials you need:
1 2 3 4 5 6 | |
Map these values to the agent's backend settings:
appId→client_idpassword→client_secrettenant→tenant_id- Subscription ID →
subscription_id
Warning
The password (Client Secret) is only shown once. Save it immediately in a secure location.
Create the offering
Create a Site Agent offering (offering type Marketplace.Slurm) as described in the
Site Agent documentation, and note its UUID: the agent is bound to the
offering by it.
Components
Give the offering the components the plugin reports: cpu, ram and disk, matching the
backend_components of the agent configuration below. The plugin also recognises cores,
memory and storage, or any name mapped with backend_name.
Order options
The order form is the Site Agent order form. Define the machine's parameters as the offering's order options so that the form asks for them; each overrides the agent's default for one machine:
| Option | Type | Meaning |
|---|---|---|
location |
select | Azure region, e.g. westeurope |
size |
select | Machine size, e.g. Standard_B1s |
image |
select | Image as publisher:offer:sku:version |
ssh_public_key |
text | SSH public key for the administrator account |
The key is the only way into a machine: the administrator password is generated and never shown. An order without a key is refused before anything is created on Azure.
Pausing and downscaling
Set the offering's supports_pausing and supports_downscaling plugin options to let staff
pause and downscale its resources. Both deallocate the machine; restoring the resource starts it.
Configure the agent
Install the agent as described in the Site Agent documentation, and add the offering to its configuration with the Azure backend:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | |
- The four credentials are the values collected in Save the output.
allowed_ssh_rangeslists the CIDR prefixes that may reach the machines over SSH. The plugin opens port 22 only to these ranges; with none configured, no SSH connections are admitted.default_location,default_sizeanddefault_imageapply when an order does not set the corresponding order option.
Run the agent for order processing and usage reporting. The full list of backend settings
(including default_resource_group, network_cidr and subnet_cidr) is in the
Azure plugin README.
Upgrading from Waldur's built-in Azure integration
Upgrading Waldur converts existing Azure offerings into Site Agent offerings. Their resources are kept, and the plugin manages the existing machines under their current names and ARM ids. The upgrade deletes the offerings' Azure service settings, which hold the service principal credentials.
Warning
Copy the credentials before upgrading. The upgrade deletes them from Waldur.
- For each Azure offering, copy
subscription_id,tenant_id,client_idandclient_secretfrom its Azure service settings into the agent'sbackend_settings. The settings carry the same names in both places. - Upgrade Waldur.
- Run an agent with each offering's UUID as
waldur_offering_uuid, configured as in Configure the agent.