Container Orchestration Jobs

The following topics describe job attributes for jobs that perform container orchestration:

AWS ECS Job

AWS Elastic Container Service (ECS) is a container management service that enables you to execute, stop, manage, and monitor containerized applications in a cluster.

To create an AWS ECS job, see Creating a Job. For more information about this plug-in, see Control-M for AWS ECS.

The following table describes the AWS ECS job attributes.

Attribute

Description

Connection Profile

Determines the authorization credentials that are used to connect Control-M to AWS ECS, as described in AWS ECS Connection Profile Parameters.

Rules:

  • Characters: 1−30

  • Case sensitive: Yes

  • Invalid characters: Blank spaces.

Action

Determines one of the following actions to perform on AWS ECS:

  • Preset JSON: Executes the task according to the attributes that you define in this job.

  • Manual JSON: Executes the task according to the JSON parameters that you supply in the Parameters attribute.

Parameters

Defines the parameters, in JSON format, that enable you to control how the AWS ECS task executes.

For a description of this JSON syntax, see RunTask in the AWS ECS API Reference.

Copy
"Parameters"
{
   "cluster": "ECSIntegrationCluster",
   "launchType": "FARGATE",
   "networkConfiguration":
   {
      "awsvpcConfiguration":
      {
         "assignPublicIp": "ENABLED",
         "securityGroups": ["sg-01e4a5bfac4189d10"],
         "subnets": ["subnet-045ddaf41d4852fd7"]
      }
   },
   "overrides":
   {
      "containerOverrides": [
      {
         "command":["/bin/sh -c 'whoami'"],
         "environment": [
            {
               "name":"var1",
               "value":"hello"
            } ],
         "name":"IntegrationURI"
      } ]
   },
   "taskDefinition":"ECSIntegrationTask"
}

ECS Cluster Name

Defines the ECS cluster on the AWS ECS platform where the job executes.

An ECS cluster is a logical group of tasks and services.

ECS Task Definition

Defines the task definition on the AWS ECS platform.

The task definition describes the container image, command, environment variables, and other parameters that execute your application.

Launch Type

Determines the type infrastructure where your tasks and services execute:

  • Fargate: Executes your application on a virtual machine that is automatically provisioned and managed.

  • EC2: Executes your application on a predefined AWS EC2 virtual machine that you provision and manage.

  • External: Executes your application on a different virtual machine that you define in the AWS ECS platform.

Assign Public IP

Determines whether the job has a public internet protocol (IP).

  • Yes

  • No

Network Security Groups

Defines which network security group your task is connected to, through the elastic network interface, which is a virtual network card that controls inbound and outbound traffic.

Network Subnets

Defines the virtual subnet, which determines the IP addresses for the task.

Override Container

Defines which override container to use that overrides the default container image, command, or other settings specified in the task definition.

Override Command

Defines the command to execute in the container that overrides any command specified in the task definition.

Environment Variables

Defines the environment variables for the container, which are used to manage the container and pass information to the application that executes inside it.

Logs

Determines whether the logs from the AWS ECS platform appear at the end of the Control-M job output.

  • Get Logs

  • Don't Get Logs

Status Polling Frequency

Determines the number of seconds to wait before checking the status of the job.

Default: 10

Failure Tolerance

Determines the number of times to check the job status before ending Not OK.

Default: 5

Azure Container Instances Job

Azure Container Instances enables you to run an isolated container in Azure, without having to manage any virtual machines and without having to adopt a higher-level service.

To create an Azure Container Instances job, see Creating a Job. For more information about this plug-in, see Control-M for Azure Container Instances .

The following table describes the Azure Container Instances job attributes.

Parameter

Description

Connection Profile

Determines the authorization credentials that are used to connect Control-M to Azure Container Instances, as described in Azure Container Instances Connection Profile Parameters.

Rules:

Characters: 1−30

Case sensitive: Yes

Invalid characters: Blank spaces.

Resource Group Name

Determines the Azure Resource Group that is associated with a specific container instance. A resource group is a container that holds related resources for an Azure solution.

The resource group can include all the resources for the solution, or only those resources that you want to manage as a group.

Container Group Name

Determines the container group name that is configured in Azure.

Append Log to Output

Determines whether to add the job log to the outputClosed A tab in the job properties pane of the Monitoring domain where the job output appears that indicates whether a job ended OK, and is used, for example, with jobs that check file location.. If you choose this option, the Container name, Tail, and Timestamps parameters are relevant.

Valid Values:

  • Checked

  • Unchecked

Default: Unchecked

Container Name

(Append Log to Output) Defines the container instance name that is configured in Azure under the Container group and used for the log.

Tail

(Append Log to Output) Defines the number of lines to show from the tail (end) of the Azure Container Instance log. To show all the available logs up to 4MB, leave this field empty .

Default: 10

Timestamps

(Append Log to Output) Determines whether to add a timestamp to every line of the log output.

