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

Notice The O&M Assistant feature is available only for exclusive resource groups for scheduling that are in the running state.

Limits

  • You cannot edit a command after you create it. To edit a command, delete it and create another one.
  • To prevent commands from being repeatedly run and avoid inconsistency between environment baselines, O&M Assistant does not allow you to manually run or delete commands that have been added to the environment baseline.
  • Only shell commands are supported.
  • In the /home/ directory, only the /home/admin/usertools/tools/ directory is writable. Other directories in the /home/ directory are not writable.

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

Go to the O&M Assistant page

  1. Log on to the DataWorks console.
  2. In the left-side navigation pane, click Resource Groups. By default, the Exclusive Resource Groups tab appears.
  3. Find the required resource group and click O&M Assistant.

    On the O&M Assistant page of the resource group, you can perform the following operations: create and run commands, view execution results, and orchestrate commands in the environment baseline.

Create a command

  1. On the O&M Assistant page, click Create Command.
  2. In the Create Command panel, set the parameters as required.
    Parameter Description
    Command Name The name of the command.
    Command Description The brief description of the command.
    Command Type The type of the command. Only shell commands are supported.
    Command Content The content of the command to be run.
    Note In the /home/ directory, only the /home/admin/usertools/tools/ directory is writable. Other directories in the /home/ directory are not writable. The directory is writable only on the O&M Assistant page. You cannot write data to the directory when you run nodes.

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

    Installation Directories The parent directory of the directory where the command is to be run. The specified parent directory will be added to the directory whitelist. Separate multiple directories with semicolons (;). 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 you set the preceding parameters, click Create.

Run a command

After you create a command, find the command and click Run command.

View the execution result

After you run a command, click View Result for the command in the lower part of the page to view the execution result and details.

Delete a command

To delete a command, find the command and click Delete. In the Delete Command message, click OK.

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 for an exclusive resource group. When you scale out an exclusive resource group, the environment baseline is run to prepare the environment. This ensures consistency between the new environment and original environment. This way, nodes can be run in the same environment.

After you add the commands that are run in O&M Assistant to the environment baseline, the commands are also run in the specified sequence for the resources that are obtained after the scale-out.

Note Only commands added to the environment baseline are run in the new environment based on the specified sequence.
  1. Click Environment Baseline Command Orchestration.
  2. In the Environment Baseline Command Orchestration dialog box, set the Commands parameter and adjust the sequence of the commands.
  3. Select The content and sequence of the baseline commands have been confirmed.
  4. Click OK.