Charmed OpenSearch

Channel Revision Published Runs on
2/edge 90 08 May 2024
Ubuntu 22.04
juju deploy opensearch --channel 2/edge
Show information

Platform:

Ubuntu
22.04

charms.opensearch.v0.helper_cluster

Utility class for getting cluster configuration info and suggestions.


class Node

Description

Data class representing a node in a cluster. None

Methods

Node. __init__( self , name: str , roles , ip: str )

class ClusterTopology

Class for creating the best possible configuration for a Node.

Description

The current logic is to try to get to the config: - 2 dedicated cluster manager nodes - 1 voting only data node And create them with the following order: - cm0 - data, voting only - cm1 - data - data

Methods

ClusterTopology. suggest_roles( nodes )

Get roles for a Node, for now, we only focus on the 3 most important roles.

Description

We will do more interesting things with the nodes list, to find the best role. The logic here is: - the first node should be a CM-eligible node, but will add "data" to it - the second node should be a data and voting-only node, so that: - a 2 nodes cluster can function - when a 2CM-eligible node joins, the CM voting can happen immediately - the 3rd one should be a CM-eligible, but will add "data" to it - the +4 nodes should be data etc.

ClusterTopology. remaining_nodes_for_bootstrap( nodes )

Description

Check if cluster is bootstrapped. 2 cm + 1 voting only nodes created. None

ClusterTopology. get_cluster_managers_ips( nodes )

Description

Get the nodes of cluster manager eligible nodes. None

ClusterTopology. get_cluster_managers_names( nodes )

Description

Get the nodes of cluster manager eligible nodes. None

ClusterTopology. nodes_count_by_role( nodes )

Description

Count number of nodes by role. None