Updated on 2023-12-13 GMT+08:00

MRS.Cluster

Element Description

MapReduce Service (MRS) allows you to deploy and manage the Hadoop system in HUAWEI CLOUD. With MRS, Hadoop clusters can be deployed with just a few clicks. You can create a cluster using MRS.Cluster and specify the type of the cluster for offline data analysis or stream processing or both. You can also set ECS specifications, instance count, data disk type (common I/O, high I/O, or ultra-high I/O), and components to be installed (such as Hadoop, Spark, HBase, Hive, Kafka, and Storm) for the cluster. Bootstrap actions can be taken to execute a script on a specified node before or after the cluster is started. The script will automatically install additional third-party software, modify the cluster running environment, and perform other customizations.

Element Properties

Table 1 Property Description

Property

Required

Descripiton

vpcId

Yes

ID of the VPC where the subnet locates

Type: HuaweiCloud.VPC.VPC.Id

clusterVersion

Yes

Version of the cluster

Type: string

Suggestion: On the MRS management console, click Create Cluster and view the cluster versions supported by the current region in the Cluster Version drop-down list.

coreNodeSize

Yes

Instance specification of a Core node

Type: string

Value Constraint: MRS supports host specifications determined by CPU, memory, and disk space. For details about the instance specifications, refer to the ECS specifications used by MRS at https://support.huaweicloud.com/intl/en-us/api-mrs/mrs_01_9006.html

.

nodePublicCertName

No

Name of a key pair. You can use a key to log in to the Master node in the cluster.

Type: HuaweiCloud.ECS.KeyPair.Name

clusterMasterSecret

No

Password of user root for logging in to a cluster node

Type: password

Value Constraint: Must be 8 to 26 characters long. Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters (!@$%^-_=+[{}]:\,./?), but must not contain spaces. Cannot be the username or the username spelled backwards.

subnetId

Yes

Subnet ID

Type: HuaweiCloud.VPC.Subnet.Id

securityGroupsId

No

Security group ID of the cluster

Type: string

Value Constraint: If this parameter is left blank, MRS automatically creates a security group, whose name starts with mrs_ {cluster_name}.If this parameter is not left blank, a fixed security group is used to create a cluster. The transferred ID must be the security group ID owned by the current tenant.

taskNodeGroups

No

List of Task nodes

Type: MRS.TaskNodeGroups Array

logCollection

No

Whether logs are collected when cluster installation fails

Type: string

Default: Yes

Value Constraint: No: not collected; Yes: collected. The default value is Yes. OBS buckets will be created and only used to collect logs that record MRS cluster creation failures.

clusterType

No

Type of the cluster

Type: string

Default: AnalysisCluster

Value Constraint: Currently, analysis cluster, streaming cluster are supported.

masterDataVolumeCount

No

Number of data disks of the Master node

Type: integer

Default: 1

Value Constraint: The value can be set to 1 only.

volumeSize

Yes

Data disk size of the Core node

Type: integer

Default: 100

Value Constraint: The value ranges from 100 GB to 32,000 GB.

coreDataVolumeType

No

Data disk storage type of the Core node

Type: string

Value Constraint: Currently, SATA, SAS, and SSD are supported.

coreNodeNum

Yes

Number of Core nodes

Type: integer

Value Description: Integers are supported.

Value Constraint: The value ranges from 1 to 500. A maximum of 500 Core nodes are supported by default. If more than 500 Core nodes are required, increase the quota. For more information, visit https://support.huaweicloud.com/intl/en-us/usermanual-iaas/en-us_topic_0040259342.html.

Suggestion: Customize the value.

safeMode

Yes

MRS cluster running mode

Type: string

Default: CommonMode

Value Constraint: CommonMode: The value indicates that the Kerberos authentication is disabled. Users can use all functions provided by the cluster. SafeMode: safe mode. The value indicates that the Kerberos authentication is enabled. Common users cannot use the file management or job management functions of an MRS cluster and cannot view cluster resource usage or the job records of Hadoop and Spark. To use these functions, the users must obtain the relevant permissions from the MRS Manager administrator.

bootstrapScripts

No

Bootstrap action script information

Type: MRS.BootstrapScripts Array

Value Constraint: MRS 1.7.1 or later supports this parameter.

tags

No

Cluster tag information

Type: MRS.Tags Array

Value Constraint: A cluster can contain a maximum of 10 tags. A tag name (key) must be unique. The key or value of a tag cannot contain the following characters: =*<>\,|/

clusterName

Yes

Cluster name

Type: string

Value Description: Cluster name, which is unique and contains only 1 to 64 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed.

Suggestion: Customize the value.

masterDataVolumeSize

No

