Custom Options for vRealize Automation Server Requests
March 30, 2015vRealize Automation is a great way to allow teams to deploy virtual machines and manage them throughout their entire lifecycle. You can control exactly where you want the machines deployed and the processes that must happen in order to meet company guidelines. Sometimes, you’d like to give some additional options to the end user when they deploy a machine. To do this, we can use a custom property.
Build a Property in the Property Dictionary
To start, lets build a new property in the property dictionary. To do this, go to the Infrastructure Tab –> Blueprints –> Property Dictionary. From there, we can add a “New Property Definition”. In the example below I’ve created a very generic “HollowTestProperty” and left the display name the same. A description is always a good idea and the Control Type I changed to “DropDownList”. This will mean that we can enter a series of values to be selected by the end user at the time of the request. Be sure to click the green check mark to save the entry.
Once you’ve added the property definition. Click the “Edit” hyperlink under property attributes. This will allow you to add the list of values that should show up in the drop down list. Select Value list as the type, and give the attributes a name. Lastly, enter the values that should show up in the drop down list, separated by a comma. Again, be sure to click the green check mark to save the entry.
Next, add a new property layout. Enter a name for the layout and a description. Click the green check mark to save the layout.
Once you’ve saved the layout, click the “Edit” hyperlink under property instances. Select the property definitions that are part of the layout.
Create a Build Profile
Now that we’ve got the property created, we can build a new build profile. Go to Infrastructure –> Blueprints –> Build Profiles. Give the profile a name and then under properties add a new custom property. The name should match the new custom property that you created earlier. Leave the value blank as it will be selected by the end user, but be sure to click the check mark under “Prompt User”. And yes, click the green check mark to save the custom property.
Create or Modify the Server Blueprint
Edit any of your server blueprints now and select the Build profile that we’ve created. Save the blueprint andor publish and assign the blueprint to your users as you normally would.
When the end user requests a server from the blueprint, they’ll be prompted to enter a value from the drop down for your new custom property.
Request a Catalog Item
Maybe this doesn’t seem super useful to you, but this value will be passed to vRealize Orchestrator if your blueprint calls a workflow on provisioning. To illustrate, I’ve created a workflow that was called during provisioning that logs all the variable values passed to Orchestrator. You can see that a variable called “HollowTestProperty” has a value of “Maybe”. Perhaps you want to allow the user to select a Gold, Silver or Bronze tier during provisioning and your Orchestrator workflow reads the variable and modifies the virtual machine settings accordingly. This is much more elegant than having to have three separate blueprints just because there are three different places to deploy them to.
Summary
A custom property and a build profile is a great way to customize your server blueprints. If nothing else, it’s a good way to pass additional information over to the vRealize Orchestrator so that additional customizations can be performed.