Overview
This article will cover the method of creating OneFuse IPAM Policies using templated properties driven by OneFuse Static Property Sets (SPS).
Considerations
Simplifying the OneFuse Platform to use a single IPAM Policy is one method of calling a specified network driven by other properties from the request inputs. This use case is just one possible implementation.
Procedure
Plan the Blueprint User Driven Inputs
User driven inputs are items that are selected on the vRealize Automation 8 Blueprint canvas. These can be inputs already driven by Custom Naming.
Property Name | Description |
---|---|
{{ Env }} | Production or Development |
{{ ProjectCode }} | Unique 3 letter Project Code |
The properties for Naming will be used to drive a specific Static Property Set which will contain other properties for the IPAM Policy.
Plan the OneFuse IPAM Policy Subnet and DNS Properties
The IPAM Policies can be templated with properties instead of being hardcoded.
Property Name | Description |
---|---|
{{ gw }} | Templated Gateway |
{{ subnet }} | Templated CIDR Subnet |
{{ machineNetwork }} | Templated VMware Network |
{{ mask }} | Templated Netmask |
{{ dns1 }} | Templated Primary DNS Server |
{{ dns2 }} | Templated Secondary DNS Server |
{{ Domain }} | Templated DNS Suffix |
- Navigating to Modules > IPAM
- Click +CREATE and name the new IPAM Policy ipam_policy_templated
Create the OneFuse Static Property Sets
Create the Static Property Sets (SPS) that will be called that contain the IPAM values
- In OneFuse navigate to Templating > Static Property Sets
- Click +CREATE and generate a name that will ultimately be called in the vRA8 Blueprint YAML
- For the items highlighted in RED below in the Static Property Set JSON Values; insert the OneFuse connection name created during the OneFuse setup (see – https://docs.cloudbolt.io/articles/#!onefuse-upstream-platforms-latest/vmware-vrealize-orchestrator-8-vro-package-onefuse-configuration)
- Additionally, the values assigned for each OneFuse_ properties will refer back to the Policy Name configured from the previous steps
Static Property Set Name | Static Property Set JSON Values |
---|---|
Production |
|
Development |
|
In the above JSON values, you can see that the {{ Domain }}
property is passed directly in the SPS group, assuming that a Production build would be assigned a different DNS Suffix compared to Development build
Create the vRealize Automation 8 Cloud Template
Create the Static Property Sets(SPS) that will be called that contain the IPAM values
- In vRealize Automation 8, create a new Cloud Template
- Inject the following Blueprint YAML code into the canvas
name: IPAM Templated
version: 1
formatVersion: 1
inputs:
machineCount:
type: integer
default: 1
title: Number of Machines
minimum: 1
maximum: 5
Environment:
type: string
enum:
- Production
- Development
Project_Identifier:
type: string
maxLength: 3
resources:
Cloud_Machine_1:
type: Cloud.Machine
properties:
image: centos7
flavor: Small
count: '${input.machineCount}'
Env: '${input.Environment}'
ProjectCode: '${input.Project_Identifier}'
OneFuse_PropertyToolkit: 'onefuse_8081:true'
OneFuse_SPS_Build: '${input.Environment}'
Execute a Deployment in vRealize Automation 8
Execute a deploy action and select the differentiating Env Input to confirm they build to the appropriate networks
- Use the Inputs for the Environment to define the target SPS policy which will assign the appropriate network properties
- The Resulting Deploys will have VMs in each specified network