Skip to content

Commit f9dc0b2

Browse files
committed
Aquilon doc: add documentation on configuring cluster
1 parent f1f02cd commit f9dc0b2

4 files changed

Lines changed: 127 additions & 3 deletions

File tree

.travis-scripts/dictionary.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ GPUs
4949
GRN
5050
GRNs
5151
hacky
52+
Hadoop
5253
HPC
5354
HTC
5455
HEPiX
@@ -144,6 +145,7 @@ vCenter
144145
versioned
145146
VirtualEnv
146147
virtualenv
148+
virtualisation
147149
virtualised
148150
VLAN
149151
VM

_aquilon/management.md

Lines changed: 116 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ the command would be:
202202
aq bind_feature --feature demo --personality test --archetype web_servers
203203
```
204204

205-
*Note: despite the command help mentions that features can also be bound to archetypes, it is
206-
highly recommended not to do it.*
205+
*Note: it is possible to bind a feature to an archetype if you want all the personalities in the archetype
206+
to have this feature. To do this, just remove `--personality`.*
207207

208208

209209
## Personalities
@@ -365,6 +365,120 @@ 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. It may be hypervisors in a cloud, disk servers in a distributed storage infrastructure like Hadoop
372+
or Ceph, or hosts behind proxy.
373+
374+
Clusters, like hosts, have an archetype and personality attached. It allows for cluster-wide configuration
375+
to be applied after most of the host configuration is done, just before including the host archetype `final.pan`
376+
(the last thing done in any plenary object template). Thus the cluster personality is added to the host
377+
personality. Depending on the cluster type, the host personality of a clustered host may be as minimal
378+
as providing the basic OS configuration (typically the case for hypervisors in a cloud)or also
379+
configure some features specific to the host (e.g. the hosts
380+
behind a proxy may not all run the same services).
381+
382+
Configuring a cluster involves:
383+
* Creating the cluster archetype and personality
384+
* Creating the cluster
385+
* Adding hosts (hypervisors) to the cluster
386+
* Building the cluster and its hosts
387+
* Optionally, using the cluster as the "machine location" for virtual machines
388+
389+
### Creating the cluster archetype and personality
390+
391+
A cluster archetype is created the same way as as [host archetype](#adding-archetypes),
392+
with the exception that `--cluster_type compute` option must be added.. Depending if the
393+
archetype is defined as compilable or not, a profile will be created for the cluster (or not).
394+
395+
A typical example would be:
396+
397+
```bash
398+
aq add_archetype --archetype cluster_test --cluster_type compute
399+
```
400+
401+
Option `--compilable` must be added to define the archetype as compilable and get a cluster profile
402+
object created. If you want the archetype to be compilable, you must create the same templates for
403+
the cluster archetype as for a
404+
[host archetype](/aquilon/configuration.html#creating-the-archetypebase-and-archetypefinal-templates), as well
405+
as a [archetype/declaration.pan](/aquilon/configuration.html#enabling-the-template-library)
406+
if it is enabled for host archetypes. `declaration.pan` must be similar to the one used in a host archetype
407+
if you are using the template library. The exact content of `base.pan` and `final.pan`depend on what is required
408+
by the personality and features bound to the archetype: you should in particular make available all the information
409+
normally accessible to the features in the context of a host archetype.
410+
411+
Personality is created and managed the same way as for a [host personality](#personalities)). The same personality
412+
(and archetype) can be used with several clusters.
413+
414+
Like for host archetypes, it is possible to [bind](#binding-features-to-personalities) a feature to a cluster
415+
archetype instead of the cluster personality.
416+
417+
### Creating the cluster
418+
419+
A cluster is created with `aq add_cluster`. For example, to create a cluster `cluster_test` that will
420+
use the personality `os_hv_test` from archetype `mycloud`, use the following command:
421+
422+
```bash
423+
aq add cluster --cluster cluster_test --archetype mycloud --personality os_hv_test
424+
--down_hosts 0 --building hq --sandbox your/sandbox
425+
```
426+
427+
In the previous command, `--down_hosts` is set to 0 as Aquilon doesn't make a direct use of this value
428+
(an external monitoring tool would be required). For `--building` and `--sandbox`, use values appropriate
429+
to your site (sandbox name must be in the form `user/sandbox_name`).
430+
431+
### Adding hosts to the cluster
432+
433+
After creating the cluster, it is necessary to add or more hosts as the cluster members (e.g. hypervisors in a
434+
cluster representing a cloud). The host must have been created with the [standard procedure](/aquilon/configuration.html#declaring-hosts)
435+
before adding it to the cluster. This is done with the command `aq cluster`.
436+
437+
For example, to add a node `hv1.example.com` in the cluster `cluster_test`:
438+
439+
```bash
440+
aq cluster --cluster cluster_test --hostname hv1.example.com
441+
```
442+
443+
Note that if the host was previously part of another cluster, it will be removed from the original cluster.
444+
445+
446+
### Building the cluster and its hosts
447+
448+
The command `aq reconfigure --membersof` allows to rebuild the host profile for each
449+
member of the cluster.
450+
451+
For example, to rebuild the cluster `cluster_test` and its hosts, use:
452+
453+
```bash
454+
aq reconfigure --membersof cluster_test
455+
```
456+
457+
This command must be used after every change affecting the cluster configuration (in particular the cluster
458+
personality) to ensure that all the configuration (profile) of each cluster member is updated.
459+
460+
In addition, there is a specific profile built for cluster itself if the archetype is compilable. To
461+
build or rebuild this cluster profile, use the command:
462+
463+
```bash
464+
aq make cluster --cluster cluster_test
465+
```
466+
467+
468+
### Binding virtual machines to the cluster
469+
470+
If the cluster is describing a virtualisation infrastructure like a cluster, hosts that are not part of the cluster
471+
may be associated with it through the (virtual) machine they use. When creating the machine, use the
472+
option `--cluster` instead of `--rack`, `--desk` or `--chassis`. One the machine is configured,
473+
[add the hosts][aquilon_hosts] to Aquilon using the same procedure as for hosts using bare metal machines.
474+
475+
It is not possible to update a machine that was initially configured to use a bare metal machine to become
476+
a virtual machine. But it is possible to change the cluster hosting a machine (or change a virtual machine hosted
477+
by a host to a VM hosted by a cluster) with `aq update_machine` command with the `--cluster` option.
478+
479+
To be able to bind a virtual machine to a cluster, it is necessary that the virtual machine has no local disk.
480+
Use `virtual_disk` as the disk type when creating the machine model that will be used by the virtual machine.
481+
368482
## Initial Installation
369483

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

_aquilon/technical_details.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,18 @@ the AII service used for the initial installation of an Aquilon host.
119119
## Clusters
120120

121121
Clusters are collections of hosts that have a similar role/function. They are typically used describe
122-
a cluster of hypervisors, like those provided by VMware ESX or clouds. Aquilon can provide some monitoring
122+
a cluster of hypervisors, like those provided by VMware ESX or clouds, a disk servers in a distributed
123+
storage technology like Hadoop or Ceph, hosts behind a proxy...
124+
125+
Aquilon can provide some monitoring
123126
thresholds associated with the cluster, like the minimum or maximum number of hosts that must be running at
124127
any time. Clusters can also be used to describe a HA cluster. Note that Aquilon is not a replacement for the
125128
cluster middleware: it just allows to represent a group of machines managed by such a middleware.
126129

130+
Clusters, like hosts, have an archetype and personality attached. It allows to ensure that all hosts that are
131+
part of the cluster receive the same configuration. The cluster personality is added to the host, in addition
132+
to the host personality.
133+
127134
Once a cluster is defined, it can be used as an alternative to a machine object to describe where is running
128135
a host. In this case, Aquilon doesn't track on which cluster node the host is running: it lets the middleware
129136
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)