- Category: Learn VCO
- Published: Wednesday, 05 October 2016 16:59
- Written by Burke Azbill
- Hits: 3606
Each time vRealize Orchestrator (vRO) runs a workflow, a token (workflow execution) is added beneath the workflow in the vRO client. By default vRO will keep up to 100 of these tokens! This may be a slight annoyance to people who are only interested in the last 5-20 runs. This article will shed some light on the configuration options you have available to you.
Tired of seeing too many workflow tokens?
Many developers prefer to have far fewer workflow tokens showing when they are working in the vRO client. Sure, you can right-click on the parent workflow and select Delete all finished workflow runs, but when you have scheduled tasks, policies, and users generating many tokens across many different workflows doing this manually can be tedious.
Maximum number of preserved runs per workflow
As per the vRO 7.1 Documentation (click link for exact page), you can change the number of workflow tokens that are kept in the vRO client.
- Let's do that now! Return to your browser tab with your vRO Control Center page loaded and click on Advanced Options
vRO 7+ Configuration Settings
Configuration settings for vRO 7 and above are now managed using the vRO Control Center. This is a new interface that become available in a beta form with vRO 6 and fully replaced the old web configurator since vRO version 7.1. Version 7.0.1 still had a link back to the Legacy UI but that is now gone as well since all configurations are now done through the Control Center and/or vRO Workflows.
In order to access the Control Center, you must have the vco-configurator service running. It is not running by default when vRO is embedded in vRealize Automation (vRA.)
How to access Control Center:
- https://your-vro-server:8281/vco - then click vRealize Orchestrator Control Center (login as root with your root pw for the appliance)
- https://your-vra-server/vco - (Note: port 443 when vRO embedded in vRA) then click vRealize Orchestrator Control Center (login as root with your root pw for the appliance)
Change to 10
- Set the value of Maximum number of preserved runs per workflow to the maximum number of workflow tokens you want shown under your workflows. For this article, we'll set this to 10.
- Click Save
- Note the message that appears under the Saved successfully note - you need to restart the Orchestrator service in order to apply the changes. Click Startup Options to be taken to the page that allows you to restart the server service.
Restart the server service
You may restart the Server service using Control Center by clicking Restart on this page.
NOTE: the console/ssh equivalent of pushing this button is:
service vco-server restart
Workflow token purge
After making the change above and restarting the vco-server service, you may notice that the changes may not appear to have taken effect right away. This may have to do with timing. A missing piece of documentation on that page linked above is the fact that the workflow tokens are purged once per hour by default. You can verify this by issuing the following command from an SSH session to your vRO server:
cat /var/log/vco/app-server/server.log | grep "Purging workflow tokens"
Note the timestamp at the beginning of the line - you'll see the results indicate an hourly execution of the purge process!
But wait! I don't want to wait an HOUR for the purge ! !
Okay, fine, let's change that then!
Control Center provides an interface to add custom system properties to the vRO Server.
- Click on System Properties
Add New Property
- Add this text as the Key: com.vmware.o11n.purge.execution.cron
- Specify this cron info for the Value: 0 0/5 * * * ?
- Add the following as your Description: Purge workflow tokens every 5 minutes
- Click Add
Wait a second... you're probably wondering where I got that Key value from since it doesn't appear to be in the documentation.
I actually found it in an older VMware Communities post after a colleague mentioned the key name in a Socialcast discsussion.
- Note that your new property is now added (but not yet saved) to the server
- Click Save changes to save these changes to a config file on the server (/var/lib/vco/app-server/conf/vmo-managed.properties)
- As noted, you must now restart the server service in order to apply the new schedule
- Click Home then click Startup Options (not shown)
Restart the Server service
NOTE: Even though Current Status may indicate Running right away, the vco-server service actually takes a few minutes to really reach the Running state.
End result: 5 minute token purge
SSH to your vRO server and run the following command to verify the purge is now taking place every 5 minutes:<
tail -f /var/log/vco/app-server/server.log | grep "Purging workflow tokens"
Once the configuration changes have been made and the purge cron job executes, no more than the specified number of workflow tokens will be present for all workflows. In this case, you can see that there are now only 10 workflow tokens for each of the test workflows shown in the screenshot!
As you can see in this short article, you do have the ability to control the number of workflow tokens per workflow. All it took was a couple configuration changes and a server restart to apply those changes.
I hope you found this article helpful!
If you have questions about vRO, please take advantage of the VMware Orchestrator Communities! This article even referenced an old thread there in order to get the Key value for a configuration setting.