DNS
6 minute read
To learn more about this OneFuse module, refer to DNS.
Prerequisites
- Configure OneFuse Property Set(s) and OneFuse Module Policies.
- Run OneFuse Configuration per vRA Tenant.
- Review the OneFuse Modules overview for vRealize Automation 7.6.
- Create a new vRA Blueprint (if none exist) or determine which existing Blueprint(s) will utilize this OneFuse Module.
- Resource: Designing Machine Blueprints
Configure the Blueprint
- Know the name of the OneFuse Endpoint created via OneFuse Configuration.
- Determine which OneFuse DNS Policies to run for this Blueprint.
- Update the Blueprint to add in the necessary vRA Properties to invoke a OneFuse DNS Policy.
- Deploy the Blueprint to provision a vRA Deployment and register DNS Record(s).
- Destroy the vRA Deployment to remove the DNS Record(s) for the destroyed resource(s).
Update the Blueprint
- Log in to the vRA Tenant
- Select the Design tab from the top menu bar
- Select the Blueprints tab from the left menu
- Edit the Blueprint and perform the below:
Add in necessary vRA Property
The following vRA Property needs to be added Blueprint’s Properties > Custom Properties section under the Resource(s) of interest.
Call a DNS Policy for a specific NIC:
| Property name format | Property value format |
|---|---|
OneFuse_DnsPolicy_Nic<#> |
<OneFuse Endpoint Name>:<DNS Policy Name>:<DNS Suffix(es)> |
- Replace
<#>with a number from0to9, one for each NIC. Default is0.
Values for all three parameters must be passed in. When listing multiple DNS Suffixes, comma separate the values without any spaces.
# Execute OneFuse DNS Policy
# -- Property Value
# <OneFuse Endpoint Name> is onefuse
# <DNS Policy Name> is prod
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 |
OneFuse_DnsPolicy_Additional_<niclabel> |
<OneFuse Endpoint Name>:<DNS Policy Name>:<DNS Suffix(es)> |
OneFuse_DnsPolicy_AdditionalTriggeris the required trigger property to enable DNS for additional NICs.- Replace
<niclabel>with a value that is appended to the hostname. - When listing multiple DNS Suffixes, comma separate the values without any spaces.
Name behavior:
- 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 DNS 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.
Optional. IP address not using OneFuse IPAM module.
Use the following optional vRA Property that will be used in the event IP addresses are getting obtained not using OneFuse IPAM and the user wants to register those IP addresses in DNS.
| Property name format | Property value format |
|---|---|
OneFuse_IP_Additional_<niclabel> |
<IP Address> |
- Match the
<niclabel>here with the value set for<niclabel>inOneFuse_DnsPolicy_Additional_. - Templatable. Additional IP Address to register into DNS.
Example vRA Custom Properties (in key: value pair format)
# -- Property Name
# <niclabel> is xyz
# -- Property Value
# <OneFuse Endpoint Name> is onefuse
# <OneFuse DNS Policy Name> is prod
# <DNS Suffix(es)> is example.com,example2.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. Learn more about OneFuse Tracking ID. |
When a Tracking ID is not provided, a Tracking ID gets generated for the Policy execution.
Purpose: Reference a specific NIC’s values to get hostname, IP address, etc.
| Property format | Example |
|---|---|
OneFuse_VmNic<#>.<value> |
See examples below |
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.dnsSuffixOneFuse_VmNic0.fqdnOneFuse_VmNic0.hostnameOneFuse_VmNic0.ipAddressOneFuse_VmNic0.target: when DNS Suffix is provided, will be the FQDN; otherwise, will be the hostname (without domain).
Custom property placement methods
Influence Custom Properties for Resources using different methods:
| Method | Description |
|---|---|
| Basic | Add a Custom Property to the vSphere machine on the blueprint canvas, or to the blueprint layer itself. |
| Advanced 1 | Add a Custom Property to an existing or new vRA Property Group. |
| Advanced 2 | Add a Custom Property to a more global level - such as vCenter Endpoint (to run on all deployments) and/or a Reservation (to run on all deployments using that reservation), etc. |
Learn more: Understanding Custom Properties Precedence
Compiled example vRA custom properties
Review example below of vRA Custom Properties (in key: value pair format) for this OneFuse Module.
# Execute OneFuse DNS Policy
# -- Property Value
# <OneFuse Endpoint Name> is onefuse
# <DNS Policy Name> is prod
OneFuse_DnsPolicy_Nic0: onefuse:prod
Provision
Deploy a Blueprint 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<#> |
JSON string of OneFuse DNS Managed Object |
OneFuse_DNS_Additional<niclabel> |
JSON string of OneFuse DNS Managed Object |
<#>is a number0-9.<niclabel>is the user-specified value (if configured to register additional IPs).
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 | |||
| BuildingPre | Early | 1300 | OneFuse_Provision_DNS |
| Deprovision | |||
| MachineDisposingPost | - | 1300 | OneFuse_De-Provision_DNS |
Troubleshooting
Troubleshoot in vRealize Orchestrator.
- Log in to vRealize Orchestrator.
- 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 > vRA7 to find corresponding workflow runs and view logs
- Optionally, run the workflows in the Manual folder to manually test
- 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 the Add in necessary vRA Property section for an example on the expected format.
Additional resources:
- Review Troubleshooting in OneFuse
- Review VMware troubleshooting resources