Set up host groups for actions
In settings of a cluster, service, or component, you can combine hosts into groups to be able to run actions allowed for a given object separately for each group of hosts. This can simplify cluster management and various automation tasks (for example, you can sequentially upgrade ClickHouse on ADQM hosts without a long cluster shutdown — see Rolling upgrade for details).
IMPORTANT
Host groups for actions are only available if this functionality is supported by the product in use.
|
You can manage host groups for actions on the Action host groups tab, which is located on the configuration page of the corresponding object in the ADCM interface:
-
for a cluster: Clusters → <cluster> → Configuration;
-
for a service: Clusters → <cluster> → Services → <service>;
-
for a component: Clusters → <cluster> → Services → <service> → Components → <component>.
This article describes how to create and use host groups on the example of an ADQM cluster’s ADQMDB service.
Create a host group
-
On the page of the service installed in the selected cluster, open the Action host groups tab.
Service page for managing host groups -
Click Create action host group. In the window that opens, enter a name of a new host group in the Action host group name field and the group description in the Description field (optional), select the desired hosts in the All available hosts list, and click Transfer selected to add these hosts to the group.
Adding multiple hosts to a groupYou can also add and remove hosts one by one using the icons and in the All available hosts and Selected hosts lists, respectively.
Hosts added to the groupWhen adding hosts to groups for actions, consider the following:
-
It is not possible to add the same host into different groups of the same object. Host groups for actions at the level of different objects do not overlap — one host can belong to groups of different objects within the same cluster.
-
A host group for actions at the component level can include only hosts to which the component is mapped.
-
-
Click Create to create a group from the selected hosts.
Manage host groups
Created host groups are listed on the Actions host groups tab. Above this list, there are filters that you can use to search for the desired groups by name or find all groups that include a host with the specified name. The icon resets all filters.
To manage host groups, use the icons:
-
— expands/hides the list of hosts under a group row in the list;
-
— opens the Edit action host group window, where you can change the list of hosts included in a group;
-
— deletes a host group.
Run an action for a host group
In a host group row, click the icon — in the list that opens, select an action to perform on the hosts of this group.
A set of actions available for execution on hosts depends on the object for which the host group is created — product, object type (cluster, service, or component), state of this object. For example, the image above shows the list of actions for the ADQMDB service of the ADQM cluster in the installed
state. If a product or object does not support performing any actions on groups of hosts, the action list displays No results found
.