Environment service
The Environment service enables you to manage environments, including defining and selecting the Control-M environment to use. An environment is a combination of an endPoint and token.
An endPoint looks like the following:
https://<controlmEndPointHost>/automation-api
The Helix Control-M endpoint host has the following format: <tenant-name>-aapi.prod.controlm.com.
Environments are saved in an env.json file located in the home user with read/write permissions only for the logged in user under .ctm folder.
env.json is encrypted.
For example, the following command adds an environment named myEnvironment:
ctm environment add myEnvironment "https://tenant-123-aapi.prod.controlm.com/automation-api" "<token>"
where <token> is the name of a valid token. For more about tokens, see Authentication service.
environment show
Returns a list of all defined environments.
CLI Syntax
ctm environment show
environment add
Adds a new environment for a Control-M instance.
CLI Syntax
ctm environment add <env> <endPoint> <token>
Where:
Parameter | Description |
---|---|
<env> | Environment name |
<endPoint> | Control-M REST API endPoint |
<token> | An API authentication token that allows the logged-in user to submit API requests For more about tokens, see Authentication service. |
environment set
Sets the default environment for interactive work. All commands are sent to this environment unless a different environment is defined using the -e option.
Note
When no environments are defined and you add the very first environment (using the environment add command), that first environment is automatically set as the default. Later, after additional environments have been defined, use this command to set a new default.
CLI Syntax
ctm environment set <env>
Where:
Parameter | Description |
---|---|
<env> | Environment name |
environment delete
Deletes an environment.
CLI Syntax
ctm environment delete <env>
Where:
Parameter | Description |
---|---|
<env> | Environment name |
environment update
Updates an environment property. The property <name> can be an endPoint and token, or additionalLoginHeader.
CLI Syntax
>ctm environment update <env> <name> <value>
Where:
Parameter | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
<env> | Environment name | ||||||||
<name> | The name of the property, one of the following:
| ||||||||
<value> | Property value for the specified property name:
|
environment copy
Duplicates an environment.
CLI Syntax
ctm environment <env> <newEnv>
Where:
Parameter | Description |
---|---|
<env> | Environment name |
<newEnv> | Name of the new environment |
environment load
This command allows you to load a predefined env.json to your environment definitions.
The file that you are importing must include passwords that are decoded. When saved to the user's env.json file, the passwords are encrypted.
CLI Syntax
ctm environment load <enviromentsFile>
Where:
Parameter | Description |
---|---|
<enviromentsFile> | An env.json file |
environment configure
This command allows you to set parameters for all environments.
CLI Syntax
ctm environment configure <setting name> [setting value]
Where:
Parameter | Description |
---|---|
<setting name> | Parameter name |
[setting value] | Parameter value |
Possible parameters:
Parameter | Value | Default | Description |
---|---|---|---|
rootCertificateRequired | false | true | false | Disable API calls that use a self-signed HTTPS certificate, and allow only certificates that are signed by a trusted Certificate Authority. By default, self-signed certificates are allowed. |
EXT_APPLICATION_ARTIFACTS_JSON_URL | path to local repository of images | N/A | Set a path to a local repository of provisioning images, overriding the location used by default for provisioning actions performed by the Provision service. |
EXT_AUTO_DEPLOY | path to local repository of installation artifacts | N/A | Set a path to a local repository of installation artifacts for provisioning actions performed by the Provision service. |
listenerLogSizeMb | maximum log size in megabytes | 10 MB | The maximum size of Alerts listener logs stored in <HOME>/.ctm/logs. |
listenerMaxFileCount | number of log files to save | 10 logs | The number of most recent Alerts listener log files to save in <HOME>/.ctm/logs. |
listenerLogLevel | In descending severity and ascending detail:
| info | The level of severity and detail of messages in the Alerts listener logs stored in <HOME>/.ctm/logs. |
Comments
Log in or register to comment.