Updated on 2024-12-05 GMT+08:00

Quick Job Execution

Scenarios

COC is a secure and efficient O&M platform, offering one-stop, AI-powered solutions for all your centralized O&M needs. The job management function of COC allows you to customize jobs and execute jobs on target VMs. You can use this function to perform operations on target instances, which can be ECSs or BMSs currently.

This section describes how to restart an ECS on COC.

Operation Process

Procedure

Description

Prepare for the task.

Register a HUAWEI ID, complete real-name authentication, and enable COC.

Step 1: Synchronize resources.

Obtain resources in all regions to which the current user belongs and synchronize the resources to COC.

Step 2: Install an UniAgent.

Install an UniAgent on each desired node for information exchange between COC, lower-layer services, and hosts.

Step 3: Execute a job.

On COC, you can enjoy automated job execution on ECSs.

Preparations

  1. Sign up with Huawei Cloud and complete real-name authentication.

    Before using COC, Sign up for a HUAWEI ID, enable Huawei Cloud services, and thencomplete real-name authentication.

    If you already have enabled Huawei Cloud services and completed real-name authentication, skip this step.

  2. Enable COC.

    Upon your first login, enable COC first.

    If you have enabled COC, skip this step.

Step 1: Synchronize resources.

  1. Log in to COC.
  2. Click in the upper left corner on the Overview page and select a region.
  3. In the navigation pane, choose Resources > Application and Resource Management.
  4. Click to synchronize resources.
    Figure 1 Synchronizing resources

Step 2: Installing a UniAgent

  1. Access the Resources tab page, select the target ECSs and choose UniAgent > Install.
    Figure 2 Installing a UniAgent
  2. Click manually install UniAgent. The page for manually installing the UniAgent is displayed.
    Figure 3 UniAgent installation page
  3. Run the installation command on the page to manually install the UniAgent.
    Figure 4 Manually installing a UniAgent

Step 3: Executing a Job

  1. In the navigation pane on the left, choose Resource O&M > Automated O&M.
  2. In the Routine O&M area, click Jobs.
  3. Click the Public Jobs tab.
  4. Select All Jobs, locate the ECS restart job, and click Execute.
    Figure 5 Selecting a job to execute
  5. Set execution type and basic information.
    Figure 6 Parameters in the Execution Type and Basic Information areas
    Table 1 Parameters in the execution type and basic information areas

    Parameter

    Example Value

    Description

    Execution Type

    Single

    Select the scope of the jobs to be executed.

    IAM Agency

    ServiceLinkedAgencyForCOC

    Scope of permissions that can be used by COC to execute jobs.

  6. Set the execution content.
    Figure 7 Parameters in the Execution Content area
    Table 2 Parameters in the Execution Content area

    Parameter

    Example Value

    Description

    Region

    CN North-Ulanqab203

    Select the region in which the target instance is located.

    Target Instance Mode

    Consistent for all steps

    Select the execution mode for job steps and target instances.

    Target Instance

    -

    Select the target instance to execute the job.

    Batch Policy

    No Batch

    Batch execution policy of the target instance.

  7. Click Submit.
  8. Confirm the job configurations and click OK. The service ticket details page is displayed.
  9. Refresh the page and view the job execution status.