Post navigation

In this post I’m going to walk you through utilizing the vRO workflow Eric Shanks and I developed for creating a Rubrik 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 Rubrik API, an authenticated session is required. This workflow authenticates with the Rubrik REST API, and returns an authentication token. This token is encoded into a base64 token for use in subsequent REST calls.

How was this workflow coded?

For all the coding details, please see www.theithollow.com. As this is a co-blog series, Eric Shanks is posting the coding details on his blog, and i’m posting the how to here. A list to the entire series can be found here.

You will find the following objects now available to you in Orchestrator:

Workflows

Actions

Configuration Elements

Step 2: Configure REST Operation for your environment (Only required if you didn’t complete this piece in part 2)

Select the “Rubrik_Authenticate” workflow and Edit it.

In the General Attributes section, select the REST Operation

Now select the one you configured for your environment (see Part 2)

Your end result should look something like this:

Step 3: Configure your username and password

Go over to Configuration Elements in vRealize Orchestrator and edit the Rubrik-Login configuration element.

Update the username and password for your Rubrik Appliance. Save and Exit.

Step 4: Test Authentication

Now to enjoy the fruits of our labor! Run the “Rubrik_Authenticate” workflow.

Check the Logs and you should see a result similar this:

Make sure you see a Status code returned of “200”, and a Token returned at the bottom. This is the token that will then be passed out for all additional REST Operations. Without it, none of the future workflows in the series will work.

In this 2nd post of the series on automation Rubrik with vRO, I’m going to walk you through setting up your REST Host and REST Operations in vRealize Orchestrator. This step is required for all subsequent workflows to work.

Step 1: Add your Rubrik 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.

This workflow which comes with vRealize Orchestrator to add your Rubrik Appliance. If like most users, you have more than one Rubrik appliance, go ahead and repeat this process to add all of them.

Go to the Library of vRO Workflows

Expand Library > HTTP-REST > Configuration

Run “Add a REST Host”

Fill in the name, for example “Rubrik Chicago 1”. This will help you identify which Rubrik Appliance you are making REST calls to in the future so it helps to think about it now.

Fill in the URL. This is in the following format “https://yourrubrikdnsnamehere:443″

Connection Timeout – leave this as 30 seconds unless you have a specific reason to change it.

Operation timeout – leave this as 60 seconds unless you have a specific reason to change it.

Select yes for accepting the certificate silently.

Click Next and configure any proxy settings if required.

For Authentication Type select “None”

We use none because we will be creating our own authentication token as part of the REST action elements.

Select No for SSL unless you need to verify X.509 certificate.

Step 2: Add REST Operations

Now that you have your REST Host added, you need to add the REST Operations we are going to use in the subsequent workflows.

Name: Give the Operation a Name. In our case we used “Request-Token from Rubrik”

Template URL: type in “/login“

HTTP Method: Select POST

Click Submit when done.

Here is a screenshot of what your configuration should look like.

2. REST Operation: Get Rubrik VM

Run the “Add a REST Operation” workflow again.

Parent Host: Select the Rubrik REST Host we configured in Step 1

Name: Give the Operation a Name. In our case we used “GetRubrikVM”

Template URL: type in “/vm“

HTTP Method: Select GET

Click Submit when done.

Now we need to update the GetVM workflow we imported to utilize the REST Operation.

Go over to the Rubrik workflows you imported from FlowGrab and Edit the Rubrik_GetVMID workflow.

Go to the General Tab and Update the REST Operation to be the one we just added.

3. REST Operation: Assign VM to SLA

Run the “Add a REST Operation” workflow again.

Parent Host: Select the Rubrik REST Host we configured in Step 1

Name: Give the Operation a Name. In our case we used “Assign VM to SLA”

Template URL: type in “/vm/{id}“

HTTP Method: Select PATCH

Click Submit when done.

As before, we need to update the corresponding workflow.

Go over to the Rubrik workflows you imported from FlowGrab and Edit the “Rubrik_AssignVMtoSLADomain” workflow.

