Agent and Plug-in Provisioning

Provisioning Agents and plug-ins is based on images. An image is JSON code that lists the installation packages in the order they are installed.

You must obtain the installation packages referenced in the images, including packages for Agents, plug-ins, and integration plug-ins before the provision process, and save them in one of the following locations:

You can install an Agent along with plug-ins using one of the following methods:

  • Run separate image and setup commands: Enables you to download and prepare the installation files for the Agent and plug-ins with the provison image command.

    At a later time, you can set up the Agent and plug-ins and register them to the Control-M/Server with the provision agent::setup command.

    This method is beneficial for dynamic installations, such as installations that use a VM image.

  • Run a single install command: Performs the full installation process for the Agent and plug-ins with a single provision agent::install command. This method is beneficial for static architectures that do not distinguish between image building and instantiation.

Control-M Automation API provides several default images, and enables you to create custom images that include, for example, a newer version of the Agent, multiple patches, or additional plug-ins. For more information, see Creating a Custom Image for Provisioning.

The following table describes the API commands to set up repositories for provisioning, provision Agents, and deploy plug-ins.

Command

Description

provision images

Gets a list of available images.

provison image

Prepares the file system to install an Agent.

provision agent::setup

Registers an Agent and connects it to a Control-M/Server.

provision agent::install

Runs all phases of image installation, including image and setup.

provision agent::update

Downloads and installs the latest version of Control-M/Agent and any installed plug-ins to the Agent host.

provision image::remove

Uninstalls an image from the user account but does not unregister it.

provision agent::uninstall

Uninstalls an image from the user account and unregisters it.

provision repository::add

Adds a repository where installation packages and images are stored for provisioning.

provision repository::get

Gets details of a repository used in provisioning actions.

provision repositories::get

Gets details of all defined repositories from Control-M/EM.

provision repository::delete

Deletes a repository for provisioning.

provision repository::set

Sets the default repository for provisioning actions.

provision images

The provision images command enables you to get a list of the images that are available on the Control-M/Server for a specific operating system. The command returns a list of image names.

  • CLI

  • REST

ctm provision images <os>

The following example shows the REST API syntax for the provision images command in cURL.

Copy
os=Linux
AuthHeader="x-api-key: $token"
# AuthHeader="Authorization: Bearer $token"  #for a session token

curl -H "$AuthHeader" $endpoint/provision/images/$os

To select the AuthHeader value ("Authorization: Bearer $token" or "x-api-key: $token"), see Authentication Tokens.

The following example shows a request for a list of available images and a typical response:

Copy
> ctm provision images Linux -e devEnvironment
[
  "Agent.Linux",
  "Agent_20.Linux",
  "ApplicationsAgent.Linux",
  "BigDataAgent.Linux",
  "Server.Linux",
  "Server_20.Linux"
]

The following table describes the provision images command parameters.

Parameter

Description

os

Determines the operating system specified for the retrieved images.

Valid Values:

  • Linux (for Linux 64-bit)

  • Windows (for Windows 64-bit)

  • AIX

If annotation is enabled for the Configuration Management category in the CCM or Configuration domain, you must also provide an annotation to justify your action. For more information, see Annotation Input.

provison image

The provision image command enables you to download an image and prepares it for installation.

If the image is an Agent image, this command also installs the image into the current user account, but does not configure it or register it with a Control-M/Server.

You can use this command also to install Control-M Integrations plug-ins. Store the obtained plug-in ZIP file in the <EM_HOME>/AUTO_DEPLOY directory and then run this command only.

  • This API command is supported only through the CLI and cannot be called through a REST API command.

  • If provisioning of an Application Integrator plug-in fails due to a timeout, change the timeout period to longer than the default 120 seconds using the rest.timeout property (for example, rest.timeout=150). Include this property in a properties file named aicm.properties in the following directory:

    • UNIX: <Agent_instance>/cm/AI/data

    • Windows: <Agent_instance>\CM\AI\data

CLI Syntax

The following shows the CLI syntax for the provision image command:

ctm provision image <image> -f <configuration file> [-r <repository name>]

The following table describes the provision image command parameters.

Parameter

Description

image

Determines which image to prepare for installation.

