Automating Rubrik with vRealize Orchestrator Part 1: Introduction

Rubrik_Lab2

After seeing Rubrik be unveiled at VFD5 this year, a lot of us were very excited to get our hands on the gear. We were impressed by the simplicity and easy access to REST APIs which meant this was another product which deserves some VMware vRO Workflow attention.

Working with my colleague Eric Shanks, along with Chris Wahl at Rubrik, we decided to build a vRO workflow package to automate some of the key tasks. Thankfully our Backup specialist John Affatati already had an appliance racked in the Ahead lab and we were able to get up and running quickly!

Eric and I split the work up, and as such this is a co-blogger series. For information on where to get the workflows and how to get them up and running, you will find those posts here on Systems Game. For a deeper dive into how the REST calls were created, Eric is posting those on his blog at www.theithollow.com.

So let’s begin!

For starters. Make sure you go over to FlowGrab and download our vRO workflow package we published. This contains all of the workflows/actions/configuration elements which will be discussed in the series. All of the code is provided Open Source and is freely available for you to modify.

The series, and workflows are broken down into the following posts:

  1. Introduction – This post
  2. vRO REST Configuration for Rubrik
  3. vRO Workflow: Authenticate with Rubrik
  4. vRO Workflow: Get Rubrik VM information
  5. vRO Workflow: Get Rubrik SLA Domain IDs
  6. vRO Workflow: Assign SLA Domain to Virtual Machine

Following the conclusion of Part 6, I will then show how you can integrate this into vRealize Automation (or any Cloud catalog), so that you can give your users a backup choice when they are requesting new virtual machines.

rubrikvra

Enjoy, and as always please provide Eric and I as much feedback as possible.

Automating Tintri with vRO Part 3: Get UUID from VMware Virtual Machine

In this section I’m going to walk through utilizing the workflow I created to get the Tintri UUID from a VMware Virtual Machine.

Why do I need this workflow?

In order for us to be able to perform any actions against VMs from the Tintri perspective, we need to know the UUID of the VM. This workflow allows us to get it.

Pre Requisites:

1. Completed Part 2 verifying that you can create a session to your Tintri VM Store and are able to return a JSESSION ID.
2. Have a Virtual Machine in vCenter which is running on the Tintri VM Store you tested in Part 2.
3. Import the latest Tintri Workflow Package I created and uploaded to FlowGrab.

What is the Tintri UUID?

The Tintri UUID is the unique object identifier for which we need to reference when performing any Tintri operations against the Virtual Machine. This is how Tintri sees the virtual machine as opposed to VMware which uses the Managed Object Reference for the vCenter object.

For example, in VMware we have this VM:

demovm

If we look in vRealize Orchestrator, you can see that the Managed object reference for this VM is:

demovmvRO

In Tintri we have the same VM

demovmTintri

If we take it a step further and look at the Tintri API in your browser, you will see that Tintri has both values for the VM. The VM MOR, and the Tintri UUID. Our goal here is to get the Tintri UUID, so we can perform REST operations against it, like Snapshot, Replication, and Sync VM which are in the next set of posts.

tintriuuid

Step 1: Import the package you downloaded from FlowGrab

Once imported you should see some additional vRO workflows, and Actions.

newworkflows

Step 2: Take a peak inside the workflows

If you look in the workflow for Tintri-Session and Get UUID you will notice that this workflow includes the workflow from Part 2a for Creating the session as well as the other workflow we just imported.

sessionuuidworkflow

We first run the Create Session workflow, store the JSESSIONID as a general attribute, and then run the GetUUID fromVM workflow using the JSESSIONID we stored from the previous workflow.

visualbinding1

 

visualbinding2

Step 3: Run the workflow

Run the workflow and select a Virtual Machine.

runworkflow1

Check the logs and make a note of the MOR and UUID.

workflowrunlogs

Take a look in vRO at the VM from the inventory view and should see the Managed object reference matches the VM you selected.

Take a look in the Tintri API from your browser, and do a search for the MOR. You should see the matching Tintri UUID there as well.

What now…

Now we are able to successfully get the UUID, we can start to perform Tintri actions upon the VM using vRO. In the next part of the series we will be going through executing a Tintri Snapshot on the VM.

Part 4: vRO workflow: Tintri Snapshot a Virtual Machine – coming Tuesday May 26.

 

Automating Tintri with vRealize Orchestrator Part 1: Let’s begin!

Welcome to part 1 of my series on Automating Tintri with vRealize Orchestrator.

I’m sure almost everyone visiting my blog knows how awesome Tintri is so I’m not going to go into details of the product. In short, I love it because it’s simple and clones VMs incredibly fast.

The other hidden gem about Tintri is that there very well documented REST API allowing us to do all sorts of nice automation without having to click through the GUI. Recently Tintri announced Sync VM which got me really excited. I love all things DevOps, and when I was talking with Adam Cavaliere and other SQL server Engineers, they immediately saw amazing potential for this. After speaking with a few of my customers who had vRealize Automation, they really loved the idea of being able to have Day 2 Operations for tasks like Snapshotting their VM, and were even more excited about Sync VM and how that could be used.

So after further discussion, we decided to build a vRealize Orchestrator Package including actions, workflows, and all awesome stuff for using Tintri. In this series I’m going to walk you through how I built the package, and how you can use it.

The following workflows are included:

Tintri-CreateSession – Creates a REST Session with your Tintri VMstore. This is needed for all subsequent workflows.

Tintri-GetUUIDfromVM – Allows you to select a Virtual Machine from vRO, and will return the corresponding Tintri UUID. This is needed to perform any actions against Tintri objects.

Tintri-SnapshotVM – Utilizes the 2 workflows above, and then creates a Tintri Snapshot of your VM.

Tintri-SyncVM – Magical! Takes a Source VM and TargetVM, then syncs the VMDKs underneath. Tintri does all the heavy lifting. Check out a great video on this technology at https://www.tintri.com/blog/2015/05/tech-tuesday-manage-data-syncvm-video.

Tintri-ReplicateVM – Also magical! Enable Tintri replication on a VM for DR purposes.

As I release the workflows throughout the series, you will be able to find them on Flowgrab via the SystemsGame Page. If you aren’t already familiar with FlowGrab, I highly recommend you check it out. It’s a great place for sharing workflows with the vRealize Orchestrator community.

Finally, a big thank you to Adam Cavaliere for coming up with these cool ideas and working out all the kinks for the REST API calls in Python first. If you want an expert on Tintri, definitely contact him!

Next: Part 2 – Create REST Session