Automating Rubrik with vRO Part 2: Setup Rubrik REST Host

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”

auth

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.

1. REST Operation: Request – Token from Rubrik

  • Go to Library > HTTP-REST > Configuration > Run “Add a Rest Operation”
  • Parent Host: Select the Rubrik REST Host we configured in Step 1
  • 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.

restlogin

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.

getVM

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.

Screen Shot 2015-08-27 at 9.34.52 AM

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

getvmupdate

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.

assignvmtosla

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.

Screen Shot 2015-08-27 at 9.40.13 AM

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

Screen Shot 2015-08-27 at 9.39.53 AM

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.

GetSLADomain

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.

Screen Shot 2015-08-27 at 9.41.37 AM

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

Screen Shot 2015-08-27 at 9.41.42 AM

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.

Don’t forget to check out www.theithollow.com by Eric Shanks for details on how we created all of the workflows and actions.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>