Understanding Groups - padogrid/padogrid GitHub Wiki

◀️ Running Apps :link: Running Groups ▶️


Under each workspace, you can create one or more groups of clusters. By grouping clusters, you are creating a workspace environment with a collection of relevant clusters that you can treat like a single body of clusters. This is done by running the *_group commands. A group is created by running the create_group command which by default adds two (2) clusters, each with two (2) or more members. You can add more clusters to a group by using the add_cluster command, or remove clusters from a group by using the remove_cluster command.

Cluster grouping is particularly useful for federating data grids to scale out beyond the data size threshold of a single data grid (cluster). Pado is such a product that is an inherent part of PadoGrid making the concept of grid of grids possible. With Pado, PadoGrid treats multiple clusters like a single grid (or group) and allows you to connect to a single entry point to access data in any of the clusters belonging to the group by hierarchical grid paths.

You can also create a group of clusters with heterogenous products that make up your application. For example, your application may require to integrate Geode, Spark, and Kafka. By creating a group of Geode, Spark, and Kafaka clusters, you can simply run the start_group command to launch all three (3) clusters.

Another example of cluster grouping is for managing clusters that may run in multiple sites (locations) with WAN replication enabled. You can create a group of clusters with each cluster representing a different site and use the group commands to manage them.

create_group

The create_group command creates a new group of clusters. This command takes the options shown in the table below. If you run it without any options, then it will create a group named mygroup with two (2) clusters of the current cluster's product using the default grid prefix. The cluster prefix is tagged with a number starting from 0. Hence, the default group of mygroup will be consisted of two (2) clusters named, grid0 and grid1. If the group or any of the clusters already exists then the create_group command aborts without taking any actions. If the group already exists then you can use the add_cluster or remove_cluster command to add or remove the existing clusters, respectively.

Option Descriptions Default
-product product_name Product name Current cluster's product
-group group_name Group name mygroup
-prefix cluster_prefix Cluster name prefix grid
-type default|pado Group type. Currently supports only pado or default. If pado, then it creates a Pado cluster provided that Pado has been installed. Otherwise, if default or unspecified, then it creates a normal cluster. default
-count cluster_count Cluster count 2
-port first_port_number The first cluster's port number. Subquent cluster's port numbers are incremented by 100. Product default port number

group.properties

The create_group command creates the group directory in the $PADOGRID_WORKSPACES/groups/ directory. It also generates the etc/group.properties file that contains the group configuration details. For example, if you created mygroup, then the following file is generated with the properties shown in the table.

cat $PADOGRID_WORKSPACES/groups/mygroup/etc/group.properties
Property Description
group.name Group name
group.cluster.prefix Cluster name prefix
group.cluster.names Comma separated names of clusters belonging to the group
group.product Cluster default product. Once the group is created, you can add any product clusters.
group.firstPort First cluster port

You can manually modify the group.properties file but it is recommended that whenever possible, you should use the following commands to alter the group. These commands will first verify the group and its clusters before updating the group.properties.

Command Description
add_cluster Add a new cluster to the specified group in the current padogrid workspace
remove_cluster Remove the specified cluster from the current padogrid workspace

Group Commands

The following is a complete list of _group commands.

Command Description
create_group Create and group multiple clusters
kill_group Kill the specified group of clusters in the specified workspace
list_group List all the defined groups in the specified workspace
pwd_group Display the name of the present (current) working group
remove_group Remove the specified group of clusters in the specified workspace
show_group Display the status of the specified group of clusters in the specified workspace
start_group Start the specified group of clusters in the specified workspace
stop_group Stop the specified group of clusters in the specified workspace

◀️ Running Apps :link: Running Groups ▶️