Using Apache Karaf Cellar commands
As with a lot of other features of Apache Karaf, Cellar provides a couple of commands to administer an Apache Karaf Cellar cluster.
Getting ready
Make sure that you follow the basic setup of the Installing Apache Karaf Cellar modules in Apache Karaf recipe to run a simple Apache Karaf cluster.
How to do it…
We have two different kinds of commands to work with the Apache Karaf Cellar cluster: basic commands to manage and configure the cluster and some more enhanced commands for extra management.
Group commands
After installing Cellar, there is already a default group available that contains all the future available nodes per default. Different tasks can be performed using the following commands:
Now, let's create a new group and add both nodes to it using the following command:
karaf@root()> cluster:group-create main-cluster
The previous command creates a new cluster group called
main-cluster
. This group contains no nodes in it. Check using thegroup-list
command...