Morpheus vRealize Orchestrator Integration

By: Morpheus Data

VMware vRealize Orchestrator is an automation and orchestration platform commonly used to automate VMware vSphere environments. The Morpheus vRealize Orchestrator integration enables organizations to take advantage of existing investments made in the development of vRealize Orchestrator workflows. This allows vRealize Orchestrator workflows to be used as part of Morpheus provisioning workflows, day 2 operations and operational workflows.

Technical Overview

The integration presents VMware vRealize Orchestrator workflows as Morpheus tasks that can be then stitched together with other automation as part of a Morpheus workflow. The diagram below shows how a vRO workflow is called as part of an instance provisioning workflow alongside a PowerShell script.

https://docs.morpheusdata.com/en/latest/integration_guides/Automation/vro.html

Morpheus vRealize Orchestrator integration overview

Integration Walk Through

Now that we have an idea of how the integration works, we’ll dive into an example use case. We’ll look at triggering a vRO workflow during a vSphere VM provisioning operation. In this case we want to add custom notes or an annotation to the virtual machine that lets vSphere admins know the VM is managed by Morpheus.

Configure the vRealize Orchestrator Integration

The first thing that we need to do is configure the Morpheus vRealize Orchestrator integration. The integration supports standalone and vRA embedded appliances. Specify the appropriate port (8281 or 443) that the vRO API endpoint is accessible over. Basic, Oauth 2.0 and vRA authentication methods are supported.

Morpheus vRealize Orchestrator integration configuration dialog

vRealize Orchestrator Workflow Schema

The Morpheus vRO integration triggers vRO workflows using the REST API endpoint and the vRO API requires a JSON payload containing the values of the input parameters for the workflow. In order to get the exact payload required for the workflow we’ll use a previous workflow execution.

Workflow ID

The first piece of information we need is the ID of the workflow that we want to trigger. The ID number of a workflow can be found on the workflow’s summary tab in the vRO web interface.

Execution ID

The second piece of information that we need is the ID of a previous workflow execution. The ID number of a previous workflow execution can be found on the general tab of a previous workflow run in the vRO web interface.

Retrieve JSON Input Schema

With the necessary pieces of information we are now able to craft the API endpoint needed to retrieve the input parameter schema needed by Morpheus.

https://vro_appliance_fqdn/vco/api/workflows/workflow_id/exeutions/execution_id

Using the details gathered from our example workflow we end up with the following URL to query the input parameters JSON schema.

https://demovro01.morpheusdata.com/vco/api/workflows/18515f12-6d40-414d-a730-32a112bdc7f4/executions/91c29c9d-4446-454d-bbf9-d3f1d8f2e3dd

The endpoint can be queried using CURL or Postman and the returned JSON payload should contain an input-parameters section which is exactly what we need for our Morpheus payload.

 "input-parameters": [
{
"value": {
"string": {
"value": "demovm"
}
},
"type": "string",
"name": "vm_name",
"scope": "local"
},
{
"value": {
"string": {
"value": "Testing Morpheus"
}
},
"type": "string",
"name": "notes",
"scope": "local"
}
],

Morpheus Task

We are now ready to create the Morpheus task that will be tied to the vRO workflow. The Morpheus integration provides a drop-down to select the desired workflow but we need to create a JSON payload for the workflow parameters. We’ve taken the value of input-parameters returned by our vRO api call and changed the key name to just parameters. The workflow accepts vm_name and notes parameters. We’ve specified the instance.name Morpheus variable as the vm_name parameter to dynamically pass the name of the instance during provisioning. The notes parameter has been hardcoded to “Managed by Morpheus” for simplicity. Additional instance variables can be passed as parameter values, variable details are found in the Morpheus variables documentation (https://docs.morpheusdata.com/en/latest/troubleshooting/Variables_Examples.html#common-examples).

{
"parameters": [
{
"value": {
"string": {
"value": "<%=instance.name%>"
}
},
"type": "string",
"name": "vm_name",
"scope": "local"
},
{
"value": {
"string": {
"value": "Managed by Morpheus"
}
},
"type": "string",
"name": "notes",
"scope": "local"
}
]
}

We specify the Morpheus task name, the vRO integration, the vRO workflow and the JSON payload.

Morpheus vRealize Orchestrator integration task

Morpheus Provisioning Workflow

With our task created we’re now ready to add it to a Morpheus provisioning workflow. Similar to workflows in vRealize Orchestrator, Morpheus workflows allow us to stitch together separate tasks into an orchestrated operation. We’ll add the Add VM Notes task into our Morpheus provisioning workflow.

Morpheus workflow creation dialog

Provision Instance

With the Morpheus Workflow created, we’re ready to use the workflow during the provisioning of an instance. There are two options for assigning the workflow, statically to the instance or dynamically during provisioning. Workflow assignment is dynamic in this following example.

Morpheus workflow selection

Once the virtual machine has been successfully provisioned we should be able to view the updated VM notes in the vSphere UI.

vSphere virtual machine notes

Conclusion

In this post we walked through how the Morpheus vRO integration works and how to configure it. We walked through an example of how to integrate vRO as part of a Morpheus provisioning workflow. vRO workflows can also be used as Morpheus operational workflows for XaaS as well as for virtual machine day 2 opeations.

Try Morpheus Community Edition
The Morpheus Community Edition lets you fully experience the Morpheus platform including nearly all features and capabilities! Register at Morpheus Hub and try it in your home lab or test environment today!

Interested in learning more about Morpheus? Schedule a demo to walk through how Morpheus can help your organization here.

Related Resources

  • card listing image
    Apr 2024 | Solution
    Morpheus Orchestration for Edge Computing
  • card listing image
    Apr 2024 | Webinar
    Tech Brief: What’s New in Morpheus 7.0
  • listing image
    Apr 2024 | Product
    Morpheus Token Catalog
  • card listing image
    Mar 2024 | Video Demo
    Morpheus Minute: Using AWS Host IAM Credentials in Morp...
  • card listing image
    Mar 2024 | Webinar
    Tech Brief: Building a K3s Kubernetes Cluster with Morp...
  • listing image
    Mar 2024 | Blog
    NEWS: Hypervisor Independence from Broadcom and VMware
  • listing image
    Mar 2024 | Blog
    Examining VMware license changes in a Broadcom world
  • card listing image
    Mar 2024 | Video Demo
    Morpheus Minute: Checks
  • card listing image
    Feb 2024 | Webinar
    Tech Brief: Deploying an OVA Appliance in Morpheus
  • listing image
    Feb 2024 | Blog
    Reduce risk from the Broadcom acquisition with VMware a...