DNS

Configure and use the OneFuse DNS module with VMware Aria Automation 8x/Cloud

To learn more about this OneFuse module, refer to DNS.

Prerequisites

  1. Configure OneFuse Property Set(s) and OneFuse Module Policies.
  2. Run OneFuse Configuration per Cloud Assembly Organization.
  3. Review an overview on OneFuse modules with Aria Automation 8.1+/Cloud.
  4. Create a new Cloud Template (if none exist) or determine which existing Cloud Template(s) will utilize this OneFuse Module.

Steps

  1. Know the name of the OneFuse Endpoint created via OneFuse Configuration.
  2. Determine which OneFuse DNS Policies to run for this Cloud Template.
  3. Update the Cloud Template to add in the necessary vRA Properties and/or add in the Custom Resource to invoke a OneFuse DNS Policy.
  4. Deploy the Cloud Template to provision a vRA Deployment and register DNS Record(s).
  5. Destroy the vRA Deployment to remove the DNS Record(s) for the destroyed resource(s).

Update the Cloud Template

  1. Log in to vRA > Cloud Assembly
  2. Select the Design tab from the top menu bar
  3. Select the Cloud Templates tab from the left menu
  4. Edit the Cloud Template and perform the below:

Option 1: Add in necessary vRA Property

The following vRA Property needs to be added to the Cloud Template’s Code section under the Resource(s) of interest.

Call a DNS Policy for a specific NIC:

Property Name Format Property Value Format
OneFuse_DnsPolicy_Nic<#>: Replace <#> with a number from 0 to 9, one for each NIC. Default is 0 '<OneFuse Endpoint Name>:<DNS Policy Name>:<DNS Suffix(es)>': When listing multiple DNS Suffixes, comma separate the values without any spaces. (Note: Values for all three parameters must be passed in.)

Example YAML:

# Execute OneFuse DNS Policy

# -- Property Value
# <OneFuse Endpoint Name>  is onefuse
# <DNS Policy Name> is prod

name: Simple Example
resources:
  Cloud_Machine_1:
    type: Cloud.Machine
    properties:
      image: CentOS7
      flavor: small
      count: 1
      OneFuse_DnsPolicy_Nic0: 'onefuse:prod'

Optional. DNS registration for additional IPs:

Support for registering in DNS for multiple IP Addresses on a single interface. The DNS Records are reserved and stored in both OneFuse and vRA Machine Properties for future reference in vRA lifecycles.

Property name format Property value format
OneFuse_DnsPolicy_AdditionalTrigger 'true'. Required Trigger Property to enable DNS for additional NICs.
OneFuse_DnsPolicy_Additional_<niclabel> '<OneFuse Endpoint Name>:<DNS Policy Name>:<DNS Suffix(es)>'
  • Replace <niclabel> with a value that is appended to the hostname.
  • Default behavior appends <niclabel> to the hostname after a hyphen (-). To override this behavior, modify the Hostname Override field on the OneFuse DNS Policy.
  • Without Additional Naming Property: default behavior of the <niclabel> is to get appended to the hostname after a hyphen (-). To override this behavior, modify the field Hostname Override on the OneFuse IPAM Policy.
  • With Additional Naming Property: if an Additional Naming Policy is defined that matches this value, the name generated from the Naming Policy will be used.
  • When listing multiple DNS Suffixes, comma separate the values without any spaces.

Optional. IP address not using OneFuse IPAM Module:

Use the following optional vRA Property in the event IP addresses are obtained without using OneFuse IPAM and the user wants to register those IP addresses in DNS.

Property Name Format Property Value Format
OneFuse_IP_Additional_<niclabel>: Match <niclabel> here with the value set for the <niclabel> for property OneFuse_DnsPolicy_Additional_ '<IP Address>': Templatable. Additional IP Address to register into DNS.

Example YAML:

# -- Property Name
# <niclabel> is xyz

# -- Property Value
# <OneFuse Endpoint Name>  is onefuse
# <OneFuse DNS Policy Name> is prod
# <DNS Suffix(es)> is example.com

# Example
OneFuse_DnsPolicy_AdditionalTrigger: 'true'
OneFuse_DnsPolicy_Additional_xyz: 'onefuse:prod:example.com'

# Example not using OneFuse IPAM for registering additional IP
OneFuse_IP_Additional_xyz: '10.11.11.11'