You can specify the image in one of the following ways:

  • The name of one of the image files returned by the provision images command.

    You do not need to include the OS extension in the name of the image file. For example, you can specify Agent, rather than Agent.Linux. The operating system is detected automatically.

  • If you set up a local repository, as described in Setting Up a Local Repository for Provision Images and Installation Packages, you can specify the image in the following format:

    <name>.<version>

    where the image <name> is one of the following BMC-provided images:

    • Agent

    • Hadoop

    • Databases

    • AWS

    • Airflow

    • OEBS

    • PeopleSoft

    • SAP

    • Informatica

    Informatica.9.0.21.300

configuration file

Defines the pathname to the JSON file that contains the javaHome parameter when you provision an Agent.

The following example shows the parameter in a JSON configuration file that indicates the location of the JRE to install an Agent on Windows:

Copy
{
  "javaHome": "C:\\java\\Eclipse_Adoptium_jre-17.0.6.10-hotspot"
}

repository name

Determines which local repository to select for this provisioning action. Select from all the local repositories defined with provision repository::add.

If you do not specify the local repository with the -r option, ensure that you set a default with provision repository::set.

provision agent::setup

The provision agent::setup command enables you to connect and register an image with a Control-M environment.

This API command is supported only through the CLI and cannot be called through a REST API command.

CLI Syntax

The following shows the CLI syntax for the provision agent::setup command:

ctm provision agent::setup [server] [name] [port] [-f <configuration file>]

The following table describes the provision agent::setup command parameters.

Parameter

Description

server

Defines the Control-M/Server to register the Agent.

If omitted or empty and there is only one Control-M/Server, the system selects that server. In this scenario, if you define name or port, include "" as a placeholder for the server.

provision agent::setup

provision agent::setup "" "" 2056

provision agent::setup "" "alias1" 2056

name

Defines the hostname or alias of the Agent. This is the logical name of the Agent.

If omitted or empty, the system uses the hostname. In this scenario, if you define server or port, include "" as a placeholder for the name.

port

Defines the port to designate as the Agent listening TCP/IP port.

If omitted or empty, the system uses an available free port. In this scenario, if you define name and server, include "" as a placeholder for the port.

configuration file

(Optional) Defines the pathname to a JSON file that contains the additional parameters.

The following example shows a configuration file:

Copy
{
    "connectionInitiator": "AgentToServer",
    "tag": "abc_1234",
    "serverHostName":"ctmServer2",
    "serverPort": 7777,
    "secondaryServerHostName": "ctmServer3"
}

The following table describes additional provision agent::setup command parameters in the configuration file.

Parameter

Description

connectionInitiator

Determines the component that initiates the connection between the Agent and Control-M/Server.

Values:

  • AgentToServer

  • ServerToAgent

  • BothAllowed

Default: BothAllowed

tag

Defines a tag associated with the Agent in Role-Based Administration (RBA).

Tags can contain alphanumeric characters and underscores. The maximum length is 85 characters.

This parameter is available only for Control-M/EM version 9.0.20 or higher.

serverHostName

Defines the name of the server host to override the default server hostname.

This is a required parameter to provision an agent with Role Authorizations.

serverPort

Defines the port number for server-to-agent communication to override the default server port.

This is a required parameter to provision an agent with Role Authorizations

secondaryServerHostName

Defines the name of the secondary Control-M/Server host for High Availability (HA) configurations.

This is a required parameter to provision an agent with Role Authorizations.

If annotation is enabled for the Configuration Management category in the CCM or Configuration domain, you must also provide an annotation to justify your action. For more information, see Annotation Input.

provision agent::install

The provision agent::install command enables you to combine the image and setup commands into one action. The command downloads the agent, and then connects and registers it with a Control-M/Server.

This API command is supported only through the CLI and cannot be called through a REST API command.

CLI Syntax

The following shows the CLI syntax for the provision agent::install command:

ctm provision agent::install <image> [server] [name] [port] [-f <configuration file>] [-r <repository name>]

The following table describes the provision agent::install command parameters.

Parameter

Description

image

Determines which image to install.

You can specify the image in one of the following ways:

  • The name of one of the image files that the provision images command returns.

    You do not need to include the OS extension in the name of the image file. For example, you can specify Agent, rather than Agent.Linux. The operating system is detected automatically.

  • If you set up a local repository, as described in Setting Up a Local Repository for Provision Images and Installation Packages, specify the image in the following format:

    <name>.<version>

    where the image <name> is one of the following BMC-provided images:

    • Agent

    • Hadoop

    • Databases

    • AWS

    • Airflow

    • OEBS

    • PeopleSoft

    • SAP

    • Informatica

    Informatica.9.0.21.300

server

Determines the Control-M/Server to register the Agent.

If omitted or empty and there is only one Control-M/Server, the system selects that server. In this scenario, if you define name or port, include "" as a placeholder for the server.

provision agent::install

provision agent::install"" "" 2056

provision agent::install"" "alias1" 2056

name

Defines the hostname or alias of the Agent. This is the logical name of the Agent.

If omitted or empty, the system uses the hostname. In this scenario, if you define server or port, include "" as a placeholder for the name.

port

Determines the port to designate as the Agent listening TCP/IP port.

If omitted or empty, the system uses an available free port. In this scenario, if you define name and server, include "" as a placeholder for the port.

configuration file

(Optional) Defines the pathname to a JSON file that contains the additional parameters.

Mandatory for Control-M/Agent upgrade to version 9.0.21: You must use a configuration file and set the mandatory javaHome parameter.

The following example shows a configuration file:

Copy
{
    "connectionInitiator": "AgentToServer",
    "tag": "abc_1234",
    "serverHostName":"ctmServer2",
    "serverPort": 7777,
    "javaHome": "C:\\java\\Eclipse_Adoptium_jre-17.0.6.10-hotspot"
}

repository name

Determines which local repository to select for this provisioning action. Select from all the local repositories defined with provision repository::add.

If you do not specify the local repository with the -r option, ensure that you set a default with provision repository::set.

The following table describes additional provision agent::install command parameters for the configuration file.

Parameter

Description

connectionInitiator

Determines the component that initiates the connection between the Agent and Control-M/Server.

Values:

  • AgentToServer

  • ServerToAgent

  • BothAllowed

Default: BothAllowed

tag

Defines a tag associated with the Agent in Role-Based Administration (RBA).

Tags can contain alphanumeric characters and underscores. The maximum length is 85 characters.

serverHostName

Defines the server hostname to override the default.

This is a required parameter to provision an agent with Role Authorizations.

serverPort

Defines the port number for server-to-agent communication to override the default server port.

This is a required parameter to provision an agent with Role Authorizations.

javaHome

(Mandatory) Defines the JRE pathname.

If annotation is enabled for the Configuration Management category in the CCM or Configuration domain, you must also provide an annotation to justify your action. For more information, see Annotation Input.

provision agent::update

The provision agent::update command enables you to download and install the latest version of Agent and any installed plug-ins to the Agent host that runs the command.

To use this command, ensure that you have stored the most recent installation packages in a local repository.

For this command, the local repository does not need to contain JSON images in a descriptors directory. If this directory exists, it is disregarded.

  • This API command is supported only through the CLI and cannot be called through a REST API command.

  • To run this command, the current version of Agent must be 9.0.21.000 or higher.

  • If Control-M MFT or Control-M for SAP is installed on the Agent, you must stop the Agent before you run this API command and start it afterward. To avoid Agent downtime, you can create a host group and include multiple Agents with the same plug-in within the host group. After you shut down one Agent, jobs are routed to another Agent in the host group.

CLI Syntax

The following shows the CLI syntax for the provision agent::update command:

ctm provision agent::update [instanceName] [-r <repository name>]

To skip confirmation messages during installation, add -y after the command.

The following table describes the provision agent::update command parameter.

Parameter

Description

instanceName

(Windows only) Defines which Agent instance to update.

If not defined, the Default installation is updated.

This parameter is required for environments with multiple Agents.

repository name

Determines which local repository to select for this provisioning action. Select from all the local repositories defined with provision repository::add.

If you do not specify the local repository with the -r option, ensure that you set a default with provision repository::set.

provision image::remove

The provision agent::remove command is intended for unregistered Agents. This command uninstalls the Agent and all its plug-ins from the current user account without unregistration of the Agent from the Control-M/Server.

This API command is supported only through the CLI and cannot be called through a REST API command.

CLI Syntax

The following shows the CLI syntax for the provision image::remove command:

ctm provision image::remove

provision agent::uninstall

The provision agent::uninstall command is intended for registered Agents. This command unregisters an Agent from the Control-M/Server and then uninstalls the Agent and all its plug-ins from the current user account.

This API command is supported only through the CLI and cannot be called through a REST API command.

