Using Console

Last updated: 2020-06-23 15:52:58

    Quick Start

    This document describes how to submit a job in the BatchCompute Console. The steps are as follows:

    Preparations

    Prepare a COS bucket. If you haven't created a bucket yet, create one as instructed in Creating Bucket.

    Logging in to console

    If you haven't activated the BatchCompute service, activate it as prompted on the BatchCompute Console page.

    Creating task template

    1. Select Task Template on the left sidebar and select the target region at the top of the page, such as "Guangzhou".
    2. Click Create to enter the "Create Task Template" page and create a template as shown below:

      Main parameters include:
      • Name: custom name, such as hello.
      • Description: custom description, such as hello demo.
      • Compute Environment Type:
        • Existing Compute Environment: you can select an existing compute environment.
        • Automatic Compute Environment: you don't need to pre-create a fixed compute environment. After a job is submitted, a CVM instance will be created automatically to run the task and terminated automatically after task completion.
      • Image: select as needed.
      • Number of Resources: such as 1.
      • Timeout Period and Number of Retries: keep the default values.
    3. Click Next to configure the program information as shown below:
      • Execution Method: select "Local".
      • Stdout Log: for more information on the format, please see How to Enter COS and CFS Paths.
      • Stderr Log: same as Stdout log.
      • Command Line: echo 'hello, world'.
    4. Click Next to set the storage mapping as shown below:
    5. Click Next, preview the task's JSON file, and click Save after confirming that everything is correct.
    6. After creating a template successfully, you can view it on the "Task Template" list page as shown below:

    Submitting job

    1. Select Job on the left sidebar and select the target region at the top of the page, such as "Guangzhou".
    2. Click Create to enter the "Create Job" page and configure job information as shown below:
      • Job Name: custom name, such as hello.
      • Priority: keep the default value.
      • Description: custom description, such as hello demo.
    3. Select the "hello" task on the left on the "Task Flow" page and drag the task to the canvas on the right as shown below:
    4. In "Task Details" on the right on the "Task Flow" page, confirm that the configuration is correct, and click Complete.
    5. You can view the running status of a job on the "Job" list page as shown below:
      • Click a job ID to view the running status of each task instance in the Task Running Status tab.
      • Click Query Log to view the standard output and standard error of a task instance as shown below:

    What's Next?

    In this simplest example, the job only contains a single task. It does not use remote storage mapping, but only shows the most basic capabilities. You can continue to test the advanced capabilities of BatchCompute as instructed in the Console User Guide.

    • Various CVM configurations: BatchCompute provides a variety of CVM configuration options. You can customize your own CVM configuration based on your business scenario.
    • Remote code package execution: technically, BatchCompute can fully satisfy your business needs by combining custom image, remote code package, and command line.
    • Remote storage mapping: BatchCompute optimizes storage access and simplifies access to remote storage services into operations in the local file system.