«

»

Mar 26

Software-Defined Storage with NetApp and VMware – Part 3: Create Workflow Integration with vCO and WFA

Now we will look at how to create vCenter Orchestrator workflows that call WFA. This post will take you through initial workflow creation and assumes you have followed the previous posts and have the NetApp WFA Pakcage for VMware vCenter Orchestrator (you can download from here) already installed.  Be warned that this is a LONG blog post. However, to cover everything in detail takes a bit of effort.

To create a vCO workflow that will call a WFA workflow, complete the following steps:

1. Open the vCO client and then go to the Workflows tab at the top. Go to Administrator > Library > NetApp > Tasks. Right click on Get WFA Workflow Inputs and select Start Workflow.

clip_image002

 

2. When the workflow starts, put the name of the WFA workflow exactly as it appears in WFA into the NetApp WFA workflow name box. In the below example we are using the WFA workflow “Create a Clustered Data ONTAP NFS Volume”.

clip_image004

 

3. This workflow wil run and get the User Inputs that will need to be used for the vCO workflow to call the WFA workflow.

clip_image006

 

4. Next we want to create a new vCO workflow. Right click on a folder that you will keep your workflows in and select “New Workflow”.

clip_image008

 

5. Next give the workflow a name. For simplicity sake it is recommended that you name the workflow the same as the WFA workflow.

clip_image010

6. Once the new workflow is created, you will be taken to an edit workflow screen. Go to Inputs and click on the Add Inputs button. Create as many inputs as shown after running the Get WFA Workflow Inputs workflow in vCO.

clip_image012

 

7. Add the Inputs you will need. For the selected workflow we are creating there are seven inputs needed.

clip_image014

 

8. You will then need to click on the inputs and rename them after the inputs given to you in the above step.

clip_image016

 

9. Next click on the Schema tab at the top. Select Scriptable Task from the left and drag it into the right pane. Then click on edit (the “Pencil” icon above the scriptable task)

clip_image018

 

10. You will then be at the below screen

clip_image020

 

11. Click on the In tab at the top. Then click on the “Bind to workflow parameter/attribute” button.

clip_image022

 

12. Select each entry on this screen by placing a check box next to it.

clip_image024

13. Click on “Select”. You will be taken back to the In tab and will see that the Local Parameters have now been set.

clip_image026

14. Next click on the Scripting tab and type the following:

System.log(“Starting the workflow”) (shown below)

clip_image028

 

15. Click Close on the Scripting tab

16. At the Schema screen, go to the left hand menu items and select Action element and drag it to the right of Bind Inputs that you just completed. Once you do this you will taken to the Chose action screen (show at Figure xxxx)

clip_image030

 

clip_image032

 

17. At the Chose action screen click on the Filter box and type in wfa. This will bring up a list of actions for you. Click on generateNetAppWFA_Inputs action and click select.

clip_image034

 

18. You will then be taken back to the Schema screen.

clip_image036

 

19. From the left hand menu on the Schema screen select Workflow elements and drag this to the right side of the newly created generateNetAppWFA_Inputs action.

clip_image038

 

20. This immediately lauches the “Chose workflow” screen. Here, click on NetApp WFA Workflow execution and then click select at the bottom right of this screen.

clip_image040

 

21. You will now be back at the Schema screen. Hover the mouse of the generateNetAppWFA_Inputs action. Click on the Edit button (Pencil Icon shown in the image below)

clip_image042

 

22. Once in the Edit portion click on the Scripting tab. You will be at the below screen.

clip_image044

23. Click on the OUT tab at the top of the screen. Then click on “not set” under Source Parameters next to actionResult.

clip_image046

 

24. Once you click on “not set” you will be taken to the generateNetAppWFA_Inputs output parameters ‘actionResult” screen. Click on Create parameter/attribute in workflow.

clip_image048

 

25. You will now be in Parameter information screen. Change the Name from actionResult to userInputs then click on OK.

clip_image050

 

26. You should now be back at the OUT tab screen for generateNetAppWFA_Inputs. Click on Close.

clip_image052

 

