Skip to content

Commit 48cb4f0

Browse files
committed
Aquilon doc: add documentation on configuring cluster
1 parent eb59887 commit 48cb4f0

3 files changed

Lines changed: 97 additions & 0 deletions

File tree

_aquilon/management.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,98 @@ remove the service requirement matching the host with the command
365365
The mapping is actually removed at the next `aq reconfigure` for the host after modifying
366366
the service requirements.
367367

368+
## Using Aquilon clusters
369+
370+
[Clusters][aquilon_details] are intended to represent in Aquilon a group of hosts that must be configured in
371+
the same way and will host other Aquilon machines, typically hypervisors in a cloud. Like hosts, they have
372+
an archetype and personality attached. It allows to ensure that all hosts that are
373+
part of the cluster receive the same configuration. The cluster personality is added to the host, in addition
374+
to the host personality (each cluster has a plenary template describing the cluster configuration and
375+
personality that is included in the configuration of all hosts belonging to the cluster). Except for specific
376+
requirements, the host personality of a clustered host is generally kept minimal, just providing the basic
377+
OS configuration.
378+
379+
Configuring a cluster involves:
380+
* Creating the cluster archetype and personality
381+
* Creating the cluster
382+
* Adding hosts (hypervisors) to the cluster
383+
* Building the cluster and its hosts
384+
* Using the cluster as the "machine location" for virtual machines
385+
386+
### Creating the cluster archetype and personality
387+
388+
A cluster archetype is created the same way as as [host archetype](#adding-archetypes),
389+
with the exception that `--cluster_type compilable` option must be added. A typical example would be:
390+
391+
```bash
392+
aq add_archetype --archetype cluster_test --compilable --cluster_type compute
393+
```
394+
395+
Cluster archetype creation involves the creation of the same templates as for a
396+
[host archetype](/aquilon/configuration.html#creating-the-archetypebase-and-archetypefinal-templates), as well
397+
as a [archetype/declaration.pan](/aquilon/configuration.html#enabling-the-template-library)
398+
if it is enabled for host archetypes.
399+
400+
Personality is created the same way as for a [host personality](#personalities)). The same personality
401+
(and archetype) can be used with several clusters.
402+
403+
Like for host archetypes, it is possible to [bind](#binding-features-to-personalities) a feature to a cluster personality.
404+
405+
406+
### Creating the cluster
407+
408+
A cluster is created with `aq add_cluster`. For example, to create a cluster `cluster_test` that will
409+
use the personality `os_hv_test` from archetype `cluster_test`, use the following command:
410+
411+
```bash
412+
aq add cluster --cluster cluster_test --archetype cluster_test --personality os_hv_test
413+
--down_hosts 0 --building hq --sandbox your/sandbox
414+
```
415+
416+
In the previous command, `--down_hosts` is set to 0 as Aquilon doesn't make a direct use of this value
417+
(an external monitoring tool would be required). For `--building` and `--sandbox`, use values appropriate
418+
to your site (sandbox name must be in the form `user/sandbox_name`).
419+
420+
### Adding hosts to the cluster
421+
422+
After creating the cluster, it is necessary to add or more hosts as the cluster members (e.g. hypervisors in a
423+
cluster representing a cloud). The host must have been created with the [standard procedure](/aquilon/configuration.html#declaring-hosts)
424+
before adding it to the cluster. This is done with the command `aq cluster`.
425+
426+
For example, to add a node `hv1.example.com` in the cluster `cluster_test`:
427+
428+
```bash
429+
aq cluster --cluster cluster_test --hostname hv1.example.com
430+
```
431+
432+
Note that if the host was previously part of another cluster, it will be removed from the original cluster.
433+
434+
435+
### Building the cluster and its hosts
436+
437+
In addition to the configuration added to each cluster host, there is a specific profile built for cluster
438+
itself. The command `aq make cluster` allows to rebuild both the cluster profile and the host profile for each
439+
member.
440+
441+
For example, to rebuild the cluster `cluster_test` and its hosts, use:
442+
443+
```bash
444+
aq make cluster --cluster cluster_test
445+
```
446+
447+
This command must be used after every change affecting the cluster configuration (in particular the cluster
448+
personality) to ensure that all the configuration (profile) of each cluster member is updated.
449+
450+
### Binding virtual machines to the cluster
451+
452+
Hosts are associated with the cluster through the machine they use. When creating the machine, use the
453+
option `--cluster` instead of `--rack`, `--desk` or `--chassis`. One the machine is configured,
454+
[add the hosts][aquilon_hosts] to Aquilon using the same procedure as for hosts using bare metal machines.
455+
456+
It is not possible to update a machine that was initially configured to use a bare metal machine to become
457+
a virtual machine. It is possible to change the cluster hosting a machine (or change a virtual machine hosted
458+
by a host to a VM hosted by a cluster) with `aq update_machine` command with the `--cluster` option.
459+
368460
## Initial Installation
369461

370462
Initial installation of a node in Quattor is managed by the AII component that generally runs on

_aquilon/technical_details.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ thresholds associated with the cluster, like the minimum or maximum number of ho
124124
any time. Clusters can also be used to describe a HA cluster. Note that Aquilon is not a replacement for the
125125
cluster middleware: it just allows to represent a group of machines managed by such a middleware.
126126

127+
Clusters, like hosts, have an archetype and personality attached. It allows to ensure that all hosts that are
128+
part of the cluster receive the same configuration. The cluster personality is added to the host, in addition
129+
to the host personality.
130+
127131
Once a cluster is defined, it can be used as an alternative to a machine object to describe where is running
128132
a host. In this case, Aquilon doesn't track on which cluster node the host is running: it lets the middleware
129133
do the scheduling, assuming that all hosts in the cluster are equivalent.

_includes/link_definitions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This file contains link definitions that can be used in reference links.
77
[aquilon_configuration]: /aquilon/configuration.html
88
[aquilon_details]: /aquilon/technical_details.html
99
[aquilon_domains]: /aquilon/technical_details.html#domains
10+
[aquilon_hosts]: /aquilon/configuration.html#declaring-hosts
1011
[aquilon_install]: /aquilon/00-install.html
1112
[aquilon_management]: /aquilon/management.html
1213
[aquilon_plenary]: /aquilon/technical_details.html#plenary-templates

0 commit comments

Comments
 (0)