Distsrv whitepaper discussing probe callbacks

Document ID : KB000118855
Last Modified Date : 29/01/2019
Show Technical Document Details
I need to find a programmatic way of adding new hubs to the forwarding list for licenses on my primary hubs distsrv. I don't want to have to worry about a user remembering to add a new distsrv to the forwarding list. If I can't get an entire whitepaper discussing callbacks of the distsrv probe (similar to the "Transitioning from Distsrv to Automated Deployment Engine 2.0" whitepaper) then I would at least like to know how I can add forwarding rules for just licenses to a distsrv so that I can then write a LUA script to do it on a schedule.
- UIM v8.5x or higher
- Need for further automation in distributing packages/probe licenses
- distsrv technical brief as reference
- LUA script

CA Community post (from Dan Gill)


Lua script to sync/deploy packages to robots using ADE

This Lua script will use the ADE to deploy/sync packages throughout your environment. It can be used for any package in the archive; however, the script is designed to skip hub robots. I added that logic in to ensure a hub robot doesn't restart during package deployment.

For example, you have two versions of cdm in the archive (6.20 and 6.30). If you want every robot in the environment that has cdm installed to be running 6.30, then you could create a schedule to run the script and use the following parameters: cdm 6.30 UPDATE ALL

If you wanted every robot to have version 6.30 of the cdm probe regardless of whether the cdm probe is currently installed or not, then the parameters would be: cdm 6.30 PUSH ALL

If you only wanted to deploy to a single hub and only if cdm is already installed, the parameters would be: cdm 6.30 UPDATE HUB_NAME

If you want to deploy a package one time if the same version hasn't already been installed, the parameters would be: cdm 6.30 INSTALL HUB_NAME

-- script : sync-packages.lua
-- author : Dan Gill
-- June 2017
-- version: 1.5
-- desc : The intention of this script is to automate the process of updating packages.
-- This script should be run by the nas with arguments passed to it. The first argument must be the
-- package name, the second argument must be the version, and the third argument must be whether a
-- fresh install is desired (deploy regardless of whether probe currently is installed on the robot),
-- the fourth argument is the hub name ro process or ALL for all hubs.
-- This script will EXCLUDE ALL HUB ROBOTS from processing.
-- Alternatively, the script may be run manually and will use the variables provided in the script.
-- The folder "script_logs" *MUST* be manually created under the nas directory prior to running this
-- script.
-- Version | Details
-- 1.0 | Initial Version
-- 1.1 | 9/13/2018 Added parameter to specify if script should be run against a single hub or
-- ALL. Converted to used more functions for faster processing. Converted output to file.
-- 1.2 | 9/20/2018 - Replace dofile with require and added package.path update; this makes
-- passing the path to the includes files simpler. Swapped out file.write and print
-- statements with output function from logging_functions.
-- 1.3 | 10/3/2018 - Added additional error checking.
-- 1.4 | 11/13/2018 - Added hub name to output log. Also added task dump to log output to ease
-- probe callback get_task_status against the ADE.
-- 1.5 | 11/14/2018 - Added PUSH, UPDATE, and INSTALL installation types for various types of
-- package installs

Additional Information:
distsrv technical brief:
File Attachments:
technical_brief distsrv.docx