Go to the General Tab and Update the REST Operation to be the one we just added.

4. REST Operation: Assign VM to SLA

Run the “Add a REST Operation” workflow again.

Parent Host: Select the Rubrik REST Host we configured in Step 1

Name: Give the Operation a Name. In our case we used “GetSLADomain”

Template URL: type in “/slaDomain“

HTTP Method: Select GET

Click Submit when done.

As before, we need to update the corresponding workflow.

Go over to the Rubrik workflows you imported from FlowGrab and Edit the “Rubrik_AuthenticateAndGetSLADomainIDs” workflow.

Go to the General Tab and Update the REST Operation to be the one we just added.

Summary:

That’s it, the REST Host and Operations are all configured. We will try to work on a workflow to automate creating these in the future, but for now you are all set for part 3, where we will start utilizing each workflow.

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.

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.

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

As most people know, I work for Ahead, a Partner based out of Chicago. I have been here for over a year and have loved every minute of my time there, continuing to evolve the work my predecessor, Alex Mattson, started here as an Automation/Cloud specialist.

2 weeks ago, we hosted our 2nd Ahead Tech Summit and I was fortunate enough to be asked to present on Building a Highly Automated Hybrid Cloud. The video of my presentation is below.

This is the 2nd year I’ve presented at the Tech Summit, attendance was up and it was an absolute joy. We had more to showcase and I love talking about this. Many customers approached me afterwards and said they really enjoyed the presentation. As always I love feedback and hearing how I can improve, so please post your thoughts in the comments section below.

In addition, as I watched this back, I did want to thank some people who have really helped me grow into a better presenter. When I compared this talk, to my one last year, it feels like it was night and day.

Kim Jahnz – another good friend of mine who I met as a TAM at TransUnion. Kim helped catapult my career, pushing to get me a talk at VMworld in 2013 on Self Healing Datacenter which was extremely successful. The feedback from the customers was great, and I thank you so much Kim for pushing me to do this at a time I almost said no due to other personal commitments.

Sean Sergent – Sean and I worked together in the UK when we developed our own consultancy practice. Thank you for all the leaderships you demonstrated to me and learning by “osmosis” as you once described it. Many of the behaviours I have today are a result of the work we did in the UK.

Adam Cavaliere – my good friend and colleague from Tintri. We worked together at TransUnion and Catamaran. At TransUnion we completed our first presentation together in front of a large audience showing the benefits of VMware. It’s amazing to think how nervous we were there, and now see the things we are doing today. Thanks for being a great friend and being an absolutely pain in the ass when we worked together at TU, but we did achieve great things!

Eric Kaplan – Our CTO at Ahead, who makes sure I remained on track with both of my Tech Summit presentations. Thanks (I think) for always filling up my Trello board with 5 minute meetings. I’m sure I heard that from Chris Wahl once as well.

Justin Lauer – You said one thing to me at dinner last year that I still think about. “I don’t think that nervous feeling you get before you go up for a presentation ever goes away”. I think this says a lot…I think it’s because we care so much and want to achieve great things.

Chris Wahl – 30 minutes sitting with you and getting presentation tips is something I hope to do again.”Don’t say so!”

Alex Mattson – Thanks for recommending me to Ahead. I loved our lunches and chats about Automation when we were at Catamaran. Many of those discussions and ideas we had floating around have helped shape the process we have today.

Rob Warren – Thank you for your amazing leaderships and rules to live by. Everything has a standard. There’s a standard for everything. Standardize, Procedurize, Automate…enough said 🙂

Frank Denneman – For minor tips, and recommending to me that I don’t orange drink juice the morning of my VMworld presentation.

Doug Barnes – For your amazing attention to detail when we started out in Automation and being a great friend. Would not be where I am today in this space if I hadn’t worked with you in the beginning.

Nick Rodriguez – For the 16 revisions you worked on with me to make an amazing PowerPoint deck.

