opentelekomcloud.cloud.mrs_cluster_info module -- Get info about MRS clusters.

Note

This module is part of the opentelekomcloud.cloud collection (version 0.14.6).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install opentelekomcloud.cloud. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: opentelekomcloud.cloud.mrs_cluster_info.

New in opentelekomcloud.cloud 0.14.4

Synopsis

  • Get MRS cluster info from the OTC.

Requirements

The below requirements are needed on the host that executes this module.

  • openstacksdk

  • openstacksdk >= 0.36.0

  • otcextensions

  • python >= 3.6

Parameters

Parameter

Comments

api_timeout

integer

How long should the socket layer wait before timing out for API calls. If this is omitted, nothing will be passed to the requests library.

auth

dictionary

Dictionary containing auth information as needed by the cloud's auth plugin strategy. For the default password plugin, this would contain auth_url, username, password, project_name and any information about domains (for example, os_user_domain_name or os_project_domain_name) if the cloud supports them. For other plugins, this param will need to contain whatever parameters that auth plugin requires. This parameter is not needed if a named cloud is provided or OpenStack OS_* environment variables are present.

auth_type

string

Name of the auth plugin to use. If the cloud uses something other than password authentication, the name of the plugin should be indicated here and the contents of the auth parameter should be updated accordingly.

ca_cert

aliases: cacert

string

A path to a CA Cert bundle that can be used as part of verifying SSL API requests.

client_cert

aliases: cert

string

A path to a client certificate to use as part of the SSL transaction.

client_key

aliases: key

string

A path to a client key to use as part of the SSL transaction.

cloud

any

Named cloud or cloud config to operate against. If cloud is a string, it references a named cloud config as defined in an OpenStack clouds.yaml file. Provides default values for auth and auth_type. This parameter is not needed if auth is provided or if OpenStack OS_* environment variables are present. If cloud is a dict, it contains a complete cloud configuration like would be in a section of clouds.yaml.

interface

aliases: endpoint_type

string

Endpoint URL type to fetch from the service catalog.

Choices:

  • "admin"

  • "internal"

  • "public" ← (default)

limit

integer

Number of clusters to be queried.

name

string

name or ID of the cluster to be queried.

region_name

string

Name of the region.

sdk_log_level

string

Log level of the OpenStackSDK

Choices:

  • "ERROR"

  • "WARN" ← (default)

  • "INFO"

  • "DEBUG"

sdk_log_path

string

Path to the logfile of the OpenStackSDK. If empty no log is written

status

string

Cluster status, where values can be the following.

starting

running

terminated

failed

abnormal

terminating

frozen

scaling-out

scaling-in

tags

list / elements=string

Search for a cluster by its tags.

timeout

integer

How long should ansible wait for the requested resource.

Default: 180

validate_certs

aliases: verify

boolean

Whether or not SSL API requests should be verified.

Before Ansible 2.3 this defaulted to yes.

Choices:

  • false

  • true

wait

boolean

Should ansible wait until the requested resource is complete.

Choices:

  • false

  • true ← (default)

Notes

Note

  • The standard OpenStack environment variables, such as OS_USERNAME may be used instead of providing explicit values.

  • Auth information is driven by openstacksdk, which means that values can come from a yaml config file in /etc/ansible/openstack.yaml, /etc/openstack/clouds.yaml or ~/.config/openstack/clouds.yaml, then from standard environment variables, then finally by explicit parameters in plays. More information can be found at https://docs.openstack.org/openstacksdk/

Examples

# Get info about clusters
- opentelekomcloud.cloud.mrs_cluster_info:
    name: "mrs-ea59"
  register: result

# Get info about clusters using query filters
- opentelekomcloud.cloud.mrs_cluster_info:
    status: "running"
    limit: 2
    tags:
      - key1=value1
      - key2=value2
  register: result

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

cluster

complex

Info about specified MRS cluster.

Returned: On Success

az

string

Az name.

Returned: success

Sample: "eu-de-01"

az_id

string

Az ID.

Returned: success

Sample: "eu-de-01"

billing_type

string

Cluster billing mode.

Returned: success

Sample: "Metered"

bootstrap_scripts

complex

Bootstrap action script information.

Returned: success

active_master

boolean

Whether the bootstrap action script runs only on active Master nodes.

Returned: success

Sample: false

before_component_start

boolean

Time when the bootstrap action script is executed.

Currently two options are available.

Returned: success

Sample: true

fail_action

string

continue

errorout

Returned: success

Sample: "errorout"

name

string

Name of a bootstrap action script. It must be unique in a cluster.

Returned: success

Sample: "bootstrap-script-1"

nodes

complex

Type of a node where the bootstrap action script is executed.

Returned: success

Sample: ["Master"]

start_time

string

Execution time of one boot operation script.

Returned: success

Sample: "1711530046"

state

string

Running state of one bootstrap action script.

Returned: success

Sample: "SUCCESS"

uri

string

Path of the shell script.

Returned: success

Sample: "s3a://bootstrap/presto/presto-install.sh"

charging_start_time

