Cluster bootstrapping v3.7
To use HARP, a minimum amount of metadata must exist in the DCS. The process of "bootstrapping" a cluster essentially means initializing node, location, and other runtime configuration either all at once or on a per-resource basis.
This process is governed through the harpctl apply
command. For more
information, see harpctl command-line tool.
Set up the DCS and make sure it is functional before bootstrapping.
Important
You can combine any or all of these example into a single YAML document and apply it all at once.
Cluster-wide bootstrapping
Some settings are applied cluster-wide and you can specify them during
bootstrapping. Currently this applies only to the event_sync_interval
runtime directive, but others might be added later.
The format is as follows:
Assuming that file was named cluster.yml
, you then apply it with the
following:
If the cluster name isn't already defined in the DCS, this also initializes that value.
Important
The cluster name parameter specified here always overrides the cluster
name supplied in config.yml
. The assumption is that the bootstrap file
supplies all necessary elements to bootstrap a cluster or some portion of
its larger configuration. A config.yml
file is primarily meant to control
the execution of HARP Manager, HARP Proxy, or harpctl
specifically.
Location bootstrapping
Every HARP node is associated with at most one location. This location can be a single data center, a grouped region consisting of multiple underlying servers, an Amazon availability zone, and so on. This is a logical structure that allows HARP to group nodes together such that only one represents the nodes in that location as the lead master.
Thus it is necessary to initialize one or more locations. The format for this is as follows:
Assuming that file was named locations.yml
, you then apply it with the
following:
When performing any manipulation of the cluster, include the name as a preamble so the changes are directed to the right place.
Once locations are bootstrapped, they show up with a quick examination: