vRealize Automation Custom Forms Introduction

With the release of vRealize Automation 7.4 came a feature called ‘Custom Forms’. With custom forms you can easily enhance the old and inflexible (.NET based) request forms in vRA. You can now do things like show elements based on conditional logic, put constraints on input values, custom help text and error messages, apply CSS formatting to your forms and much more cool stuff. And the beauty is that this can be applied to your existing blueprints without the hassle of using XaaS as front-end.

In the past some form of enhancement was available thought the use of XaaS blueprints, but this required more than standard knowledge of both vRA and vRO. With custom forms a lot of the complexity that was required has gone away.

How to get started

Lets have a look at what we have now and where we can start with the new custom forms.

As you can see I have a very simple Ubuntu deployment here but there are a lot of options to fill out and they are spread across different locations. Some of which I might not even want, like Reason for request. There is no way to get rid of that with the current request forms. Also notice that the choose host is an extra option I created through the use of custom properties and adding these in my blueprint. While this is not an option you might use a lot in regular environments it is pretty useful in my small home lab environment.

Now if we want to transform this into a much better looking request form we should enable the custom form for this blueprint. To do this go to the design tab and then blueprints. Here you will find some new elements.

When you click on the Custom Forms menu button you can choose Edit to begin. You will be presented with an empty custom forms editor.

I will start with the more basic elements such as a text box that gives the user some general info, number of CPU’s, Amount of memory and that host picker.

The General info text box shows some informative text to the end user.

For the Memory field I changed the increments in which you can increase the memory size. This way, if you want to increase your memory from 1 GB to 2 GB you just need to click the up-arrow once.

And for the host picker I created a value|label drop-down list. In the backend the custom properties defined in the blueprint will handle these host names for placement in my home lab (VirtualMachine.Admin.ForceHost and VirtualMachine.Admin.HostSelectionPolicy).

Once I’m done all I need to do to activate the custom forms is use the slider in the top right corner and save and finish this form.

Because this was an existing blueprint that was already published and entitled I just need to request this blueprint from the catalog to see the new custom forms in action.

Now this is of course still a pretty simple looking form but you can already tell that the custom forms editor can do a lot of cool stuff.

Building out the form

Lets say you have a production and test environment and you want to have different characteristics on your deployments, you could use multiple different ways to accomplish this and custom forms is now one of them. You could use it to make additional options available to the user deploying the blueprint when a certain environment is chosen. Or you can fill in different defaults based prod or test. Lets have a look at what I have done to the Ubuntu blueprint.

As you can see I have added some elements. The first one is where you can choose between production and test. This is just another drop down list with some key|value pairs. I will use these values later to influence the other elements.

With the environment values in place we can tie these to other elements. You can now for instance  populate the network selection element to fill in the correct network. To achieve this I have used conditional values for the network selector.

So basically what this does is check the value of the environment element and based of what it is set to it changes the default value of the network selector.

The last part of the form is the exclude from monitoring check box. I wanted this check box to only be visible when the test environment is chosen. So in this case the appearance of the check box is related to what environment is chosen.

With everything setup the way I want lets see the deployment with custom forms in action.

Conclusion

What I have shown today is just the tip of the iceberg. There is so much more you can do with this powerful new feature. Think about styling your forms with CSS or tying it into vRO to use external values. And besides giving a more consistent experience to service architects in designing infra and application catalog items it looks very nice as well.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.