string

Start time of billing.

Returned: success

Sample: "1711530046"

cluster_id

string

Cluster id.

Returned: success

Sample: "c4ab345f-78c2-47hk-9864-e2f74f402f49"

cluster_type

string

Cluster type.

Returned: success

Sample: "0"

cluster_version

string

Cluster version.

Returned: success

Sample: "MRS 3.2.0-LTS.2"

component_list

complex

Component list.

Returned: success

componentDesc

string

Component description.

Returned: success

Sample: "A framework that allows for the distributed processing of large data sets across clusters."

componentId

string

Component ID.

Returned: success

Sample: "MRS 3.2.0-LTS.2_001"

componentName

string

Component name.

Returned: success

Sample: "Hadoop"

componentVersion

string

Component version.

Returned: success

Sample: "3.3.1"

core_data_volume_count

integer

Number of data disks of the Core node.

Value ranges from 1 to 10.

Returned: success

Sample: 1

core_data_volume_size

integer

Data disk storage space of the Core node.

To increase data storage capacity, you can add disks at the same time when creating a cluster.

Value ranges from 100 GB to 32,000 GB.

Returned: success

Sample: 600

core_data_volume_type

string

Data disk storage type of the Core node.

Currently, SATA, SAS and SSD are supported.

Returned: success

Sample: "SATA"

core_node_product_id

string

Product ID of a Core node.

Returned: success

Sample: "98c1fgc0897249653b1ec456d06e1234"

core_node_size

string

Instance specifications of a Core node.

Returned: success

Sample: "c3.xlarge.2.linux.mrs"

core_node_spec_id

string

Specification ID of a Core node.

Returned: success

Sample: "c3.xlarge.2"

core_num

string

Number of Core nodes deployed in a cluster.

Returned: success

Sample: "3"

created_at

string

Cluster creation time, which is a 10-bit timestamp.

Returned: success

Sample: "1711529080"

deployment_id

string

Cluster deployment ID.

Returned: success

Sample: "b3ab337a-19z2-47cd-9864-e2f38f402f57"

error_info

string

Error message.

Returned: success

external_alternate_ip

string

Backup external IP address.

Returned: success

Sample: "100.74.244.67"

external_ip

string

External IP address.

Returned: success

Sample: "100.73.125.240"

fee

string

Cluster creation fee, which is automatically calculated.

Returned: success

Sample: "0.0"

hadoop_version

string

Hadoop version.

Returned: success

Sample: "3.3.1"

instance_id

string

Instance ID.

Returned: success

Sample: "b3ab442a-98c2-47ab-9887-e3c36f402f32"

internal_ip

string

Internal IP address.

Returned: success

Sample: "192.168.0.253"

log_collection

integer

Whether to collect logs when cluster installation fails.

Returned: success

Sample: 0

master_data_volume_count

integer

Number of data disks of the Master node.

The value can be set to 1 only.

Returned: success

Sample: 1

master_data_volume_size

integer

Data disk storage space of the Master node.

To increase data storage capacity, you can add disks at the same time when creating a cluster.

Value ranges from 100 GB to 32,000 GB.

Returned: success

Sample: 600

master_data_volume_type

string

Data disk storage type of the Master node.

Currently, SATA, SAS and SSD are supported.

Returned: success

Sample: "SATA"

master_ip

string

IP address of a Master node.

Returned: success

Sample: "192.168.0.245"

master_node_product_id

string

Product ID of a Master node.

Returned: success

Sample: "98c1fgc0897249653b1ec456d06e1234"

master_node_size

string

Instance specifications of a Master node.

Returned: success

Sample: "c4.4xlarge.4.linux.mrs"

master_node_spec_id

string

Specification ID of a Master node.

Returned: success

Sample: "c4.4xlarge.4"

master_num

string

Number of Master nodes deployed in a cluster.

Returned: success

Sample: "2"

name

string

Cluster name.

Returned: success

Sample: "mrs-1"

node_groups

complex

List of Master, Core and Task nodes.

Returned: success

DataVolumeCount

integer

Number of data disks of a node.

Returned: success

Sample: 1

DataVolumeProductId

string

Data disk product ID of a node.

Returned: success

Sample: "98c1fgc0897249653b1ec456d06e1234"

DataVolumeResourceSpecCode

string

Data disk product specifications of a node.

Returned: success

DataVolumeResourceType

string

Data disk product type of a node.

Returned: success

DataVolumeSize

integer

Data disk storage space of a node.

Returned: success

Sample: 600

DataVolumeType

string

Data disk storage type of a node.

Currently, SATA, SAS and SSD are supported.

Returned: success

Sample: "SATA"

GroupName

string

Node group name.

Returned: success

Sample: "core_node_analysis_group"

NodeNum

integer

Number of nodes. The value ranges from 0 to 500.

Returned: success

Sample: 3

NodeProductId

string

Instance product ID of a node.

Returned: success

Sample: "98c1fgc0897249653b1ec456d06e1234"

NodeSize

string

Instance specifications of a node.

Returned: success

