@@ -202,8 +202,8 @@ the command would be:
202202aq 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
365365The mapping is actually removed at the next ` aq reconfigure ` for the host after modifying
366366the 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
370484Initial installation of a node in Quattor is managed by the AII component that generally runs on
0 commit comments