Running Groups - padogrid/padogrid GitHub Wiki

◀️ Understanding Groups :link: Understanding Bundles ▶️


Let's experiment the group commands. We will create and run a group named mygroup comprising two (2) Hazelcast clusters, one (1) Kafka cluster, and one (1) Spark cluster. Make sure that you have installed Hazelcast, Kafka, and Spark before taking the steps shown below. The Installing Padogrid section provides installation details.

  1. Create mygroup with two (2) Hazelcast clusters named myhz0 and myhz1
create_group -product hazelcast -group mygroup -count 2 -prefix myhz
  1. Check the group you created.
show_group -group mygroup

Output:

           GROUP: mygroup
        Clusters: myhz0, myhz1

         CLUSTER: myhz0
     CLUSTER_DIR: /Users/dpark/Padogrid/workspaces/rwe-pado/ws-pado/clusters/myhz0
         PRODUCT: hazelcast
    CLUSTER_TYPE: imdg
             POD: local
        POD_TYPE: local
 Members Running: 0/2
      MC Running: 0/1
         Version: 4.1.1
  Switch Cluster: switch_rwe rwe-pado ws-pado; switch_cluster myhz0

         CLUSTER: myhz1
     CLUSTER_DIR: /Users/dpark/Padogrid/workspaces/rwe-pado/ws-pado/clusters/myhz1
         PRODUCT: hazelcast
    CLUSTER_TYPE: imdg
             POD: local
        POD_TYPE: local
 Members Running: 0/2
      MC Running: 0/1
         Version: 4.1.1
  Switch Cluster: switch_rwe rwe-pado ws-pado; switch_cluster myhz1
  1. Create a Jet cluster using the default name, myjet.
create_cluster -product jet -cluster myjet
  1. Create a Spark cluster using the default name, myspark.
create_cluster -product spark -cluster myspark
  1. Add the mykafka and myspark clusters to mygroup.
add_cluster -group mygroup -cluster mykafka
add_cluster -group mygroup -cluster myspark
  1. Check mygroup once more. It should now contain four (4) clusters as shown in the ouput below.
show_group -group mygroup

Output:

           GROUP: mygroup
        Clusters: myhz0, myhz1, mykafka, myspark

         CLUSTER: myhz0
     CLUSTER_DIR: /Users/dpark/Padogrid/workspaces/rwe-pado/ws-pado/clusters/myhz0
         PRODUCT: hazelcast
    CLUSTER_TYPE: imdg
             POD: local
        POD_TYPE: local
 Members Running: 0/2
      MC Running: 0/1
         Version: 4.1.1
  Switch Cluster: switch_rwe rwe-pado ws-pado; switch_cluster myhz0

         CLUSTER: myhz1
     CLUSTER_DIR: /Users/dpark/Padogrid/workspaces/rwe-pado/ws-pado/clusters/myhz1
         PRODUCT: hazelcast
    CLUSTER_TYPE: imdg
             POD: local
        POD_TYPE: local
 Members Running: 0/2
      MC Running: 0/1
         Version: 4.1.1
  Switch Cluster: switch_rwe rwe-pado ws-pado; switch_cluster myhz1

         CLUSTER: mykafka
      Cluster ID: DI_VCZZ1RSmXWgF67senwA
     CLUSTER_DIR: /Users/dpark/Padogrid/workspaces/rwe-pado/ws-pado/clusters/mykafka
         PRODUCT: kafka
    CLUSTER_TYPE: kraft
             POD: local
        POD_TYPE: local
 Servers Running: 3/3
         Version: 3.0.0
   witch Cluster: switch_rwe rwe-0.9.14-snapshot ws-group; switch_cluster mykafka

         CLUSTER: myspark
     CLUSTER_DIR: /Users/dpark/Padogrid/workspaces/rwe-pado/ws-pado/clusters/myspark
         PRODUCT: spark
    CLUSTER_TYPE: standalone
             POD: local
        POD_TYPE: local
 Masters Running: 0/1
 Workers Running: 0/2
         Version: 3.1.2
  Switch Cluster: switch_rwe rwe-pado ws-pado; switch_cluster myspark
  1. Switch to mygroup and check again. This should give you the same output as the previous step.
switch_group mygroup
show_group
  1. View the group.properties file. Note that the group.cluster.names property is now set to the four cluster names.
switch_group
cat etc/group.properties

Output:

#
# This file contains group specific properties.
#

# Group name
group.name=mygroup

# Cluster name prefix
group.cluster.prefix=myhz

# Comma separated cluster names
group.cluster.names=myhz0, myhz1, mykafka, myspark

# Product
group.product=hazelcast

# Type (default or pado)
group.type=default

# First port of the first cluster
group.firstPort=5701
  1. Start and show the group. You should see all clusters running.
start_group
show_group
  1. You can also use the _cluster commands on individual clusters. For examples, the following displays the mykafka cluster status.
show_cluster -cluster mykafka
  1. Stop or kill the group.
# Stop all servers in each cluster
stop_group -all

# Or kill all servers in each cluster
kill_group -all
  1. Remove a Hazelcast cluster and check the group. Note that the remove_cluster command requires the -cluster option.
remove_cluster -cluster myhz0
show_group
  1. Remove the entire group. Note that the remove_group requires the -group option.
remove_group -group mygroup

◀️ Understanding Groups :link: Understanding Bundles ▶️