Page History
...
- The JS7 offers to perform operations on Controllers and Agents by use of the JS7 - REST Web Service API.
- For detailed information see the Technical Documentation of the REST Web Service API.
- The REST Web Service API can be accessed from Shell utilities such as
curl
. - In addition, a PowerShell module is available for simplified access to the REST Web Service API. This is described in the JS7 - PowerShell Module article.
The Controller Management Script offered for Unix Shell can be applied to perform frequently used operations on Controllers and Agents.
Use of a Controller Cluster or Agent Cluster is subject to the JS7 - License.
Controller Management Script
Operation | Object | Documentation |
---|---|---|
register / unregister / check | Standalone Controller Controller Cluster | JS7 - Controller Cluster |
store / delete | Standalone Agent Agent Cluster | JS7 - Agent Cluster JS7 - Management of Standalone Agents JS7 - Management of Agent Clusters |
deploy / revoke | ||
export / import | ||
store / delete | Subagent | |
store / delete | Subagent Cluster | |
deploy / revoke |
The script is offered for download and can be applied for frequently used management operations:
...
Anchor | ||||
---|---|---|---|---|
|
register
- Allows to register registering a Controller. The command comes in two flavors:
- register a Standalone Controller using the
--primary-url
option. - register a Controller Cluster using the
--primary-url
and--secondary-url
options.
- register a Standalone Controller using the
- The URLs specify the protocol, host and optionally port by which the Controller instance can be accessed from JOC Cockpit, for example
http://localhost:4444
. - Controller instances are assigned a Controller ID on installation. When registering the Controller it will automatically use the given Controller ID.
- Allows to register registering a Controller. The command comes in two flavors:
unregister
- Allows to unregister unregistering a Controller specifying the
--controller-id
option. Unregistering a Controller deletes the Controller and related Agents from the inventory
- Allows to unregister unregistering a Controller specifying the
- check
- Tests the connection between JOC Cockpit and a Controller instance. The operation is available before a Controller is registered.
- The
--controller-url
must be specified that is used from JOC Cockpit to connect to the Controller.
store-agent
When Agents are stored, then they are added or updated in the inventory and are set to the not deployed status. The command comes in two flavors:
- store Standalone Agent: requires to specify the the
--controller-id
and--agent-id
option options that holds specify the unique identifier of an Agent. The Agent ID cannot be changed later on. The--agent-name
option specifies the unique name of an Agent that can be changed later on. The--agent-url
option specifies the protocol, host and optionally port by which the Agent can be accessed from the Controller.. - store Agent Cluster: requires to specify the the
--controller-id
,--agent-id
and--agent-name
options. An Agent Cluster includes a Primary and Secondary Director Agent.- The Primary Director Agent is specified from the
--primary-subagent-id
and--primary-url
options that are use used similarly to above--agent-id
and--agent-url
options. - The Secondary Director Agent is specified from the
--secondary-subagent-id
and--secondary-url
options that are use used similarly to above--agent-id
and--agent-url
options.
- The Primary Director Agent is specified from the
- store Standalone Agent: requires to specify the the
- The
deploy-agent
command can be used to deploy the Agent configuration.
delete-agent
- When Agents are removed, then they will be deleted from the Controller and from the inventory.
- Deletion of Agents will be denied by the Controller if we find deployed workflows that hold jobs assigned the Standalone Agent or related Subagent Cluster of an Agent Cluster. The JS7 - Unix Shell CLI for Workflow Deployment Operations offers commands to revoke related workflows.
- The command is used with the the
--controller-id
and--agent-id
option options to identify the related Agent.
deploy-agent
- When Agents are deployed, then the Agent configuration will be made available to the Controller which connects to the related Agent. As a prerequisite for deployment the Agent must be up & running and must be reachable for the Controller to establish a connection. The same applies to Subagents that have been added to an Agent Cluster using the
store-subagent
command. - The command is used with the the
--controller-id
and--agent-id
option options to identify the related Agent. For deployment of an Agent Cluster the--cluster
switch must be used.
- When Agents are deployed, then the Agent configuration will be made available to the Controller which connects to the related Agent. As a prerequisite for deployment the Agent must be up & running and must be reachable for the Controller to establish a connection. The same applies to Subagents that have been added to an Agent Cluster using the
revoke-agent
- When Agents are revoked then the Agent configuration is deleted from the Controller, but remains in place with the inventory and will be set to the not deployed status.
- Revocation of Agents will be denied by the Controller if we find deployed workflows that hold jobs assigned the Standalone Agent or related Subagent Cluster of an Agent Cluster. The JS7 - Unix Shell CLI for Workflow Deployment Operations offers commands to revoke related workflows.
- The command is used with the the
--controller-id
and--agent-id
option options to identify the related Agent. For revocation of an Agent Cluster the--cluster
switch must be used.
store-subagent
- Subagents are used in an Agent Cluster acting as worker nodes to execute jobs. When Subagents are stored, then they are added or updated in the inventory and will be set to the not deployed status. Subagents are not deployed individually. Instead, they are deployed with the Agent Cluster using the
deploy-agent
command. - The command is used with the
--controller-id
and--agent-id
options which identify the Agent Cluster. The--subagent-id
and--subagent-url
options specify the unique identifier of a Subagent and its URL.
- Subagents are used in an Agent Cluster acting as worker nodes to execute jobs. When Subagents are stored, then they are added or updated in the inventory and will be set to the not deployed status. Subagents are not deployed individually. Instead, they are deployed with the Agent Cluster using the
delete-subagent
- Subagents are deleted from the Agent Cluster and related Subagent Clusters. The operation deletes Subagents from the Agent Cluster and from the inventory.
- The command is used with the
--controller-id
and--subagent-id
options to identify the related Subagent.
store-cluster
- Subagent Clusters implement clustering from the selection of the Subagents involved and from the scheduling mode being active-passive (fixed-priority) or active-active (round-robin).
- logical
- To store a Subagent Cluster users speicfy specify the
--controller-id
and--agent-id
options that identify the Agent Cluster. The--cluster-id
option specifies the unique identifier of the cluster to be created. The--subagent-id
option specifies one or more Subagents spearated by comma that are used in the cluster. For an active-passive cluster the first Subagent specified will execute the jobs and if it becomes unavailable then the next Subagent will be used. - The
--priority
option specifies an active-passive or active-active cluster. The option accepts one fo the valuesfirst
(active-passive) ornext
(active-active). Default:first
.
delete-cluster
- The Subagent Cluster is deleted from the Agent Cluster and from the inventory. Subagents used in the Subagent Cluster are not deletedused in the Subagent Cluster are not deleted.
- Deletion of a Subagent Cluster will be denied by the Controller if we find deployed workflows that hold jobs assigned the Subagent Cluster. The JS7 - Unix Shell CLI for Workflow Deployment Operations offers commands to revoke related workflows.
- The command is used with the
--controller-id
and--cluster-id
options to identify the Subagent Cluster.
deploy-cluster
- The Subagent Cluster is made available to the Agent Cluster. A deployed Subagent Cluster can be used for assignment to jobs.
- The command is used with the
--controller-id
and--cluster-id
options to identify the Subagent Cluster.
revoke-cluster
- The Subagent Cluster is deleted from the Agent Cluster but remains in place with the inventory and is set to the not deployed status.
- Revocation of a Subagent Cluster will be denied by the Controller if we find deployed workflows that hold jobs assigned the Subagent Cluster. The JS7 - Unix Shell CLI for Workflow Deployment Operations offers commands to revoke related workflows.
- The command is used with the
--controller-id
and--cluster-id
options to identify the Subagent Cluster.
export-agent
Agent configurations can be exported to an archive file using the
--file
option. The archive file will be created in .zip or .tar.gz format using the--format
option. Default: ZIP.
import-agent
- For import of Agent configurations users can specify that existing Agent configurations with the same Agent IDs should be overwritten using the
--overwrite
switch.
- For import of Agent configurations users can specify that existing Agent configurations with the same Agent IDs should be overwritten using the
...
--url
- Specifies the URL by which JOC Cockpit is accessible using
<http|https>://<host>:<port>
. - Example: http://centostest-primary.sos:4446
- Example: https://centostest-primary.sos:4443
- Specifies the URL by which JOC Cockpit is accessible using
--user
- Specifies the user account for login to JOC Cockpit. If JS7 - Identity Services are available for Client authentication certificates that are specified with the
--client-cert
and--client-key
options then their common name (CN) attribute has to match the user account. - If a user account is specified then a password can be specified using the
--password
option or interactive keyboard input can be prompted using the-p
switch.
- Specifies the user account for login to JOC Cockpit. If JS7 - Identity Services are available for Client authentication certificates that are specified with the
--password
- Specifies the password used for the account specified with the
--user
option for login to JOC Cockpit. - Consider use of the
-p
switch offering a secure option for interactive keyboard input.
- Specifies the password used for the account specified with the
--ca-cert
- Specifies the path to a file in PEM format that holds the Root CA Certificate and optionally Intermediate CA Certificates to verify HTTPS connections to JOC Cockpit.
--client-cert
- Specifies the path to a file in PEM format that holds the Client Certificate if HTTPS mutual authentication is used..
--client-key
- Specifies the path to a file in PEM format that holds the Client Private Key if HTTPS mutual authentication is used..
--timeout
- Specifies the maximum duration for requests to the JS7 REST Web Service. Default:
60
seconds.
- Specifies the maximum duration for requests to the JS7 REST Web Service. Default:
--controller-id
- Specifies the identification of the Controller.
--controller-url
- When used with the
check
command, specifies the protocol, host and optionally port of the Controller instance to which the connection is tested.
- When used with the
--primary-url
- When used with the
register
command, specifies the protocol, host and optionally port of a Standalone Controller or Primary Controller instance in a cluster. The JOC Cockpit will connect to the Controller instance using the URL specified. - When used with the
store-agent
command for an Agent Cluster, specifies the protocol, host and optionally port of the Primary Director Agent. The Controller will connect to the Director Agent insttance instance using the URL specified.
- When used with the
--primary-cluster-url
- Specifies the URL used by the Pirmary Controller instance to connect to the Secondary Controller instance in a cluster. The URL can be specified if it is different from the value specified with the
--primary-url
option used for access from JOC Cockpit to the Primary Controller instance. - .The option can be used for example if a proxy service is active between Controller instances.
- Specifies the URL used by the Pirmary Controller instance to connect to the Secondary Controller instance in a cluster. The URL can be specified if it is different from the value specified with the
--primary-title
- When used with the
register
command specifies the title of a Standalone Controller or Primary Controller instance. - When used with the
store-agent
command specifies the title of the Primary Director Agent in an Agent Cluster.
- When used with the
--primary-subagent-id
- When used with the
store-agent
command specifies the identifier of the Primary Director Agent in an Agent Cluster.
- When used with the
--secondary-url
- When used with the
register
command, specifies the protocol, host and optionally port of a Secondary Controller instance in a cluster. The JOC Cockpit will connect to the Controller instance using the URL specified. - When used with the
store-agent
command for an Agent Cluster specifies the protocol, host and optionally port of the Secondary Director Agent. The Controller will connect to the Director Agent insttance instance using the URL specified.
- When used with the
--secondary-cluster-url
- Specifies the URL used by the Secondary Controller instance to connect to the Primary Controller instance in a cluster. The URL can be specified if it is different from the value specified with the
--secondary-url
option used for access from JOC Cockpit to the Secondary Controller instance. - .The option can be used for example if a proxy service is active between Controller instances.
- Specifies the URL used by the Secondary Controller instance to connect to the Primary Controller instance in a cluster. The URL can be specified if it is different from the value specified with the
--secondary-title
- When used with the
register
command, specifies the title of the Secondary Controller instance. - When used with the
store-agent
command, specifies the title of the Secondary Director Agent in an Agent Cluster.
- When used with the
--secondary-subagent-id
- When used with the
store-agent
command, specifies the identifier of the Secondary Director Agent in an Agent Cluster.
- When used with the
--file
- Specifies the location of an archive file that is used with
export-agent
andimport-agent
commands. - On export an existing archive file will be overwritten.
- Specifies the location of an archive file that is used with
--format
- Specifies the format of the archive file indicated with the
--file
option. - The format can be one of
ZIP
orTAR_GZ
. Default:ZIP
. The JS7 can process archive files in .zip format on Unix.
- Specifies the format of the archive file indicated with the
--agent-id
- The Agent ID specifies a unique identifier for a Standalone Agent or Agent Cluster that cannot be changed later on.
- Agents are identified from their Agent ID.
--agent-name
- The Agent name specifies a unique identifier for a Standalone Agent or Agent Cluster that can be changed later on..
--agent-url
- When used with the
store-agent
command, the option specifies the protocol, host and optionally port of a Standalone Agent.
- When used with the
--title
- Specifies the title of a Controller, Agent or Subagent Cluster with related
register
,store-agent
andstore-cluster
commands.
- Specifies the title of a Controller, Agent or Subagent Cluster with related
--alias
- When used with the
store-agent
command, the option specifies alternative names for a Standalone Agent or Subagent Agent Cluster. Any number of alias names can be specified separated by comma. - Alias names can be used for assignment of Agents to jobs.
- When used with the
--process-limit
- Specifies the maximum number of processes running in parallel in a Standalone Agent or Agent Cluster.
- For In an Agent Cluster the maximum number of processes is counted for all Subagents.
--subagent-id
- When used with the
store-subagent
anddelete-subagent
commands, the option specifies the related Subagent. - When used with the
store-cluster
command, any number of Subagent IDs can be specified separated by comma. This allows to specify Subagents that are members of a Subagent Cluster.
- When used with the
--subagent-url
- The option is used with the
store-subagent
command to specify the proocol, host and port by which the Subagent can be reached.
- The option is used with the
--role
- When used with the
store-subagent
command, the Subagent's role can be specified. In an Agent Cluster we find the following roles:- Primary Director
- Secondary Director
- No Director
- The option accepts the values
primary
,secondary
,no
. Default:no
.
- When used with the
--cluster-id
- Specifies the unique identifier of a Subagent Cluster. The Subagent Cluster ID cannot be changed after the Subagent Cluster is created.
- The option is used with the
store-cluster
,delete-cluster
,deploy-cluster
andrevoke-cluster
commands.
--priority
- Specifies an active-passive or active-active Subagent Cluster. The option accepts one fo the values
first
(active-passive) ornext
(active-active). Default:first
. - The option is used with the
store-cluster
command.
- Specifies an active-passive or active-active Subagent Cluster. The option accepts one fo the values
--audit-message
- Specifies a message that is made available to the Audit Log.
- Specification of Audit Log messages can be enforced on a per user basis and for a JS7 environment.
--audit-time-spent
- Specifies the time spent to perform an operation which is added to the Audit Log.
- The option can be specified if the -
-audit-message
option is used.
--audit-link
- Specifies a link (URL) which is added to the Audit Log.
- The option can be specified if the -
-audit-message
option is used.
--log-dir
- If a log directory is specified then the script will log information about processing steps to a log file in this directory.
- File names are created according to the pattern:
deploy-workflow.<yyyy>-<MM>-<dd>T<hh>-<mm>-<ss>.log
- For example:
deploy-workflow.2022-03-19T20-50-45.log
...