Skip to main content
Pure Technical Services

vRealize Orchestrator 8 User Guide: Workflows

Currently viewing public documentation. Please login to access the full scope of documentation.

KP_Ext_Announcement.png

Workflow Inventory

The Pure Storage Plugin for vRealize Orchestrator offers a significant number of default workflows to provide simple orchestration of VMware and Pure Storage operations.

In the vRO HTML-5 interface, there are a variety of ways to navigate to a workflow, all of which can be accessed via the Workflows page found on the left hand side of the interface.

clipboard_ea0b4c339a317edb2d3bf06362e79791e.png

On the upper right hand corner you can switch through the tile, list, and folder view. This document will primarily use the folder view, but any option is valid and will result in the same workflow behavior.

clipboard_e30bcd362dc8362c87a38698f1248cb89.png

All of the Pure Storage workflows are under Library > Pure Storage

clipboard_eb70b0b5a911767c490688ec972cb919e.png

Pure Storage Workflow Folder Description
FlashArray Connection Management Workflows for authenticating FlashArray or Cloud Block Store targets
FlashArray Host Management Workflows for creating or managing FlashArray or Cloud Block Store hosts and host groups
FlashArray Management

Workflows for FlashArray or Cloud Block Store array-level administrative tasks.

FlashArray Protection Group Management Workflows for FlashArray or Cloud Block Store protection group creation, modification, or destruction.
FlashArray Pod Management Workflows for FlashArray or Cloud Block Store protection group creation, modification, or destruction.
FlashArray Protocol Endpoint Management Workflows for FlashArray or Cloud Block Store pod creation, modification, or destruction.
FlashArray REST APIs Workflows to run custom REST API operations against a FlashArray or Cloud Block Store platform. For features that are not yet integrated (or pulling specific metrics) these workflows can be used.
FlashArray Snapshot Management Workflows for FlashArray or Cloud Block Store snapshot creation, modification, or destruction.
FlashArray Virtual Volumes Workflows focused on FlashArray Virtual Volumes. Configuration, management, replication failover, storage policies, and more.
FlashArray Volume Group Management Workflows for FlashArray or Cloud Block Store volume group creation, modification, or destruction.
FlashArray Volume Management Workflows for FlashArray or Cloud Block Store volume creation, modification, or destruction.
FlashBlade Connection Management Workflows for authenticating FlashBlade targets
FlashBlade REST APIs Workflows to run custom REST API operations against a FlashBlade platform. For features that are not yet integrated (or pulling specific metrics) these workflows can be used.
Pure1 Meta Workflows for authenticated Pure1 Organizations. Tagging, intelligent provisioning, array registration and more.
VMware ESXi and FlashArray Workflows that include workflows from other sections integrated with relevant VMware operations for end-to-end orchestration of a VMware and Pure Storage environment.

 

Running Workflows

One of the most common tasks in vRealize Orchestrator is running a workflow. Whether creating, configuring, modifying, or deleting a resource the workflow is where it starts. Workflows are combinations of scripts, built-in functions calls "actions", logic, and more. The Pure Storage workflows are entirely listed under the Pure Storage folder in the workflow panel. Which is the default tab shown when logging into vRealize Orchestrator.

clipboard_e4b9da58c5b41617cbaa08ccb95775ad4.png

To run a workflow, identify a workflow in the hierarchy, select it, and click Run:

clipboard_e328d6ff86d3b9db688d53921a827570f.png

Workflows most commonly require a selection of inputs, which vary from workflow to workflow. Certain workflows require some or all of their inputs to be filled out before you can complete the wizard. An important benefit of the workflows provided by the Pure Storage Plugin for vRealize Orchestrator is that inputs are actively checked as you enter them to ensure that they are valid choices.

Most Pure Storage workflows that create a resource will require a FlashArray connection--this choice tells vRO what FlashArray they should create the resource on. If you are modifying an existing resource, this input is usually not needed--as the FlashArray can be inferred by the original resource selection.

1) Click to choose a FlashArray 2) Find your desired FlashArray connection 3) Submit it to the workflow
clipboard_ea828e6fca5658161043a0f3de66f374e.png clipboard_e3df29b7e427edebab646f5f0e8851727.png clipboard_e478df14df553c67ee541fe975d493a85.png

