Inventory: docs improvements

This commit is contained in:
Johannes Kirschbauer
2024-09-15 20:08:38 +02:00
committed by hsjobeki
parent c82c70e4a9
commit a13de96bb2

View File

@@ -25,7 +25,9 @@ buildClan {
## How to add machines ## How to add machines
Machines can be added via `inventory.machines` OR via `buildClan` directly. Every machine of the form `machines/{machineName}/configuration.nix` will be registered automatically.
Machines can also be manually added under `inventory.machines` OR via `buildClan` directly.
!!! Note !!! Note
It doesn't matter where the machine gets introduced to buildClan - All delarations are valid, duplications are merged. It doesn't matter where the machine gets introduced to buildClan - All delarations are valid, duplications are merged.
@@ -47,13 +49,8 @@ buildClan {
inventory = { inventory = {
machines = { machines = {
"backup_server" = { "backup_server" = {
# Don't include any nixos config here # Don't include any nixos config here.
# The following fields are avilable # See the Inventory API Docs for the available attributes.
# description: null | string
# icon: null | string
# name: string
# system: null | string
# tags: [...string]
}; };
"jon" = { "jon" = {
# Same as above # Same as above
@@ -75,6 +72,10 @@ Currently the inventory interface is implemented by the following clanModules
See the respective module documentation for available roles. See the respective module documentation for available roles.
!!! Note
It is possible to use any [clanModule](../reference/clanModules/index.md) in the inventory and add machines via
`roles.default.*`
### Adding services to machines ### Adding services to machines
A module can be added to one or multiple machines via `Roles`. clan's `Role` interface provide sane defaults for a module this allows the module author to reduce the configuration overhead to a minimum. A module can be added to one or multiple machines via `Roles`. clan's `Role` interface provide sane defaults for a module this allows the module author to reduce the configuration overhead to a minimum.
@@ -117,9 +118,7 @@ Each service can still be customized and configured according to the modules opt
} }
``` ```
### Scalabling the Backup ### Scaling the Backup
The inventory allows machines to set **Tags**
It is possible to add services to multiple machines via tags. The service instance gets added in the specified role. In this case `role = "client"` It is possible to add services to multiple machines via tags. The service instance gets added in the specified role. In this case `role = "client"`