Skip to content

ComputeNode

This resource will create compute nodes of various types. Currently only supporting virtual machines.

If domain is used the computer will be created in $AD_COMPUTERS_JOIN_OU.

Specifications

TO BE GENERATED BY SCHEMA.

Modifiers

Name Type Mandatory Location Default Example
DEFAULT_AD_RESOURCEPROVIDER string true Variable - ad-foo-bar
VIRTUALMACHINE_HOSTNAME_PREFIX string false Variable - vm-
VIRTUALMACHINE_HOSTNAME_LENGTH number false Variable - 4
VM_SIZE_FILTER list false Variable - ["standard_d4s_v5", "standard_e4s_v5"]
MONITORING_SOLUTION string false Variable - foobarmonitor
AD_COMPUTERS_JOIN_OU string true ResourceProvider - OU=Computers,DC=foo,DC=bar

Usage

The VM created by ComputeNode resource can be referenced in the template using moustache format.

If we use the following modifiers:

VIRTUALMACHINE_HOSTNAME_PREFIX: vm- VIRTUALMACHINE_HOSTNAME_LENGTH: 8

And the following input:

- type: computeNode
  computeType: virtualMachine
  name: vmfoo
  displayName: Foo Server
  alias: ["foo-alias-0", "foo-alias-1"]
  image: win2022
  cpu: 4
  memory: 8
  domain: foo.bar
Reference Type 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 foo.bar
{{computenode.vmfoo.fqdn}} string vm-7a1893cb.foo.bar
{{computenode.vmfoo.logicalcpus}} string 4
{{computenode.vmfoo.memorymb}} string 8192
{{computenode.vmfoo.operatingsystem}} string win2022
{{computenode.vmfoo.alias}} string foo-alias
{{computenode.vmfoo.alias[0]}} string foo-alias-0
{{computenode.vmfoo.alias[1]}} string foo-alias-1

Config

In the "config" key of the computenode resource, computenode configurations can be described which runs as configmgmt jobs (ansible)
Please refer to Config Task section

Examples

- type: computeNode
  computeType: virtualMachine
  name: vmdb
  displayName: DB Server
  alias: ["db-alias"]
  image: win2022
  cpu: 4
  memory: 8
  domain: foo.bar
  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
  - size: 100gb
    volume:
    - mountpoint: e:\user_temp
      label: user_temp
      fileSystem: ntfs
      blocksize: 65536
  config:
  - name: install-sql
    variables:
      mssql_version: sql22dev
      mssql_collation: japanese_bin
      mssql_features: SQLENGINE,FULLTEXT
      mssql_sysadmin_accounts: ["foo.bar\\grp-sysadmin"]