Remote Execution Action Plugin



Overview

This action plugin executes a script or executable on a remote node

Saved Parameters Description

This action allows the user to execute a script or executable on a remote node and grab one or more output variables.

Inputs Description

The run time inputs of this action depend on how the configuration is done. Variables exposed in the command line will be exposed as mandatory inputs.

Outputs Description

This action executes the provided command line via an SSH session to the remote node.

Additional outputs might be available depending on the step configuration.

Supported Actions

None

Dependencies

None

Operating Instructions

When a stdio frequency is provided, the standard output out of the executed command is streamed to the plugin status message. Otherwise it goes into the stdio output variable.

When a stderr frequency is provided, the standard error out of the executed command is streamed to the plugin status message. Otherwise it goes into the Orchestrator log file.

Status updates can be provided by the remote executable using the following output format:
'-#STATUS--#--STATUS MESSAGE#-'

Either STATUS or STATUS MESSAGE can be left empty.

Examples:
Example in a shell script:
echo "-#Paused--#--Remote action was paused#-"
Specified output variables will be extracted from the standard output if they follow the formatting below:
'-#OUTPUT:VARIABLE NAME--#--VARIABLE VALUE#-'
Example: '-#OUTPUT:size--#--120568#-' -> populates an output entry @outputs['size']=120568, if an output named size of type TYPE_INT is specified.
The following is an example of a shell script returning an error 2; output variable size; multiline true:
md5sum $1  | cut -d' ' -f1
echo "-#OUTPUT:size--#--120568#-"
echo "titi"
exit 2
The plugin outputs is the following:
size      120568
exit_code 2
Multi     ["45c2d08009be4a2307eddd4f0bd10a8f","titi"]

45c2d08009be4a2307eddd4f0bd10a8f is the md5 checksum for the file passed as first parameter of the shell script ($1)

Example of the same shell script returning an error 2; output variable 'size'; multiline false:

The plugin outputs will be:
size      120568
exit_code 2
stdio     45c2d08009be4a2307eddd4f0bd10a8f
          titi

For environment variables to be settable over SSH, the /etc/ssh/sshd_config must be modified first (on Isilon, the file is at /etc/mcp/templates/sshd_config), add a line at the end of the file to whitelist the env variable required:AcceptEnv [env_variable_1] [env_variable_2] [...] sshd must then be restarted for the changes to take effect.