Default language.

Information
Important This documentation space contains information about the on-premises version of BMC Helix Discovery. If you are using the SaaS version of BMC Helix Discovery, see BMC Helix Discovery (SaaS).

Configuring a cluster by using the REST API


You can setup and modify the cluster configuration using the /admin/cluster endpoint. Background information and equivalent manual procedures are described in the Managing-clusters topic and its child topics.

To modify a cluster configuration

  1. GET the current cluster configuration. Use the GET /admin/cluster endpoint. The endpoint returns JSON formatted data:

    {
          "name" : "cluster01",           // the cluster name
          "alias" : "cluster100",         // an alias
          "coordinator_uuid" : "xxxx",    // the UID of the coordinator
          "fault_tolerance" : true,       // whether fault tolerance is enabled
          "replication_factor" : 2,       // the fault tolerance replication factor
          "members" : [                   // list of cluster members
            "appliance01.bmc.com",        // Modifying this list adds or removes members.
            "appliance02.bmc.com"         //
          ],
          "rebalancing" : false           // whether the cluster is rebalancing
    }

    Parameter

    Description

    name

    The name of the cluster.

    alias

    A name to refer to all the machines in the cluster, such as when the machines are accessed through a load balancer. For example, a cluster has members called member1, member2, and member3. DNS is configured to resolve the name cluster100 to a load balancer. The load balancer is configured to share requests to cluster100 with the following hosts: member1, member2, and member3. In this case, the cluster alias is cluster100.

    coordinator_uuid

    The machine to make the coordinator. Change the UUID to change the coordinator. If the existing coordinator is removed from the member list, it is removed from the cluster.

    fault_tolerance

    Select the checkbox to enable fault tolerance. Fault tolerance enables the cluster to continue operating even when some machines have failed. It works by ensuring that all data is stored on multiple machines. However, as a consequence, total storage capacity and overall performance are reduced.

    replication_factor

     The number of copies of the data. See Fault-tolerance for more information.

    members

    List of cluster members.

    • Add or remove members from the list.
    • Create a new cluster by using a list of more than one member.
    • Revert to a stand-alone appliance by using a list containing one member.

    rebalancing

    Set to true to trigger a rebalance.

  2. Modifiy the returned JSON to reflect the cluster configuration that you require. This example changes the cluster alias, adds a third member, and forces a rebalance (although a rebalance is triggered automatically when you change the number of members in a cluster). You can also create a new cluster by using a new or edited JSON file specifying new details.

    {
          "name" : "cluster01",             // the cluster name
          "alias" : "cluster01.bmc.com",    // an alias
          "coordinator_uuid" : "xxxx",      // the UID of the coordinator
          "fault_tolerance" : true,         // whether fault tolerance is enabled
          "replication_factor" : 2,         // the fault tolerance replication factor
          "members" : [                     // list of cluster members
            "appliance01.bmc.com",
            "appliance02.bmc.com",
            "appliance03.bmc.com"
          ],
          "rebalancing" : true              // force rebalancing
    }
  3. To apply the changes use the PATCH /admin/cluster endpoint.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Helix Discovery 24.3 (On-Premises)