In this post I’m going to walk you through utilizing the vRO workflow I’ve developed for creating a Tintri session over REST. This is the first workflow in the series, and without it, none of the subsequent workflows can be utilized.
Why do I need this workflow?
In order to complete REST requests against the Tintri API, an authenticated session is required. This workflow authenticates with the Tintri REST API, and returns the JSESSION ID. This JSESSIONID variable is then utilized for each of the REST requests in the next set of operations.
1. Tintri VM Store Configured and accessible via REST
2. vRealize Orchestrator installed and configured
3. Download the vRO workflow package from Flowgrab
Step 1: Add your Tintri REST Host
First of all make sure you have the vRealize Orchestrator REST plugin installed. The REST plugin should have been configured automatically when you installed vRealize Orchestrator.
Run the “Add a REST host” workflow to add your Tintri VMstore. If like most users, you have more than one Tintri appliance, go ahead and repeat this process to add all of them.
Choose “No” for Use Proxy
Choose “None” for Host’s authentication type
If everything is successful, you should see your Tintri Host listed in your inventory list.
Step 2: Import the Tintri vRO workflow package
Import the workflow package you from Flowgrab.
You will find the following objects now available to you in vRO:
The FG-Tintri-CreateSession workflow uses the action and configuration elements discussed below.
Right now, you will only see the tintriGetSession action item highlighted below. This is the action item which returns the JSESSIONID.
The configuration element was created to store the Tintri UserName as opposed to storing it directly in the vRO workflow as a general attribute.
Edit the Tintri-ConfigurationElement
Select the attributes tab, and input your password for the admin account.
Step 3: Run the workflow and verify we can create a session!
Now for the fun part! Run the FG-Tintri-CreateSession workflow.
Select your REST Host and click submit.
Check the logs and verify you got a status code of 200 which verifies the session was successfully created, along with the JSESSIONID.
Congratulations, you were able to successfully authenticate with your Tintri VM Store using the REST API.
Part 3: vRO Workflow: Get a Tintri UUID from vCenter VM Object – scheduled for 05/20 – stay with me!
This next workflow allows us to select a Virtual Machine from vRealize Orchestrator, and returns the UUID from Tintri.
Part 2b: Tintri-CreateSession vRO Workflow Code – Go here if you want to see the code and how this was all created – scheduled for 05/21 – stay with me!