Sample: "c3.xlarge.2.linux.mrs"

NodeSpecId

string

Instance specification ID of a node.

Returned: success

Sample: "c3.xlarge.2"

RootVolumeProductId

string

System disk product ID of a node.

Returned: success

Sample: "98c1fgc0897249653b1ec456d06e1234"

RootVolumeResourceSpecCode

string

System disk product specifications of a node.

Returned: success

RootVolumeResourceType

string

System disk product type of a node.

Returned: success

RootVolumeSize

integer

System disk size of a node.

This parameter is not configurable and its default value is 40 GB.

Returned: success

Sample: 480

RootVolumeType

string

System disk type of a node.

Returned: success

Sample: "SATA"

VmProductId

string

VM product ID of a node.

Returned: success

Sample: "98c1fgc0897249653b1ec456d06e1234"

VmSpecCode

string

VM specifications of a node.

Returned: success

Sample: "c3.xlarge.2.linux"

order_id

string

Cluster creation order ID.

Returned: success

Sample: "MRS1733524072957vapz"

project_id

string

Project ID.

Returned: success

Sample: "cf183d0142e94747bf57acf742e7fa87"

region

string

Cluster work region.

Returned: success

Sample: "eu-de"

remark

string

Cluster remarks.

Returned: success

safe_mode

integer

Running mode of an MRS cluster.

Returned: success

Sample: 1

scale

string

Node change status.

If this parameter is left blank, the cluster nodes are not changed.

scaling-out

scaling-in

scaling-error

scaling-up

scaling_up_first

scaled_up_first

scaled-up-success

Returned: success

security_group_id

string

Security group ID.

Returned: success

Sample: "2d7178d5-0bee-43e8-c212-fbcfe4c1667f"

stage_desc

string

Cluster operation progress description.

Returned: success

Sample: "Installing MRS Manager"

status

string

Cluster status.

starting

running

terminated

failed

abnormal

terminating

frozen

scaling-out

scaling-in

Returned: success

Sample: "running"

subnet_id

string

Subnet ID.

Returned: success

Sample: "9a31d412-f482-42cd-9gol-98h59f9a3a50"

subnet_name

string

Subnet name.

Returned: success

Sample: "subnet-1"

tags

list / elements=string

Tag information.

Returned: success

Sample: ["key1=value1"]

task_node_groups

list / elements=string

List of Task nodes.

Returned: success

Sample: [{"AutoScalingPolicy": null, "BillingType": 12, "DataVolumeCount": 1, "DataVolumeProductId": null, "DataVolumeResourceSpecCode": null, "DataVolumeResourceType": null, "DataVolumeSize": 600, "DataVolumeType": "SATA", "GroupName": "master_node_default_group", "NeedLvm": false, "NodeNum": 2, "NodeProductId": null, "NodeSize": "c4.4xlarge.4.linux.mrs", "NodeSpecId": "c4.4xlarge.4", "RootVolumeProductId": null, "RootVolumeResourceSpecCode": null, "RootVolumeResourceType": null, "RootVolumeSize": 480, "RootVolumeType": "SATA", "SeqId": 66778, "VmProductId": null, "VmSpecCode": "c4.4xlarge.4.linux", "assignedRoles": ["SlapdServer:1,2", "KerberosServer:1,2", "KerberosAdmin:1,2", "quorumpeer:1,2", "NameNode:1,2", "Zkfc:1,2", "JournalNode:1,2", "ResourceManager:1,2", "JobHistoryServer:2", "DBServer:1,2", "HttpFS:1,2", "MetaStore:1,2", "WebHCat:2", "HiveServer:1,2", "JDBCServer2x:1,2", "JobHistory2x:1,2", "SparkResource2x:1,2", "TezUI:1,2", "TimelineServer:2", "RangerAdmin:1,2", "UserSync:2", "TagSync:2", "KerberosClient", "SlapdClient", "meta", "FlinkResource:1,2", "FlinkServer:1,2"], "az_placement_expression": null, "clusterId": "b3ab337a-98c2-47ab-9864-e2f36f402f49", "cpuType": "X86", "currency": null, "dccNodeProductId": null, "dccNodeSize": null, "disabled": false, "hypervisorType": null, "isSpotInstance": false, "nodeType": null, "serverGroupId": "25dcf361-c048-43fa-9267-3788779e7d9c", "spotPrice": null, "volumeDssClusterId": null, "volumeDssClusterType": null}]

total_num

string

Total number of nodes deployed in a cluster.

Returned: success

Sample: "5"

updated_at

string

Cluster update time, which is a 10-bit timestamp.

Returned: success

Sample: "1719561546"

vnc

string

URI for remotely logging in to an ECS.

Returned: success

Sample: "v2/gz183d0345e96897bf57acf742e7cz49/servers/44330fbb-498c-477f-8c5b-e11d62fdbecf/action"

volume_size

integer

Disk storage space.

Returned: success

Sample: 0

vpc

string

VPC name.

Returned: success

Sample: "vpc-1"

Authors

  • Attila Somogyi (@sattila1999)