Entries can also be radio button, drop-downs, or string boxes (or many more). String boxes are generally checked to make sure the string follows the required parameters (like FlashArray volume naming conventions).

Valid Not valid
clipboard_ef86ecf41a4f0c4a67744d5a13e2992ee.png clipboard_eef1e616197a98c5f2f149a5592655193.png

When you have completed the wizard, click Submit. If the submit button is not active, you have missed or mis-entered an input.

clipboard_e3621245c5ebef5556559d75d462ba062.png

When you have run a workflow, it will spawn a workflow run underneath the All Runs tab for that workflow. If it is running it will have a blue "Running" label next to it. If it is complete, it will have a green "Completed" label. If it failed, it will have a red "Failed" label. If it needs additional input it will have a person icon next to it.

clipboard_e7eb7893c24eb83282db99d2544c855ca.png

You can click on the workflow run to see details about the instance.

clipboard_e0768d4575404929648f55480472b27d2.png

The Variables tab has information about any entered, calculated, or generated variables (inputs, outputs, or attributes).

clipboard_edd97a989ea2a7a94773f12c9c4735fcd.png

The Logs tab will show time-stamped information about the run--all logs levels are stored, to see the different levels use the drop down.

clipboard_ec5fec7ab5f7c38d2fa67535ca82aab02.png

When opening support tickets, please ensure to copy the Debug level logs.

Editing Workflows

The workflows that come with the Pure Storage Plugin for vRealize Orchestrator are not editable by end users--this is done to make the workflows easier to support. If you would like to make a change, you have two options:

  1. Submit an enhancement request. This can be done here: https://github.com/PureStorage-Connect/vRO-Plugin/issues directly or via your Pure Storage account team.
  2. Copy the workflow and edit it yourself.

As an example of the second option, lets look at the workflow to create a volume. I may want to enforce a naming convention on new volume names. To do so, first copy the workflow:

clipboard_e616e9a1a3a5d010767f6b0306133fe21.png

Create a new folder if you have not yet for customer workflows first:

1) Create new folder 2) Give it a name 3) Verify location
clipboard_e78a205722a6934554a4f0b8c513ac15c.png clipboard_ec7add95a8b80bcf98767884d6fd18ef9.png clipboard_e416bc949f587d2e68acfc3ddeeb748e4.png

Then rename (if desired) the workflow and choose a location.

1) Move duplicated workflow to new folder, by editing the workflow 2) Choose folder 3) Save the move
clipboard_e6dcb607159d1eda6b80ff07a068f8e4c.png clipboard_ee61e329b9a481e9585df677b7b0782bb.png clipboard_e164f5f54660564bce6524d455dc69096.png

The workflow will be copied to your folder with the new name.

clipboard_e38aafcc2b7103637ba6f0c3e0bc552ac.png

You may now right-click and edit the workflow.

clipboard_ebfbe178714903d716e7c20ba1c3c3e50.png

On the

1) Click on Input Form and choose the variable 2) Click on Constraints and change the regex check 3) Save.
clipboard_effa75d3cd7a443606e31ae86eb1a3f53.png clipboard_edfc9ec2e19010cd44455b557e07e016a.png clipboard_e1bcec0e3d471b2a00896da144234c7da.png

Click Save and Close. The next time it is run, it will require (in this case) that the volume name starts with "Volume-".

Valid Invalid
clipboard_e34495bc017f9714e06dd5e891f20a025.png clipboard_eab265eb586e9f3231f16cb46f43437c3.png

If you create customized workflows it is important to back them up by either backing up the vRO appliance itself or exporting the workflows and storing them in a protected place. Note that vRO 8 does not allow for exporting a single workflow, only content packages. Create a new content package and put your custom workflows in it and export to protect.

clipboard_ec4d8e5fca679ac5cd042377b7b2c491e.png

Detailed information on creating implementing validation and specifics checks is beyond the scope of this document. For details, please refer to VMware vRO documentation: https://docs.vmware.com/en/vRealize-Orchestrator/index.html

Creating New Workflows

Full instructions on creating custom workflows within vRealize Orchestrator are beyond the scope of this document. But at least we can make a few recommendations to make this process easier.

High level advice: use the plugin! There are a lot of built-in features, beyond just workflows, that can save you a lot of time. Take advantage of that.

To create a new workflow, click the desired folder and choose New Workflow

clipboard_edf89f747a58f1634ce3d1490fe9301ac.png

