I attended a VMworld TAM Customer Central session this morning title "What's Next in vCenter Orchestrator" (a.k.a. vRealize Orchestrator). One of the cool features is vCO-CLI, which has actually been available for about 8 months now as a VMware Fling ( https://labs.vmware.com/flings/vco-cli ). I'm by no means an expert but have used vCO-CLI to debug an issue I was having so I thought I would throw together a short page on it. This will hopefully give an idea of how the tool can be used. I'm not going to go through how to install the plug-in.
I'll start with creating a very basic workflow which takes just a VcHostSystem as an Input parameter.
Next, I'll add just a Scriptable task with my VcHostSystem as an IN parameter. This Scriptable task has only one line which is what starts the vCO-CLI session.
That's it! Now we can run the workflow providing a VcHostSystem object.
If you check the Logs tab on the running workflow then you'll see the session id assigned.
Now we can start the vcocli-gui (either vcocli-gui.bat if using Windows or vcocli if using Linux). When the application starts you get the following login screen. Login using the same credentials as the running workflow.
Click the "Attach" button so you can get the session you have running.
Highlight your session and click "Attach" again. Now you get vCO-CLI GUI. I recommend you look over the "Help" section to see what's available (this will show you how you can execute workflows, actions from the command window along with other items).
For my workflow I'll be looking at the vmhost object used as the IN parameter. I'll expand the inventory to show that we see in the output window matches what we see in the inventory.
Now to check the vmhost object
I'll start with creating a very basic workflow which takes just a VcHostSystem as an Input parameter.
Next, I'll add just a Scriptable task with my VcHostSystem as an IN parameter. This Scriptable task has only one line which is what starts the vCO-CLI session.
That's it! Now we can run the workflow providing a VcHostSystem object.
If you check the Logs tab on the running workflow then you'll see the session id assigned.
Now we can start the vcocli-gui (either vcocli-gui.bat if using Windows or vcocli if using Linux). When the application starts you get the following login screen. Login using the same credentials as the running workflow.
Click the "Attach" button so you can get the session you have running.
Highlight your session and click "Attach" again. Now you get vCO-CLI GUI. I recommend you look over the "Help" section to see what's available (this will show you how you can execute workflows, actions from the command window along with other items).
For my workflow I'll be looking at the vmhost object used as the IN parameter. I'll expand the inventory to show that we see in the output window matches what we see in the inventory.
Now to check the vmhost object
As you can see, these are the same properties you use in Scriptable tasks or actions you create. You can also use any of the methods available to the object. If you've made any changes to the object prior to executing "startSession()" then those changes will be reflected here. Using vCO actions then it's pretty simple as well (note the syntax difference):
When you're done debugging/troubleshooting you can simply disconnect from the session which will cause the workflow to continue where it left off.
Remember, when you're working in the vCO-CLI gui you are working on the actual object so anything you do in this GUI is real-time - so be careful what you do.
Comments
Post a Comment