Updated on 2024-09-23 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 a Bootstrap Action When Creating a Cluster

  1. Go to the Buy Cluster page.
  2. Click Custom Config.
  3. Configure the cluster software and hardware by referring to Manually Buying an MRS Cluster.
  4. In the Set Advanced Options area, select Configure and click Add in the Bootstrap Action area.

    Table 1 Parameter description

    Parameter

    Description

    Name

    Name of a bootstrap action script

    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.

    NOTE:

    A name must be unique in the same cluster. You can set the same name for different clusters.

    Script Path

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

    • 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.
      NOTE:

      A path must be unique in the same cluster, but can be the same for different clusters.

    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.

    • Before initial component start
    • After initial component start
      NOTE:

      You can only manually run the third-party component installation script on the node to install a running cluster component.

    Action upon Failure

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

    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.

    Run as root

    Whether to escalate the permission to user root

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

    NOTE:

    This parameter applies only to clusters of MRS 3.1.5, MRS 3.3.0, and later versions.

  5. Click OK.

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

Adding a Bootstrap Action to an Existing Cluster

  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

    Name

    Name of a bootstrap action script

    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.

    NOTE:

    A name must be unique in the same cluster. You can set the same name for different clusters.

    Script Path

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

    • 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.
      NOTE:

      A path must be unique in the same cluster, but can be the same for different clusters.

    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.

    • Before initial component start
    • After initial component start
      NOTE:

      You can only manually run the third-party component installation script on the node to install a running cluster component.

    Action upon Failure

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

    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.

    Run as root

    Whether to escalate the permission to user root

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

    NOTE:

    This parameter applies only to clusters of MRS 3.1.5, MRS 3.3.0, and later versions.

  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

  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 Add. Set parameters by referring to Table 2.
  6. Click OK to save the automation script configurations.