Data disk size of the Master node. Disks can be purchased at the same time when a cluster is created to enlarge storage capacity.

Type: integer

Value Constraint: The value ranges from 100 GB to 32,000 GB.

masterNodeNum

Yes

Number of Master nodes

Type: integer

Default: 2

Value Constraint: If cluster HA is enabled, set this parameter to 2. If cluster HA is disabled, set this parameter to 1.

clusterAdminSecret

Yes

Password of the MRS Manager administrator

Type: password

Value Constraint: Must be 8 to 32 characters long. Must contain at least three of the following lowercase letters, uppercase letters, digits, spaces, and special characters `~!@#$%^&*()-_=+\|[{}];:'",<.>/, . Cannot be the username or the username spelled backwards.

vpc

Yes

Name of the VPC where the subnet locates

Type: string

coreDataVolumeCount

No

Number of data disks of the Core node

Type: integer

Default: 1

Value Constraint: The value ranges from 1 to 10.

availableZoneId

Yes

ID of an available zone

Type: string

masterDataVolumeType

No

Data disk storage type of the Master node

Type: string

Value Constraint: Currently, SATA, SAS, and SSD are supported.

loginMode

No

Cluster login mode

Type: string

Default: KeyPair

Value Constraint: The default value is keyPair. If login_mode is set to password, the request body contains the cluster_master_secret field. If login_mode is set to key pair, the request body contains the nodePublicCertName field.

volumeType

Yes

Type of disks

Type: string

Value Constraint: Currently, SATA, SAS, and SSD are supported.

coreDataVolumeSize

No

Data disk size of the Core node. Disks can be purchased at the same time when a cluster is created to enlarge storage capacity.

Type: integer

Value Constraint: The value ranges from 100 GB to 32,000 GB.

components

Yes

Service component list

Type: MRS.Components Array

masterNodeSize

Yes

Instance specification of a Master node

Type: string

Value Constraint: MRS supports host specifications determined by CPU, memory, and disk space. For details about the instance specifications, refer to the ECS specifications used by MRS at .

subnetName

Yes

Name of the subnet

Type: string

Relationships Between Elements

Table 2 Relationship description

Description

Target

Connected

VPC.Subnet

ContainedIn

VPC.VPC

Return Value

None.

Blueprint Example

tosca_definitions_version: huaweicloud_tosca_version_1_0
inputs:
  mrs_availableZoneId:
    description: ID of the availability zone
  mrs_clusterAdminSecret:
    description: the password of the MRS Manager administrator
  mrs_clusterName:
    description: cluster name
  mrs_clusterType:
    description: cluster type
    default: AnalysisCluster
  mrs_clusterVersion:
    description: cluster version
  mrs_components_0_componentName:
     description: component name
  mrs_coreNodeNum:
    description: number of Core nodes
  mrs_coreNodeSize:
    description: specifications of Core nodes
  mrs_masterNodeNum:
    description: number of master nodes
  mrs_masterNodeSize:
    description: specifications of master nodes
  mrs_nodePublicCertName:
    description: name of the AK/SK pair used to access the cluster nodes
  mrs_safeMode:
    description: mode in which the MRS cluster will run
  mrs_subnetId:
    description: subnet ID
  mrs_subnetName:
    description: subnet name
  mrs_volumeSize:
    description: data disk space of the Core nodes
  mrs_volumeType:
    description: disk storage type
  mrs_vpc:
    description: name of the VPC to which the subnet belongs
  mrs_vpcId:
    description: ID of the VPC to which the subnet belongs
node_templates:
  mrs:
    type: HuaweiCloud.MRS.Cluster
    properties:
      availableZoneId:
        get_input: mrs_availableZoneId
      clusterAdminSecret:
        get_input: mrs_clusterAdminSecret
      clusterName:
        get_input: mrs_clusterName
      clusterType:
        get_input: mrs_clusterType
      clusterVersion:
        get_input: mrs_clusterVersion
      components:
        - componentName:
            get_input: mrs_components_0_componentName
      coreNodeNum:
        get_input: mrs_coreNodeNum
      coreNodeSize:
        get_input: mrs_coreNodeSize
      masterNodeNum:
        get_input: mrs_masterNodeNum
      masterNodeSize:
        get_input: mrs_masterNodeSize
      nodePublicCertName:
        get_input: mrs_nodePublicCertName
      safeMode:
        get_input: mrs_safeMode
      subnetId:
        get_input: mrs_subnetId
      subnetName:
        get_input: mrs_subnetName
      volumeSize:
        get_input: mrs_volumeSize
      volumeType:
        get_input: mrs_volumeType
      vpc:
        get_input: mrs_vpc
      vpcId:
        get_input: mrs_vpcId