27. This will take you back to the Schema screen. Hover the mouse over NetApp WFA Workflow and click on the Edit button.

clip_image054

 

28. You will be taken to the Info tab of the NetApp WFA Workflow element.

clip_image056

 

29. Click on the IN tab at the top of this screen. Then click on “not set” under Source parameters next in the userInputs row.

clip_image058

 

30. At this screen click on userInputs and click select

clip_image060

 

31. Click on “not set” under Source parameters in the workflowName row.

clip_image062

32. Click on Create parameter/attribute in workflow

clip_image064

 

33. In the Parameter information screen in the Value input box at the bottom input the name of the workflow you are creating. In this example Create a Clustered Data ONTAP Volume is used.

34. Click OK

clip_image066

 

35. You will now be back at the below screen. Click Select.

clip_image067

 

36. Your screen should now be similar to the one below.

clip_image069

 

37. Click on the OUT tab at the top. Click on “not set” in the errorCode row under the Source Parameter column

clip_image071

 

38. Click on Create parameter/attribute in workflow.

clip_image073

 

39. Ensure that errorCode is listed for the name then click OK.

clip_image075

 

40. Click on “not set” in the wfaWorkflowJobID row under the Source parameter column.

clip_image077

 

41. Click on Create parameter/attribute in workflow.

clip_image079

 

42. Ensure that wfaWorkflowJobID is entered into the Name. Click OK.

clip_image081

 

43. Click on “not set” in the returnWFAParameters row under the Source parameters column.

clip_image083

 

44. Click on Create parameter/attribute in workflow.

clip_image085

 

45. Ensure that returnWFAParameters is listed in the Name box. Click OK.

clip_image087

 

46. When this step is complete your OUT screen should be similar to the one below. Then click on the Exception tab at the top

clip_image089

 

47. Under the Exception tab click on “not set”.

clip_image091

 

48. Chose “errorCode” and click on Select.

clip_image093

 

49. Once that is completed, your screen should resemble the one below.

clip_image095

 

50. Click on close to return to the main Schema screen. At this screen drag and drop Throw Exception under the NetApp WFA Workflow element.

clip_image097

 

51. Hover over Throw Exception and click on the Edit button.

clip_image099

 

52. Under the Exception tab in Throw Exception click on “Not set”.

clip_image101

 

53. Click on errorCode and click Select at the bottom.

clip_image103

 

54. Your screen should now look similar to the one below. Click on Close.

clip_image105

 

55. Next, click on the Presentation tab at the top.

clip_image107

 

56. Set your Presentation for the workflow up how you choose. In the below example we create a Set Volume Information display group and two steps called Volume Details and Export Details. We then move the input parameters under the respective steps.

clip_image109

 

clip_image111

 

clip_image113

57. Once this is done we then set the properties of the inputs under the steps. Below we see that we are setting ClusterName as a Mandatory Input and setting a predefined list of answers for it. We then set a default value.

clip_image115

 

clip_image117

 

clip_image119

 

clip_image121

 

clip_image123

 

58. Add the desired property for each input in the steps. Below we see examples of other properties that are added to the inputs.

clip_image125

 

clip_image127

 

clip_image129

 

59. Once this is done, save the newly created workflow. You will then be returned to the Workflow screen. Right click on the newly created workflow and select Start Workflow.

clip_image131

60. Select or input the desired entries for the new workflow, in this case entries for creating a new volume.

 

clip_image133

 

clip_image135

 

61. If all the steps have been followed your workflow should run successfully.

image

 

Rejoice for you have finally come to end of this very long post.  Hopefully it has helped with  your own setup.

Here are the links for the Software-Defined Storage with NetApp and VMware series:

As always I appreciate the time you have taken to read this post and I’d love to get your feedback and hear what you’d like to see.  Workflow ideas, blog post ideas, and general comments are all welcome.

Thanks for reading!

-McCloud

 

Share Button

1 ping

  1. Software-Defined Storage with NetApp and VMware – Part 1: Setup WFA » McCloud on Cloud

    […] Software-Defined Storage with NetApp and VMware – Part 3:  Create Workflow Integration with vCO a… […]

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=""> <strike> <strong>