CLI Syntax

The following shows the CLI syntax for the provision agent::uninstall command:

ctm provision agent::uninstall

provision repository::add

The provision repository::add command enables you to define a repository to store installation packages and images for provisioning actions.

This method to define a local repository is an alternative to environment configure. It enables you to define numerous different repositories in Control-M/EM and each supports multiple Control-M environments.

  • CLI

  • REST

ctm provision repository::add <name> <location> [<description>]

The following example shows the REST API syntax for the provision repository::add command in cURL.

Copy
name=Location1
location="file:///home//localProvisionRepo"
description="Local repository"
AuthHeader="x-api-key: $token"
# AuthHeader="Authorization: Bearer $token"  #for a session token
  
curl -H "$AuthHeader" -X POST  "$endpoint/provision/repository" 
-d '{"name": "$name", "location": "$location", ["description": "$description"]}'

To select the AuthHeader value ("Authorization: Bearer $token" or "x-api-key: $token"), see Authentication Tokens.

The following table describes the provision repository::add command parameters.

Parameter

Description

name

Defines the repository name.

location

Defines the path to the storage location of the installation packages for provisioning actions.

  • Local filesystem: file:///home//localProvisionRepo

  • Amazon S3 Bucket: https://s3-us-west-2.amazonaws.com/localProvisionRepo

description

(Optional) Defines a textual description of the repository.

If annotation is enabled for the Configuration Management category in the CCM or Configuration domain, you must also provide an annotation to justify your action. For more information, see Annotation Input.

provision repository::get

The provision repository::get command enables you to get details of a repository defined for provisioning actions.

  • CLI

  • REST

ctm provision repository::get <name>

The following example shows the REST API syntax for the provision repository::get command in cURL.

Copy
name=Location1
AuthHeader="x-api-key: $token"
# AuthHeader="Authorization: Bearer $token"  #for a session token
  
curl -H "$AuthHeader" "$endpoint/provision/repository/$name"

To select the AuthHeader value ("Authorization: Bearer $token" or "x-api-key: $token"), see Authentication Tokens.

where <name> is the name of the local repository defined for provisioning actions.

provision repositories::get

The provision repositories::get command enables you to get the details of all provisioning repositories defined in Control-M/EM.

  • CLI

  • REST

ctm provision repositories::get

The following example shows the REST API syntax for the provision repositories::get command in cURL.

Copy
AuthHeader="x-api-key: $token"
# AuthHeader="Authorization: Bearer $token"  #for a session token
  
curl -H "$AuthHeader" "$endpoint/provision/repositories"

To select the AuthHeader value ("Authorization: Bearer $token" or "x-api-key: $token"), see Authentication Tokens.

provision repository::delete

The provision repository::delete command enables you to delete a repository defined for provisioning actions from Control-M/EM. The response returns the details of all remaining repositories.

  • CLI

  • REST

ctm provision repository::delete <name>

The following example shows the REST API syntax for the provision repository::delete command in cURL.

Copy
name=Location1
AuthHeader="x-api-key: $token"
# AuthHeader="Authorization: Bearer $token"  #for a session token
  
curl -X DELETE -H "$AuthHeader" "$endpoint/provision/repository/$name"

To select the AuthHeader value ("Authorization: Bearer $token" or "x-api-key: $token"), see Authentication Tokens.

where <name> is the name of the defined local repository that you no longer want for provisioning actions.

If annotation is enabled for the Configuration Management category in the CCM or Configuration domain, you must also provide an annotation to justify your action. For more information, see Annotation Input.

provision repository::set

The provision repository::set command enables you to set the default repository for provisioning actions (of all provisioning repositories defined in Control-M/EM).

This API command is supported only through the CLI and cannot be called through a REST API command.

CLI Syntax

The following shows the CLI syntax for the provision repository::set command:

ctm provision repository::set <name>

where <name> is the name of the defined local repository that you want as the default for provisioning actions.

If the default repository is set in multiple ways, the actual default is determined according to the following order of precedence:

  1. As set by the -r option in the individual provison image or provision agent::install command.

  2. As set by the EXT_AUTO_DEPLOY and EXT_APPLICATION_ARTIFACTS_JSON_URL parameters via environment configure.

  3. As set by the following API command:

    provision repository::set.

See also Setting Up a Local Repository for Provision Images and Installation Packages.