Give it a name:

clipboard_e0414482d732dbd697740c8c5a8e76bf2.png

Advice #1: Re-use default workflows

The first suggestion is to review the existing workflows--can they do all of what you need. If they do, just use them directly. If they are close, clone them and make edits (as described above). If they achieve a part entirely, but you want to link them to something else, you can add workflows to a workflow:

Find a workflow under All Workflows and drag it to the correct spot:

1) Click on Schema and Drag Workflow Element to canvas 2) Select the element and choose the workflow in the Workflow entry box 3) Map the input and outputs into existing or new variables
clipboard_ead5bd8905bcec2a387bbee7c79a6906f.png clipboard_e489e92d116a33d7bfe6647d3a349261a.png clipboard_e8520fe2e93f5ee5e5418efa06cb6365d.png

For each input and output decide if some other variable can be used for it or a new one needs to be created:

clipboard_e41189eda2589b7b27d0cf908fcb2599b.png

Variable means it will be passed in (or calculated) by another element or hardcoded. An input means that a user passes it in.

clipboard_ea74d9879cc0711b8681dbcaf164f5097.png

Configure the inputs, outputs, and variables as needed. 

clipboard_e5ec1236d054e70074129db9b6f71f527.png

It should be noted that when you import a workflow the input validation is not imported with it. You will need to re-create it (if desired) or copy it from the original and paste the inputs into the new workflow.

 Advice #2: Re-use Actions

If no workflow achieves what you need (or commonly does too much), before writing your own code--use the built-in actions in the plugin. The plugin re-uses a lot of default functions, referred to as actions in vRO, for many plugins. These actions are available for you as well.

In the workflow editor, you can go to Schema and then drag Action Element to the canvas.

clipboard_e66b855912696bbb92f56b4fcba25a9fb.png

Choose the action to use in the Action search bar on the right.

clipboard_e3abfc7ebcdf55520a1e3e8438e705ee0.png

Then map the input(s) and output as needed:

clipboard_eafc216c4486e12ceb71e8d7ffec10752.png

Choose an input or variable for inputs and output or variable for the action output.

clipboard_e2f32a25353985a3c926f28d753ff0133.png

Actions can be selected and dragged into the workflow just like workflows. Generally actions do one thing: create something, retrieve something, convert something etc. Combining actions together can often achieve most desired workflows with minimal customization. To learn more about actions, choose the Actions panel and click on an action. The General tab will show high level information, and the Script tab will show the details (what it takes in, what it returns, and the code it uses).

Action generics Action details
clipboard_e141f97c456b4659d67985edb59480eff.png clipboard_eb9d98410f88fdb6710d60f6636bd1a2f.png

Drag and drop actions as needed.

Advice #3: Use the object inventory!

Whenever possible do not ask for volume names, or use strings (unless you need to name something)--ask for the input to be a Pure Storage object type. When you specify an input has to be a PS:Volume--this will automatically provide the user a menu to choose a PS:Volume. Therefore they can be guided to choose the right thing--and you don't need to write more code to make sure it is valid. 

1) Input is PS:Volume 2) User is forced to choose a valid volume 3) User is guided to make a valid choice
clipboard_eba9ba41bf91e8186995ab9fe4ca55c9b.png clipboard_eafdbbc78523466d4d0014c82c7757aaa.png clipboard_e6e181cf4b316c4f6555b36319d818272.png

Advice #4: Only use the REST API workflows if you have no other choice.

The Pure Storage Plugin for vRealize Orchestrator offers a few workflows to run custom REST operations against a FlashArray, Cloud Block Store, or a FlashBlade:

clipboard_e4a7cc393548a74e3a306c17f25a37b92.png

This should only be used if the feature you want to use (or metrics you need) does not have a workflow, action, or Javascript library. The plugin, in addition to workflows and actions, comes with customized Javascript libraries. Each object has methods that can be run from that object once input:

clipboard_e1c5f5947edc40ef17ebc400c09712254.png

And each object type also has a manager that can be used to do additional tasks for that object:

clipboard_e38fac528c7270ff2a06ed2aa5b61117d.png

Many of the manager operations require a REST session which can be pulled from the FlashArray connection object or the object itself with the GetSession() method:

clipboard_ee3e5f54ace1522f92d84b3fe7455f04b.png

For examples of using these, refer to the code within related Actions.