In 3 part blog series, I will be demonstrating how to use PowervRACloud with vRA Action Based Extensibility (ABX).
In Part 1, I will show how to write Extensibility Action Script with Event Subscriptions. I will be performing Day2 Operation of Snapshot Creation for a newly provisioned VM by creating an event subscription for the “Compute Post provision” event of my Blueprint to trigger the PowervRACloud ABX action.
What is vRA ABX?
vRealize Automation Action Based Extensibility (ABX) supports Powershell as one the scripting language for writing ABX actions. ABX actions are small, lightweight scripts of code used to specify an action and how that action is to perform
What is PowervRACloud ?
PowervRACloud is a PowerShell module that abstracts the VMware vRealize Automation Cloud APIs to a set of easily used PowerShell functions.
How can you use PowervRACloud with ABX?
ABX actions can be used in the following ways
- Assign it to Event Subscriptions. This will extend and automate the lifecycle of the application/deployment
- Add it as Content Source in Service Broker. This will allow execution of Action independent of application/deployment. This is also known a XaaS
I will be performing Day2 Operation of Snapshot Creation for a newly provisioned VM by creating an event subscription for the “Compute Post provision” event of my Blueprint to trigger the PowervRACloud ABX action.
Procedure to Perform Day2 Operation of Snapshot Creation
The following steps describe the procedure for creating an extensibility action that uses the Onprem FaaS provider in the vRA 8 environment
If you are using vRA Cloud then you will need to Deploy and Configure a Cloud Extensibility Proxy and add Onprem Integration by referring the documentationThis step is NOT required for vRealize Automation deployed on-premises.
Creating Action
Navigate to Extensibility > Library > Actions & Click New Action.
Enter a name for your action and select a project.
Select the Powershell as the action runtime
Select Write Script
First, we will specify the following
Dependencies
@{
PowervRACloud = ‘1.4’
}
Inputs
server - vRA Server Username - Username for vRA Server Password - Password for vRA Server
FaaS provider
Here is the script which you will need to create the snapshot
Create Subscription
The final step is to create a Subscription for the “Compute Post provision” event of my Blueprint to trigger the PowervRACloud ABX action.
To create the subscription navigate to Extensibility > Subscriptions > NEW SUBSCRIPTION.
You will need to select the following
Event Topic - Compute Post Provision
filter condition - event.data.blueprintId == \'blueprintid\'
Action - PowervRACloud-CreateSnapshotAction. This is same we created in previous section
Perform Deployment
Conclusion
As you can see how easily PowervRACloud can integrate with ABX to extend vRA functionalities.
Thank you for using PowervRACloud. Please reach out on Twitter if there are any queries
What\’s next?
In Part 2, I will show how to write Extensibility Script and use it as Service Broker Catalog Item. I will create Deployments Report and send an email notification.