Google Cloud Batch Jobs: Create Job

{}

Automic Automation Create Batch jobs allow you to create a Job object on your Google Batch environment from Automic Automation.

Defining Google Cloud Batch Create Job Properties

On the Create Job page, you define the parameters relevant to creating the job on Google Batch:

  • Connection

    Select the Google Batch Connection object containing the relevant information to connect to the application.

    To search for a Connection object, start typing its name to limit the list of objects that match your input.

  • Project ID

    Enter the ID of the GCP project, which helps organize and manage your GCP-Batch resources by associating them with a particular project within your cloud environment

  • Location

    Enter the location (region) in which your Google Batch resources are hosted. For example: us-central1

  • Task Details

    This field offers a dropdown with options to provide the payload as JSON or via a JSON file path.

    • JSON

      Use the JSON field to enter the JSON payload definition.

      Important!

      There are many options available to define the JSON payload. For more information and examples of the JSON definition, see Google Cloud Batch Jobs: Create Job.

    • JSON File Path

      Use the JSON File Path field to define the path to the JSON file containing the attributes that you want to pass to the application. Make sure that the file is available on the Agent machine (host).

    Note:

    The Pre-Process page allows you to define the settings of the Jobs using script statements. These statements are processed before the Google Batch Job is executed, see Google Cloud Batch Jobs: Setting Job Properties Through Scripts.

Defining the JSON

This section gives you examples of how you could define the JSON field when defining a Create Job. You have different options available.

Simple JSON Definition

The first option to define the JSON field is a simple payload definition. To do so, make sure you define the parameters required to define the cluster, such as name, operation type, location, and so on.

Using Variables

You can also use variables in the payload definition.

Example

In the JSON field, enter the following:

&CREATEPARA#

If the variable is not defined yet, you must define it now. You do it on the Variables page of the Create Job definition:

(Click to expand)

Screenshot of the variable definition.

When you execute the Job, the variables will be replaced with the value you have just defined. This is visible in the Agent log (PLOG), see Monitoring Google Cloud Batch Jobs.

Google Cloud Batch Create Jobs in a Workflow

You can also use the JSON field if you want to include a Create Job in a Workflow and you want to use Automation Engine variables in it.

Example

In the Workflow, a Script object (SCRI) with the variable definition relevant for the submit parameters and the Location ID precedes your Create Job

(Click to expand)

Screenshot of the script that precedes a workflow.

In the Submit Job definition, you include those variables:

(Click to expand)

Screenshot of the definition of the variables in a workflow.

When the Job is executed, the variables will be replaced with the value you have just defined. This is visible in the Agent (PLOG) report, see Monitoring Google Cloud Batch Jobs.

See also: