Updated on 2025-08-11 GMT+08:00

Adding MRS Node Bootstrap Actions and Installing Third-Party Software

Prerequisites

You have prepared the bootstrap action script by referring to Preparing the Bootstrap Action Script for an MRS Node.

Adding Bootstrap Actions

Bootstrap actions can be added during or after cluster creation. You can also configure the automatic execution script on the auto scaling page.

  1. Go to the Buy Cluster page.
  2. Click Custom Config.
  3. Configure the cluster software and hardware by referring to Buying a Custom MRS Cluster.
  4. Enable Advanced Configuration, click Add in the Bootstrap Action area, and configure the following parameters.

    Table 1 Parameter description

    Parameter

    Description

    Example Value

    Name

    Name of the bootstrap action script. The name must be unique within a cluster, but can be the same across different clusters.

    The value can contain only digits, letters, spaces, hyphens (-), and underscores (_) and must not start with a space. The value can contain 1 to 64 characters.

    bootstrap_0

    Script Path

    Path of the script. The value can be an OBS file system path or a local VM path.

    The path must be unique within a cluster, but can be the same across different clusters.

    • An OBS file system path must start with obs:// and end with .sh, for example, obs://mrs-samples/xxx.sh.
    • A local VM path must start with a slash (/) and end with .sh.

    obs://mrs-samples/xxx.sh

    Parameter

    Bootstrap action script parameters

    -

    Execution Node

    Select a type of the node where the bootstrap action script is executed.

    -

    Executed

    Select the time when the bootstrap action script is executed.

    To add bootstrap actions for a running cluster, you can only manually run the third-party component installation script on the node.

    • Before initial component start
    • After initial component start

    After initial component start

    Action upon Failure

    Whether to continue to execute subsequent scripts and create a cluster after the script fails to be executed.

    You are advised to set this parameter to Continue in the debugging phase so that the cluster can continue to be installed and started no matter whether the bootstrap action is successful.

    Continue

    Run as root

    Whether to escalate the permission to user root. (This parameter is available only in clusters of MRS 3.1.5, MRS 3.3.0, and later versions.)

    If the bootstrap action requires root user operations, enable this function, or the bootstrap action may fail to execute.

    -

  5. Click OK.

    After the bootstrap action is added, you can edit, clone, or delete it in the Operation column.

  1. Log in to the MRS console.
  2. On the Active Clusters page, select a running cluster and click its name to switch to the cluster details page.
  3. On the page that is displayed, click the Bootstrap Actions tab.
  4. Click Add and set parameters as prompted.

    Figure 1 Add Bootstrap Action
    Table 2 Parameter description

    Parameter

    Description

    Example Value

    Name

    Name of a bootstrap action script The name must be unique within a cluster. You can set the same name for different clusters.

    The value can contain only digits, letters, spaces, hyphens (-), and underscores (_) and must not start with a space.

    The value can contain 1 to 64 characters.

    bootstrap_0

    Script Path

    Script path. The value can be an OBS file system path or a local VM path.

    The path must be unique within a cluster, but can be the same across different clusters.

    • An OBS file system path must start with obs:// and end with .sh, for example, obs://mrs-samples/xxx.sh.
    • A local VM path must start with a slash (/) and end with .sh.

    obs://mrs-samples/xxx.sh

    Execution Node

    Select a type of the node where the bootstrap action script is executed.

    -

    Active Master

    Whether the task will be executed only on the active Master node. This parameter is valid only when the Master node is selected as the execution node. By default, the function is disabled, indicating that the command will be executed on all Master nodes.

    -

    Parameter

    (Optional) Bootstrap action script parameter.

    -

    Executed

    Select the time when the bootstrap action script is executed.

    To add bootstrap actions for a running cluster, you can only manually run the third-party component installation script on the node.

    • Before initial component start
    • After initial component start

    After initial component start

    Action upon Failure

    Whether to continue to execute subsequent scripts and create a cluster after the script fails to be executed.

    You are advised to set this parameter to Continue in the debugging phase so that the cluster can continue to be installed and started no matter whether the bootstrap action is successful.

    Continue

    Run as root

    Whether to escalate the permission to user root. (This parameter is available only in clusters of MRS 3.1.5, MRS 3.3.0, and later versions.)

    If the bootstrap action requires root user operations, enable this function, or the bootstrap action may fail to execute.

    -

  5. Click OK to save the configuration.
  6. Click Yes. After a bootstrap action is added, you can modify or delete it in the bootstrap action list.

Adding an Automatic Script for Auto Scaling Nodes

If you use auto scaling, MRS allows you to customize automation scripts for auto scaling. Automation scripts can be executed before and after auto scaling and automatically adapt to service load changes, all of which eliminates manual operations.

  • You can set an automation script so that it can automatically run on cluster nodes when auto scaling is triggered.
  • Before using automation scripts, upload them to a cluster VM or OBS file system in the same region as the cluster. The automation scripts uploaded to the cluster VM can be executed only on the existing nodes. If you want to make the automation scripts run on the new nodes, upload them to the OBS file system.
  1. Log in to the MRS console.
  2. On the Active Clusters page, select a running cluster and click its name to switch to the cluster details page.
  3. Click Auto Scaling.
  4. Click Configure Automation Script.
  5. Click Create. Set parameters by referring to Table 2.

    For the parameters to be configured, Executed can be set to Before scale-out, After scale-out, Before scale-in, or After scale-in.

  6. Click OK to save the automation script configurations.

Helpful Links

  • You can configure auto scaling for MRS cluster nodes to enable the cluster to dynamically adjust the number of nodes in it based on data volume changes. For details, see MRS Task Node Auto Scaling.
  • If bootstrap actions are added during cluster creation and you have configured Run Bootstrap Action for cluster node scaling settings, the nodes added by auto scaling will execute all the bootstrap action scripts added during cluster creation. For details, see Scaling Out an MRS Cluster.