ComputeNode¶
The ComputeNode resource provisions virtual machines. Currently only virtualMachine compute type is supported. When a domain is specified, the VM is automatically joined to Active Directory.
Structure¶
- type: computeNode
computeType: virtualMachine
name: vmweb # unique identifier within the RGT
displayName: Web Server # optional, human-readable name
image: win2022 # OS image
domain: yourdomain.local # optional, AD domain to join
cpu: 4 # option A: specify CPU + memory
memory: 16 # (integers = GB)
size: standard_d4s_v5 # option B: specify Azure SKU directly
alias: ["web-alias"] # optional, DNS aliases
disk: # optional, additional disks
- size: 100gb
volume:
- mountpoint: D
label: Data
fileSystem: NTFS
config: # optional, configuration tasks
- name: package
variables:
name:
- nginx
Sizing¶
There are two ways to size a VM — use one or the other, not both:
Option A: CPU + Memory¶
cpu— number of vCPUs (integer)memory— RAM amount. Integers are interpreted as GB. Use a string with a unit suffix for other sizes:16= 16 GB"16gb"= 16 GB"512mb"= 512 MB"1tb"= 1 TB
Tip
Dune picks a VM size that matches the given cpu/memory. Use the VM_SIZE_FILTER variable to restrict the pool of candidate sizes.
Option B: ResourceProvider specific VM Size¶
Use a resourceprovider specific size. This takes precedence over cpu/memory if both are specified.
Disks¶
Additional data disks are defined in the disk array. Each disk has a size and one or more volume definitions. The fields of a volume depend on the guest OS — Windows uses drive letters and NTFS, Linux uses LVM volume groups and logical volumes.
Windows volumes¶
disk:
- size: 100gb
volume:
- mountpoint: D
label: SQL_Bin
fileSystem: NTFS
- size: 50gb
volume:
- mountpoint: E:\User_DB
label: User_DB
fileSystem: NTFS
blocksize: 65536
| Volume field | Required | Description |
|---|---|---|
mountpoint |
Yes | Drive letter (D) or path (E:\User_DB) |
label |
No | Volume label. If omitted, no label is set. |
fileSystem |
No | File system type. Defaults to NTFS. |
blocksize |
No | Allocation unit size in bytes (e.g., 65536 for SQL Server data files) |
Linux volumes¶
Linux disks are provisioned with LVM. Each physical disk is assigned to a volume group, and one or more logical volumes are carved out of it. Multiple volume entries can share the same volumegroup to split a disk into several logical volumes:
disk:
- size: 64
volume:
- volumegroup: rootvg0
logicalvolume: lv_tmp
mountpoint: /tmp
filesystem: xfs
size: 16
opts: nodev,nosuid
- volumegroup: rootvg0
logicalvolume: lv_home
mountpoint: /home
filesystem: xfs
- size: 1228
volume:
- volumegroup: oraclevg0
logicalvolume: lv_u01
mountpoint: /u01
filesystem: xfs
size: 100
- volumegroup: oraclevg0
logicalvolume: lv_u09
mountpoint: /u09
filesystem: xfs
| Volume field | Required | Description |
|---|---|---|
volumegroup |
Yes | LVM volume group name |
logicalvolume |
Yes | LVM logical volume name |
mountpoint |
Yes | Mount path (e.g., /tmp, /u01) |
filesystem |
Yes | File system type (e.g., xfs, ext4) |
size |
No | Size of this logical volume in GB. Omit on the final volume in a volume group to consume the remaining free space. |
opts |
No | Mount options (e.g., nodev,nosuid) |
Aliases¶
Aliases create additional DNS entries pointing to the VM:
Aliases can be referenced in expressions using {{computenode.<name>.alias[0]}} and {{computenode.<name>.alias[1]}}.
Config¶
The config block defines configuration tasks that run on this VM after provisioning. Each task maps to an AWX job template that executes an Ansible playbook against the VM. See Config Tasks for all available tasks.
config:
- name: package
variables:
name:
- firefox
- notepadplusplus
- name: firewall-rule
variables:
name: allow-https
action: allow
localport: 443
protocol: tcp
direction: in
Reference Format¶
Use {{computenode.<name>.<property>}} to reference a compute node's properties in expressions.
Given a VM with name: vmfoo, VIRTUALMACHINE_HOSTNAME_PREFIX: vm-, VIRTUALMACHINE_HOSTNAME_LENGTH: 8:
| Expression | Type | Example output |
|---|---|---|
{{computenode.vmfoo}} |
string | vm-7a1893cb |
{{computenode.vmfoo.name}} |
string | vmfoo |
{{computenode.vmfoo.hostname}} |
string | vm-7a1893cb |
{{computenode.vmfoo.displayname}} |
string | Foo Server |
{{computenode.vmfoo.dnsdomain}} |
string | yourdomain.local |
{{computenode.vmfoo.fqdn}} |
string | vm-7a1893cb.yourdomain.local |
{{computenode.vmfoo.logicalcpus}} |
string | 4 |
{{computenode.vmfoo.memorymb}} |
string | 8192 |
{{computenode.vmfoo.operatingsystem}} |
string | win2022 |
{{computenode.vmfoo.alias[0]}} |
string | foo-alias-0 |
{{computenode.vmfoo.alias[1]}} |
string | foo-alias-1 |
Note
{{computenode.vmfoo}} (without a property) returns the hostname — this is the shorthand for {{computenode.vmfoo.hostname}}.
Modifiers (Variables)¶
These variables control how compute nodes are provisioned. Set them as Variables at the appropriate level (Tenant, Collection, Deployment).
| Variable | Type | Required | Level | Default | Description |
|---|---|---|---|---|---|
DEFAULT_AD_RESOURCEPROVIDER |
string | Yes | Variable | — | Identifier of the Active Directory resource provider (e.g., ad-foo-bar) |
VIRTUALMACHINE_HOSTNAME_PREFIX |
string | No | Variable | — | Prefix for generated hostnames (e.g., vm-) |
VM_SIZE_FILTER |
list | No | Variable | — | Restrict available VM SKUs (e.g., "standard_d4s_v5", "standard_e4s_v5") |
MONITORING_SOLUTION |
string | No | Variable | — | Monitoring solution identifier |
Example¶
A database server with multiple disks and SQL Server installed:
- type: computeNode
computeType: virtualMachine
name: vmdb
displayName: DB Server
alias: ["db-alias"]
image: win2022
cpu: 4
memory: 8gb
domain: yourdomain.local
disk:
- size: 20gb
volume:
- mountpoint: D
label: SQL_Bin
fileSystem: NTFS
- size: 5gb
volume:
- mountpoint: E
label: SQL_Data
fileSystem: NTFS
blocksize: 65536
- size: 1tb
volume:
- mountpoint: E:\User_Data
label: User_Data
fileSystem: NTFS
blocksize: 65536
config:
- name: install-sql
variables:
mssql_version: sql22dev
mssql_collation: Latin1_General_CI_AS
mssql_features: SQLENGINE,FULLTEXT
mssql_sysadmin_accounts: ["yourdomain\\grp-sysadmin"]
Next: ServiceAccount