Valid Values:

  • Checked

  • Unchecked

Default: Unchecked

Status Polling Frequency

Determines the number of seconds to wait before checking the job status.

Default: 60

Failure Tolerance

Determines the number of times to check the job status before ending Not OK.

Default: 2

GCP Cloud Run Job

GCP Cloud Run is a container management service that enables you to execute, stop, manage, and monitor containerized applications in a cluster.

To create a GCP Cloud Run job, see Creating a Job. For more information about this plug-in, see Control-M for GCP Cloud Run.

The following table describes the GCP Cloud Run job attributes.

Parameter

Description

Connection Profile

Determines the authorization credentials that are used to connect Control-M to GCP Cloud Run, as described in Container Orchestration Connection Profiles.

Rules:

Characters: 1−30

Case sensitive: Yes

Invalid characters: Blank spaces.

Project ID

Defines the ID of the predefined Google Cloud project that holds your configured APIs, authentication information, billing details, and job resources.

Location

Determines the region where the GCP Cloud Run job executes.

us-central1:

Job Name

Defines the unique job name set in GCP Cloud Run.

Overrides Specification

Defines the parameters, in JSON format, to override when the job executes, as shown in the following example:

Copy
{
  "containerOverrides": [
    {
      object (ContainerOverride)
    }
  ],
  "taskCount": integer,
  "timeout": string
}

Status Polling Frequency

Determines the number of seconds to wait before checking the job status.

Default: 5

Kubernetes Job

The Kubernetes job enables you to run a pod to completion in a Kubernetes-based cluster.

To deploy and run a Kubernetes job, ensure that you have set up Control-M for Kubernetes, as described in Setting Up Control-M for Kubernetes.

For more information about this plug-in, see Control-M for Kubernetes.

Parameter

Description

ConnectionProfile

Determines the authorization credentials that are used to connect Control-M to Kubernetes, as described in Kubernetes Connection Profile Parameters.

Job Spec Type

Determines how to obtain the Kubernetes job spec:

  • Local file: Upload the Kubernetes job spec YAML file during job definition.

  • Remote web service: Retrieve the Kubernetes job spec from a remote location at the time of job execution

Job Spec YAML

(Local file) Enables you to upload the YAML file that contains the Kubernetes job settings.

Copy
apiVersion: batch/v1
kind: Job
metadata:
  name: {{job_yaml_file_params:jobname}}
spec:
  template:
    spec:
      nodeSelector:
        kubernetes.io/os: linux
      containers:
      - name: busybox0
        image: busybox
        command: ["echo",  "Hello {{job_yaml_file_params:subject}}"]
      restartPolicy: Never
  backoffLimit: 4

Job Spec Parameters

(Local file) Defines input parameters required by the Kubernetes job, as name:value pairs.

{"jobname":"ctmjob-%%ORDERID","iterations":"10","delay":"20"}

Spec Request Path

(Remote web service) Defines the request path to the Kubernetes job spec in the remote location.

/jobs/myspec.yaml

Spec Request Method

(Remote web service) Determines one of the following HTTP methods that is used to execute the REST request to retrieve the Kubernetes job spec from a remote location at the time of job execution:

  • GET: Reads or retrieves data from a resource.
  • POST: Adds a new resource.

Spec Request Parameters

(Remote web service) Defines optional URL parameters, as Key:Value pairs.

Spec Request Headers

(Remote web service) Defines optional HTTP headers, as Key:Value pairs.

If you created a connection profile that authenticates with OAuth2, as described in Kubernetes Connection Profile Parameters, you must define the following HTTP header key name and value:

  • Key: Authorization

  • Value: <Empty>

Request Definition

(Remote web service) Determines whether to define a REST request body, and how to do so:

  • Edit request body: Textual input of the body

  • Specify only URL parameters and headers: No request body (only URL parameters and headers)

  • Use a predefined request body from a local file

Body

(Remote web service) Defines the request body as textual input, in JSON format.

filename

(Remote web service) Defines the full path to a local file that contains a predefined request body.

/home/jobdefs/request-body.txt

Get Pod Logs

Determines whether to fetch logs of the pods of the Kubernetes job upon completion and append to the Control-M job output. The maximum output size is 10 megabytes.

  • Get Logs

  • Do Not Get

Default: Get Logs

OS Exit Code

Determines whether to include an OS return code from the Application pod in the Control-M job output. This is supported for a Kubernetes job without retries (backofflimit: 0) of a single-container pod. Introduced in Control-M for Kubernetes 9.0.21.205.

Valid values:

  • No print

  • Print code of single pod

Default: No print

Job Cleanup

Determines whether to delete Kubernetes resources that were created for the job.

  • Delete Job

  • Keep

Default: Delete Job

Job Status Polling Interval

Determines the number of seconds between status checks of the Kubernetes job.

Default: 20 seconds