Adding Components to a Cluster
Function
This API is used to add components to a cluster.
URI
POST /v2/{project_id}/clusters/{cluster_id}/components
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
cluster_id | Yes | String | Cluster ID. For details about how to obtain the cluster ID, see Obtaining a Cluster ID. |
Request Parameters
Parameter | Mandatory | Type | Description |
---|---|---|---|
components_install_mode | Yes | Array of ComponentInstallMode objects | Component installation details. For details about the parameters, see Table 3. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
component | Yes | String | Component name |
node_groups | Yes | Array of AssignedNodeGroup objects | Role deployment information of the component. For details, see Table 4. |
component_user_password | No | String | User password of the component. The password is used for machine-machine account to connect to the ClickHouse component. The password:
|
component_default_password | No | String | Default user password of the component. The password is used for human-machine account to connect to the ClickHouse component. The password:
|
Parameter | Mandatory | Type | Description |
---|---|---|---|
name | Yes | String | Node group name |
assigned_roles | Yes | Array of strings | Role deployment information. You can specify the roles deployed in a node group. This parameter is a string array. Each string represents a role expression. Role expression definition:
|
Response Parameters
Status code: 200
Parameter | Type | Description |
---|---|---|
result | String | Operation result. Value succeeded indicates that the operation is successful, and value failed indicates that the operation fails. |
Example Request
- Add the ClickHouse component to a cluster in normal mode.v2/f77c10d14a544393a24e5f0bf53202b6/clusters/ff879d3a-e5d5-4485-a9b6-c673b52673fa/components{"components_install_mode" : [ {"component" : "ClickHouse","node_groups" : [ {"name" : "master_node_default_group","assigned_roles" : [ "ClickHouseServer:1,2" ]}, {"name" : "node_group_1","assigned_roles" : [ "ClickHouseServer", "ClickHouseBalancer" ]} ],"component_user_password" : "*****","component_default_password" : "*****"} ]}
- Add the HBase component.v2/f77c10d14a544393a24e5f0bf53202b6/clusters/ff879d3a-e5d5-4485-a9b6-c673b52673fa/components{"components_install_mode" : [ {"component" : "HBase","node_groups" : [ {"name" : "master_node_default_group","assigned_roles" : [ "RegionServer", "HMaster" ]} ]} ]}
Example Response
Status code: 200
Processing result of a request:
{"result" : "succeeded"}
Status Codes
For details, see Status Codes.
Error Codes
For details, see Error Codes.
- Function
- URI
- Request Parameters
- Response Parameters
- Example Request
- Example Response
- Status Codes
- Error Codes