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

  1. On the page of the service installed in the selected cluster, open the Action host groups tab.

    Service page for managing host groups
    Service page for managing host groups
  2. 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 group
    Adding multiple hosts to a group

    You can also add and remove hosts one by one using the icons add to cluster dark add to cluster light and close dark close light in the All available hosts and Selected hosts lists, respectively.

    Hosts added to the group
    Hosts added to the group

    When 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.

  3. 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 reset dark reset light resets all filters.

List of host groups
List of host groups

To manage host groups, use the icons:

  • additional dark additional light — expands/hides the list of hosts under a group row in the list;

  • edit dark edit light — opens the Edit action host group window, where you can change the list of hosts included in a group;

  • delete dark delete light — deletes a host group.

Run an action for a host group

In a host group row, click the icon actions default dark actions default light — in the list that opens, select an action to perform on the hosts of this group.

Actions allowed to be performed on hosts in the group
Actions allowed to be performed on hosts in the 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.

Found a mistake? Seleсt text and press Ctrl+Enter to report it