When you have vRealize Automation in place to deploy applications, vRA is the source of truth when it comes to the application landscape. It makes sense to treat it that way, and not have other products (like vRealize Operations or vRealize Network Insight) have to discover those newly deployed applications on their own. Which is what this post is about!
Before you continue, I’ll not be going too deep into vRA, vRNI, or the Extensibility in vRA that makes this happen and assume you know the basic of those products and features. This post explain how to get your vRA deployments automatically added into vRNI.
vRA Extensibility Action
In VMware Cloud Assembly, under Extensibility and Actions, add an Python action using this script: https://github.com/vrealize-network-insight/vrni-vra-integration/blob/main/abx-vrni-vra-integration-create-application.py.
A few things to take into consideration:
- Give the action a recognizable name
- Add “requests” into the Dependency field
- Define an encrypted Action Constant called vrni-csp-api-token, with as value a CSP API token that’s generated with the permissions: VMware Cloud Assembly Viewer and vRealize Network Insight User.
The action configuration should look something like this:
Adding an Event Subscription
After the action is added, a subscription is what makes the action run. In this case, you’ll want to create a Subscription for the Event Topic: Deployment completed and add the newly created action as the Action/workflow. You can also use the Condition field to limit the action to a specific cloud template, or a project, or anything. I wanted to only run it when a specific cloud template is deployed and ended up with this configuration:
Deploy!
Now, deploy a cloud template and see the magic happen. After a deployment is complete, the action wil run and log its steps in the Extensibility -> Activity -> Action Runs page. Open up a run and take a look at the Log tab on the right.
When you look at vRNI Cloud, you’ll also see the application that was created:
Leave a Reply