1
0
mirror of https://github.com/inofix/common-inv.git synced 2026-02-05 09:46:20 +01:00
Files
2017-02-20 23:49:08 +01:00
..
2016-10-06 13:49:17 +02:00

Collection of Nodes

This directory contains the nodes/hosts, seperated by project. A project directory basically is only a namespace to make clear what belongs together.

What belongs together, i.e. what constitutes a project, is decided primarily on the common reference of the same classes. Therefore a group of classes was introduced that contains a member for every project, such that every node of a project can reference that class to get the infos common to all members ('classes/project/{project-name}.yml').

It might be a good idea to define projects also based on accounting considerations, such that future splitting of the repository is less complex - e.g. use a seperate project per customer or foundation.

For the later splitting, one only has to make sure that all the referenced classes are available.

Something similar was introduced for the nodes themselves. There is a group of classes that match hostnames ('classes/host/{hostname}.yml'). It is used to store the information like the hosts hardware resources or location, things that might be relevant without (or prior to the creation of) the actual host, and could be shared with other nodes. Of course, a generalization can be used also here: if you have a cluster of nodes that really are the same except, let's say, for hostname and ip, just one host class can hold that information, the hostname and the ip are then filled up by the configuration management engine via a range for example.

Every such class is thought to be referenced first of all, by the corresponding host itself. It yet serves another purpose too: a virtualization host references all its client hosts, as it needs to know the resources to provide it with. But also for the client machine one might want to know its hypervisor, so a special class called host.Host_{hostname} was introduced, which is only to be referenced by the clients (and not by that hypervisor itself).

Note: Always reference first the other hosts and only then the host in question to make sure the current host will have set its parameters last in order to overwrite other values.