/
Use Cases for the Deployment with Cloud Template

Use Cases for the Deployment with Cloud Template

This topic has sample scripts that you can refer to for creating VMware Aria Automation cloud template deployments. You can define the code on the Code tab of a cloud template or a deployment. For more information, see Creating a Deployment in VMware Aria Automation Assembler.

Note
The property values in the listed samples are configured with hardcoded values for ease of understanding. Infoblox recommends that you configure the inputs: {} attribute using the property groups in the cloud template (Code tab). Refer to the example in Creating a Deployment in VMware Aria Automation Assembler.

Code samples are included for the following use cases:

Provisioning a VM with the Registration of a Host Record in NIOS

formatVersion: 1
inputs: {}
resources:
Cloud_Network_1:
type: Cloud.Network
properties:
constraints:
- tag: infoblox
networkType: existing

Cloud_Machine_1:
type: Cloud.Machine
properties:
NetworkProfileType: EXTERNAL
Infoblox.IPAM.createHostRecord: true
Infoblox.IPAM.Network0.enableDns: true
Infoblox.IPAM.Network0.enableDhcp: true
Infoblox.IPAM.restartIfNeeded: true
Infoblox.IPAM.Network0.dnsView: view1
Infoblox.IPAM.Network0.Domain: infobloxdemo.com
image: CentOS
flavor: small
name: 'test-vm-1'
constraints:
- tag: infoblox

networks:
- network: ${resource.Cloud_Network_1.id}
assignment: static

Provisioning a VM with the Registration of Fixed Address, A, PTR, CNAME Records in NIOS

formatVersion: 1
inputs: {}
resources:
Cloud_Network_1:
type: Cloud.Network
properties:
constraints:
- tag: infoblox
networkType: existing
Cloud_Machine_1:
type: Cloud.Machine
properties:
NetworkProfileType: EXTERNAL
Infoblox.IPAM.createFixedAddress: true
Infoblox.IPAM.createAddressAndPtrRecords: true
Infoblox.IPAM.Network0.aliases: 'www.infobloxdemo.com, blog.infobloxdemo.com'
Infoblox.IPAM.Network0.dnsView: view1
Infoblox.IPAM.Network0.Domain: infobloxdemo.com
Infoblox.IPAM.Network0.comment: 'created by VMware Aria Automation'
image: CentOS
flavor: small
name: test-vm-2
constraints:
- tag: infoblox
networks:
- network: ${resource.Cloud_Network_1.id}
assignment: static

Provisioning a VM Using a Customization Specification

You can utilize the VM customization specification to set up DNS servers and DNS search paths in VMs. However, these configurations may be replaced if the identical properties are specified in the network DHCP options in NIOS.
To apply a customization specification to the provisioned VM, use the customizationSpec cloud machine property within the template:
formatVersion: 1
resources:
Cloud_Network_1:
type: Cloud.Network
properties:
constraints:
- tag: infoblox
networkType: existing
Cloud_Machine_1:
type: Cloud.Machine
properties:
NetworkProfileType: 'EXTERNAL'
customizationSpec: Linux
Infoblox.IPAM.createFixedAddress: true
Infoblox.IPAM.createAddressRecord: true
Infoblox.IPAM.Network0.Domain: infobloxdemo.com
Infoblox.IPAM.Network0.dnsView: view1
image: CentOS
flavor: small
name: test-vm-3
constraints:
- tag: infoblox
networks:
- network: ${resource.Cloud_Network_1.id}
assignment: static

Provisioning a VM with Two Network Interface Cards

The Infoblox.IPAM.NetworkX property supports using a discrete value for each network interface card of a VM in the cloud template.
For example, Infoblox.IPAM.NetworkX.dnsView can have a different value for each network interface card as shown below:
formatVersion: 1
inputs: {}
resources:
Cloud_Network_2:
type: Cloud.Network
properties:
constraints:
- tag: infoblox2
networkType: existing
Cloud_Network_1:
type: Cloud.Network
properties:
constraints:
- tag: infoblox
networkType: existing
Cloud_Machine_1:
type: Cloud.Machine
properties:
NetworkProfileType: EXTERNAL
Infoblox.IPAM.createHostRecord: true
Infoblox.IPAM.Network0.enableDns: true
Infoblox.IPAM.Network1.enableDns: true
Infoblox.IPAM.Network0.enableDhcp: true
Infoblox.IPAM.Network1.enableDhcp: true
Infoblox.IPAM.Network0.dnsView: view1
Infoblox.IPAM.Network1.dnsView: view2
Infoblox.IPAM.Network0.Domain: infobloxdemo1.com
Infoblox.IPAM.Network1.Domain: infobloxdemo2.com
image: CentOS
flavor: small
name: test-vm-4
constraints:
- tag: infoblox
networks:
- network: ${resource.Cloud_Network_1.id}
assignment: static
- network: ${resource.Cloud_Network_2.id}
assignment: static

Related content