# Example Output assuming the hostname is 'server12'
# > server12-xyz.example.com
Additional helpful vRA properties

Purpose: Relate OneFuse Policy executions from different OneFuse Modules together with a Tracking ID.

Property Value Format
OneFuse_Tracking_Id A GUID (globally unique identifier) that links OneFuse Policy Executions and the resulting Managed Objects together for a given resource on a deployment. The first OneFuse Module Policy execution will populate this vRA property and it will be passed into other OneFuse Modules automatically. When a Tracking ID is not provided, a Tracking ID gets generated for the Policy execution. Learn more about OneFuse Tracking ID.

Purpose: Reference a specific NIC’s values to get hostname, IP Address, etc.

Property Format Example
OneFuse_VmNic<#>.<value>: Replace <#> with a number from 0 to 9, one for each NIC. Replace <value> with an appropriate key: dnsSuffix, fqdn, gateway, hostname, ipAddress, macAddress, netmask, network, subnet, target For most use cases, NIC 0 is the primary network interface and the target hostname is a Fully Qualified Domain Name (FQDN). Examples: OneFuse_VmNic0.dnsSuffix, OneFuse_VmNic0.fqdn, OneFuse_VmNic0.hostname, OneFuse_VmNic0.ipAddress, OneFuse_VmNic0.target: when DNS Suffix is provided, will be the FQDN; otherwise, will be the hostname (without domain).
Example Cloud Template YAML code
# Execute OneFuse DNS Policy

# -- Property Value
# <OneFuse Endpoint Name>  is onefuse
# <DNS Policy Name> is prod

name: Simple Example
resources:
  Cloud_Machine_1:
    type: Cloud.Machine
    properties:
      image: CentOS7
      flavor: small
      count: 1
      OneFuse_DnsPolicy_Nic0: 'onefuse:prod'

Option 2: Add in Custom Resource for OneFuse DNS

  • From the Resource Types navigation expand Custom Resources
  • Drag-and-drop OneFuse:DNS_v1 to the canvas
  • In the Code tab, provide values for the following properties:
Parameter Name Required? Notes
endpointName Required OneFuse Endpoint Name in vRA.
policyName Required OneFuse Module Policy Name (string).
templateProperties Optional Additional properties that are referenced within the Policy. JSON format.
trackingId Optional Tracking ID (string) to link multiple OneFuse Policy Executions and resulting OneFuse Managed Objects together. If none is passed, one gets generated by OneFuse for that specific Policy Execution.

DNS-specific parameters:

Parameter Name Required? Notes
name Required Hostname
value Required IP Address
dnsZones Required Array of DNS Zones. YAML array format.

Provision

Deploy a Cloud Template with OneFuse DNS Policies configured. DNS Record(s) will register in the desired DNS Provider.

Outputs

The following vRA Properties will exist on the Deployment.

Property Name Property Value
OneFuse_DNS_Nic#: where # is a number 0–9 JSON string of OneFuse DNS Managed Object
OneFuse_DNS_Additional<niclabel>: where niclabel is replaced with the user-specified value (shown when configured to register additional IPs) JSON string of OneFuse DNS Managed Object

Deprovision

Destroy an existing deployment with OneFuse DNS Policies configured. The DNS Record(s) will be removed from the desired DNS Provider.

vRA EBS

EBS Execution Subscription State EBS Priority EBS Name
Provision
ComputeProvisionPre Early 1300 OneFuse_Provision_DNS
Deprovision
ComputePostRemoval - 1300 OneFuse_De-Provision_DNS

Troubleshooting

Troubleshoot in vRealize Orchestrator.

  1. Log in to vRealize Orchestrator.
  2. Turn on Verbose Logging and try again to see additional log messages in vRO Workflows:
    • Select Library > Workflows from the left menu
    • Go to: OneFuse > DNS > vRA8 to find corresponding workflow runs and view logs
    • Optionally, run the workflows in the Manual folder to manually test
  3. Optionally, configure timeouts for EBS and/or Configure timeouts for OneFuse modules.

Troubleshooting common errors

  • Error: message": "Policy action job '<GUID>' failed: 'NoneType' object has no attribute 'has_failures'; details: None"
    • The most likely cause for this error is when DNS Suffix(es) were not provided for the vRA Property Value.
    • Refer to this section for an example on the expected format.

Additional resources: