O&M Assistant allows you to create, run, and delete commands on an exclusive resource group. It also allows you to view the execution results of the commands and orchestrate commands in the environment baseline.

Notice
  • Currently, the O&M Assistant feature is only available in the China (Shanghai) region.
  • The O&M Assistant button is available only for exclusive resource groups for scheduling that are in the running state.

Go to the O&M Assistant page

  1. Log on to the DataWorks console.
  2. In the left-side navigation pane, click Resource Groups. The Exclusive Resource Groups tab appears by default.
  3. Click O&M Assistant in the Actions column of an exclusive resource group for scheduling.

    On the page that appears, you can perform relevant operations, including creating, running, and deleting commands, viewing the execution results of commands, and orchestrating commands in the environment baseline.

Create a command

  1. On the O&M Assistant page, click Create Command in the upper-right corner.
  2. In the Create Command dialog box that appears, set relevant parameters.
    Parameter Description
    Command Name The name of the command.
    Command Description The description of the command.
    Command Type The type of the command. Currently, only shell commands are supported.
    Command Content The content of the command.
    Note In the /home/ directory, only the /home/admin/usertools/tools/ directory is writable.

    We recommend that you install required packages in the /home/admin/usertools/tools/ directory or a directory not in /home/.

    Installation Directories The parent directory of the directory where the command is to be run. The specified parent directory is added to the directory whitelist. Separate multiple directories with semicolons (;), for example,/usr/tools/tool_a;/usr/tools/tool_b.
    Timeout The timeout period of the command. Unit: seconds. When the command times out, the system forcibly stops running the command.
  3. After setting the preceding parameters, click Create Command.

Run a command

After you create a command, click Run Command in the Actions column of the command to run the command.

View the execution result of a command

After you run a command, click View Result in the Actions column of the command in the result section to view the execution result and details.

Delete a command

To delete a command, click Delete in the Actions column of the command. In the Delete Command dialog box that appears, click Yes.

Orchestrate commands in the environment baseline

The environment baseline indicates a series of commands to be run in the specified sequence for preparing the environment on Elastic Compute Service (ECS) instances of an exclusive resource group. When you scale out an exclusive resource group, the environment baseline is run on the new ECS instances to prepare the environment. This guarantees that the environment remains unchanged on the new ECS instances and therefore nodes are run in the same environment.

After you add the commands that were run in O&M Assistant to the environment baseline, the commands are also run in the specified sequence on the new ECS instances after a scale-out.

Note Only commands added to the environment baseline are run on the new ECS instances based on the specified sequence.
  1. Click Environment Baseline Command Orchestration in the upper-right corner.
  2. In the Environment Baseline Command Orchestration dialog box that appears, set Commands and adjust the sequence of the commands.
  3. Select the check box for The content and sequence of the baseline commands have been confirmed.
  4. Click Yes.

Limits

  • You cannot edit a command after creating it. To edit a command, delete it and create a new one.
  • To prevent commands from being run repeatedly and avoid inconsistencies between environments on ECS instances of an exclusive resource group, O&M Assistant does not allow you to manually run or delete commands that have been added to the environment baseline.
  • Currently, only shell commands are supported.
  • In the /home/ directory, only the /home/admin/usertools/tools/ directory is writable.

    We recommend that you install required packages in the /home/admin/usertools/tools/ directory or a directory not in /home/.