This page looks best with JavaScript enabled

Chef: vRA – Assigning Node Environment Using Custom Properties

 ·  ☕ 2 min read  ·  ✍️ Brett Johnson

vRA uses Custom properties to help define parameters and the behaviour of requests. In the previous post CHEF: vRA Integration, Property Groups and Blueprints we used custom properties to define the properties of our Chef deployment.

In this post, we look at using custom properties to assign the node environment. The Chef default client deployment workflows form the basis of the examples.

A brief on custom properties

We use custom properties to manipulate many aspects of workflow execution. They can control if an approval policy is required, where a VM is deployed to or credentials for a post-deployment task. How you use them really depends on the requirements for that task.

vRA allows customer property assignment in 7 different locations. Using an order of precedence used to handle conflicts, for more information on locations and precedence check out this post.

Custom properties can be present a learning curve, but get easier with experience.

The Event Broker Service (EBS) sends custom properties to vRO. I have found this post very helpful for troubleshooting EBS workflow functionality.

Assign a Node to an Environment

The workflow ‘EBS – Machine Provisioned – Chef’ assigned the node to an environment using the property chef.environment. We will use this to align our nodes environment to the vRA reservation our VM is deployment.

In my vRA environment, I have configured two reservations policies and two reservations.

vRA-reservations

Edit a reservation and click ‘New’; on the custom properties section. Type the name ‘chef.environment’; and a value. The value you assign needs to match the name of an environment on the Chef server. The property name and value are case sensitive.

The property chef.environment is assigned to both reservations, with values matching Chef environments.

Custom Properties

Chef Environment

The EBS passes the custom property to vRO as a machine property. Which the deployment workflow uses to select the environment. In the example configuration, this provides a link between physical deployment clusters and Chef environments.

The property assigned to the reservation takes precedence over the value set within the property group created in the previous post. Therefore the EBS uses that assignment when sending to vRO.

Summary

Custom properties are a key part of working with vRA and something that you will find yourself relying on for a range of tasks. As we cover more integration scenarios, their importance will increase.

Share on

Brett Johnson
WRITTEN BY
Brett Johnson
Automator of things