Executable Registration
Navigate to Admin/Application Data/Executables and click on the "Create Executable" button. This redirects one to a page where an XML file can be uploaded which contains instructions for the creation. Note that once the executable is created, it is not possible to add new parameters to it.<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <executable> <!-- The name of the executable. --> <name></name> <!-- If an executable file is to be uploaded, than this is to be encoded with base64 algorithm, and this content is to be passed in the following element. --> <base64></base64> <!-- This is the context in which the executable is to be used. --> <!-- Allowed values: APPLICATION, MASTER, STORAGE, SUBMITTER, WORKUNIT, WRAPPERCREATOR --> <!-- Note: only admin is allowed to upload executables with context MASTER --> <context></context> <!-- There can be zero or more repetitions of the following parameter element. --> <parameter> <!-- Indicates whether this parameter can be modified or not. This is editable in the GUI. --> <modifiable></modifiable> <!-- The description of this parameter. This is editable in the GUI. --> <description></description> <!-- The key of the parameter (intended to be used by applications). This is NOT editable in the GUI. --> <key></key> <!-- The label of the parameter, presented to the user. This is NOT editable in the GUI. --> <label></label> <!-- Indicates whether the user is obliged to enter a value for this parameter or not. This is NOT editable in the GUI. --> <required></required> <!-- The parameter type. Allowed values: boolean, string --> <type></type> <!-- The value tag defines a default value of the parameter. --> <value></value> <!-- There can be zero or more repetitions of the following enumeration element to define all available values of a given enumeration. --> <enumeration></enumeration> </parameter> </executable>
Executable Triggering
Only the executables with the context MASTER are triggered directly by B-Fabric (since only those executables can be registered by the B-Fabric administrator), namely as follows:/bin/bash /path/to/masterexecutable -j $EXTERNALJOBID
The $EXTERNALJOBID is the id of the external job to be executed. Every external job entity is connected to an executable, so by receiving this id, the master executable can get all necessary information for further triggering. The master executables are responsible for implementing the secure triggering of executables with the following contexts: STORAGE, SUBMITTER, WRAPPERCREATOR.
The functionality for determining which executable is to be triggered by which master executable is implemented in the org.bfabric.util.ExternalExec.java class, it works as follows:
- A master executable can be explicitly assigned to an execuable (only by admin).
- If no master executable is assigned to an executable, then the default one for this kind of executables will be considered. The default master executables are configured in system properties: defaultMasterExecutableIdStorage, defaultMasterExecutableIdSubmitter, defaultMasterExecutableIdWrapperCreator.
- If neither a specific master executable is assigned to an executable nor the default master executable is configured, then nothing will be triggered.