Plus everyone at Ahead and many others. Definitely did not get this far alone, and I’m very pleased to be able to go on stage and present about the things I love to do in this space.

Every now and then a technology on a storage array gets me really excited. When Adam Cavaliere showed me Sync VM last month I was impressed. After talking about it and showing it to customers, they were very interested. More specifically they wanted to see it automated, and in vRealize Automation.

In this part (5a), I will explain how to use the vRO workflow I’ve created which is available on FlowGrab along with the others in this series. In part 5b I will be showing how to integrate this vRO workflow with vRA, to offer it as a day 2 operation.

Pre Requisites:

1. Completed Part 3 verifying that you can get a Tintri UUID from a virtual machine.
2. Have a source and target virtual machine in vCenter with the same disk configuration upon which you want to sync.
3. Download the latest Tintri Workflow Package I created and uploaded to FlowGrab.

Important!

Do not execute this vRO workflow without an understanding of SyncVM. The code in this example replaces 3 disks (SCSI 0:1, SCSI 0:2, SCSI 0:3 to be precise). If you need to use alternate disk configurations, then you will need to adjust the parameters and action item to compensate. Please post questions if you are unsure how to do this, but this assumes a good understanding of vRealize Orchestrator.

FG-Tintri-SyncVM – This is a new vRO workflow which has an action containing the rest command to sync 2 VMs. (Again, this syncs SCSI 0:1, SCSI 0:2, and SCSI 0:3)

Running FG-Tintri-SyncVM by itself, you can see this requires the RestHost, SessionID, and a snapshot UUID from the source VM, as well as the Tintri VM UUID from the target VM.

In FG-SyncVMExample I use the modular components built previously to retrieve all the information required to initiate a Sync VM operation.

The process is as follows:

Create Rest Session

Tintri Snapshot the Source VM in order to get the latest data.

Get the Tintri VM UUID

Snapshot the VM

Get the Snapshot UUID for the latest snapshot

Get the Tintri VM UUID for the target VM

Shutdown the Guest OS (This is because if you initiate a sync VM via REST API it will do a hard power off of the virtual machine.)

Initiate SyncVM now that we have the UUIDs we needed.

Power back on the target VM.

Step 2: Run the workflow!

Select your REST Host, type in a sample name for the snapshot (this could obviously be set as a general attribute or automatically generated in the future), select your source VM and target VM from vCenter…and off we go!

Step 3: End Result

Login to your Tintri VM Store and you should see a message on the target VM indicating that synchronization is complete.

vRealize Orchestrator will also show logging to indicate the Sync VM operation was successful.

What’s next?

Hopefully this workflow helps. I would recommend adapting the actions and workflow to your use cases. i.e. which disks to sync? How many VMs do you want to sync to?

In the next post I’ll be demonstrating how you can add this capability to vRealize Automation as a Day 2 Operation you can present to Software Development and QA teams in order to get the latest data.

This past Saturday I was very pleased to pass my VCP6-Cloud exam. More specifically exam VCPC-610. I thought I’d give my general thoughts and tips for anyone about to take it. I honestly found google searches and forum posts to be limited, but that’s probably just because these exams have all been updated recently, and no doubt aren’t as main stream as the VCP-DCV versions.

First of all, I’d have to say the blueprint is massive. VMware clearly wants you to not just know vRealize Automation (vCAC), but all of the products that connect into the SDDC. At times it can seem like a bit of a sales pitch, but I highly recommend you don’t spend all your time focusing just on vRA. I read the NSX Administrators guide the day before the exam and I was glad I did. I think it may have also helped to take the VCP-DCV exam, or at least have studied for it before. This would have had the added benefit of giving me an up to date VCP-DCV certification while also preparing me for the VCP6-Cloud exam. I previously have held a VCP4 and VCP5 so thankfully this all seemed very familiar, but there were definitely a few questions on storage paths that I scratched my brain on for a while before committing to an answer.

I’d say overall there’s a good mix…and it probably goes something like this:

vRealize Automation – 50% – The main focus of the exam, but make sure to cover the other areas below.

NSX – 10% – Make sure you know how to configure the appliance and how it ties into vRA. Knowing SNATs and DNATs was essential. I was happy last week that my colleague, Tim Curless, had just completed a new NSX Multi Machine blueprint in the Ahead vRA lab which we had been talking about.

vCloud Connector – 5% – I didn’t study up enough on this but there were some questions around it that I have no idea if I got right or not.

vRealize Orchestrator – 5% – more just how it relates to vRA. Know how to connect stubs to vRA, and how to configure an advanced service and you’re good to go.

vSphere – 25% – Definitely a big chunk on vSphere including performance, troubleshooting. There were a lot of questions around DVS and host failures. Usual stuff on how to restore a vmnic to get management back. Nothing that was crazy difficult except the odd question they throw in to stump you.

vCOPs – 5% – Some questions around troubleshooting and performance. I’d say this was the part I didn’t spend any time on really and I got away with it.

All I can really add is just make sure you study the blueprint and make sure you’ve spent considerable amount of time in vRA. I highly recommend going over the IaaS guides in great detail as well. Not only did it help me fort he exam, but I definitely learned about some new updates that had passed me by.

My reading material…

Overall great exam. VMWare did a nice job making sure you have all the fundamental knowledge across all their products, and not just vRA.

Please respond and share your experience! Would love to know how others felt about the exam, and if you’ve taken the VCAP Cloud certs yet?

In this section I’m going to walk through utilizing the workflow I created to initiate a Tintri Snapshot on your Virtual Machine.

Pre Requisites:

1. Completed Part 3 verifying that you can get a Tintri UUID from a virtual machine.
2. Have a Virtual Machine in vCenter which is running on the Tintri VM Store.
3. Import the latest Tintri Workflow Package I created and uploaded to FlowGrab.

The Tintri Snapshot

It would take far too long to go into all the details of snapshots and how they work, so instead I’m going to refer you to this PDF from Tintri. This gives a detailed overview.

However, to be a little more clear, the workflow we are executing here is going to complete the equivalent of selecting a VM in the Tintri GUI and selecting “Take snapshot…” as shown in the image below.

Note, that these snapshots will NOT appear in the vSphere client UI. This is expected.

If we want to view all the Tintri snapshots upon the VM, we can also select “View snapshots”, and the list will be displayed.

Executing the snapshots with vRO

So we have a great feature within Tintri, but we don’t really want to go to the Tintri UI every time. By having the vRO workflow, we can execute them directly from within vCenter or as a Day 2 action within vRealize Automation.

After importing the package you should see some additional vRO workflows and actions.

As you can see there are 2 SnapVM workflows. The “FG-Tintri-SnapVM” workflow just encapsulates the action “tintriSnapVMfromUUID”. The 2nd workflow “FG-Tintri-GetUUIDandSnapVM” combines all the workflows from Parts 2 and 3 to create the REST session and get the Tintri UUID. As a general rule I try always create the “lego brick” workflow, and then create a larger workflow to wrap all the pieces I need. I include them both, as there may be creative workflows you want to create and need to do multiple snaps etc.

Step 2: Run the workflow

Run the vRO workflow and put in your REST Host, VM, and Snapshot name.

Check the logs to verify you received a successful snapshot creation.

The number that is returned at the end is actually the Snapshot UUID from Tintri. If you login to Tintri you should see your snapshot listed in the GUI.

In addition if you browse to “https://YourTintriIP/api/v310/vm” you will see this listed as the current latest snapshot for your virtual machine.

That’s it. You can now successfully Tintri snapshot your VMware Virtual Machines using vRO! At the end of the series I’ll be showing how to add these to vRealize Automation as Day 2 Actions.

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:

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

In Tintri we have the same VM

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.

Step 1: Import the package you downloaded from FlowGrab

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

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.

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.

Step 3: Run the workflow

Run the workflow and select a Virtual Machine.

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

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.

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.

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.

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!