Graph-IT

inventory.json

The inventory.json-file needs to be located inside the etc-folder. It can be created by hand, but it is normally adviced to use:

There are further option manipulating the inventory.json- using push.php inventory, see: push.php.

Required attributes

There are attributes which are required for each host, namely:

Example

"scanner01": {
    "mac": "du:mm:yV:al:ue:01",
    "ip4": "1.1.1.1"
},

Hosts to which we push no configuration to (i.e. to phones, printers and similar) do not need any other attributes.

General optional host attributes

There are attributes which are not required but will expand/influence the configuration file generation.

Example

"scanner01": {
    "mac": "du:mm:yV:al:ue:01",
    "ip4": "1.1.1.1",
    "groups": {
        "scanners": true,
      "rented": true,
    },
    "cname": {
        "scan01": true
    }
},

Templates/Confs

The following templates exist. And are presented as folders in the var-folder.

To specify that a host is associated to one or more templates, the names of those templates need to be added to the confs-array for that host. It is typical that a single host is associated to multiple templates.

Example

For an NFS server which uses Kerberos we could for example use:

"server199": {
  "mac": "du:mm:yV:al:ue:02",
  "ip4": "2.2.2.2",
  "confs": {
    "server": true,
    "server_nfs": true,
    "kerberos_client": true
  },
  "shares": {
      "\/var\/nfs\/home": {
          "range": "10.66.0.0\/16",
          "share": "\/var\/nfs\/home",
          "target": "\/home"
      },
  }
}

Note that aside from just adding those templates to the confs-array we also added the shares-attribut which is required for the NFS server configuration.

Additional and optional attributes for templates

Some of the above templates require additional attributes and others have optional attributes which are not required, but allow further configuration.

client

The base template for all normal PCs.

kerberos_client

Template for configuration files for all hosts that are Kerberos clients.

server

Base template for all our servers.

server_cups

Template for configuration files for hosts which run a CUPS-server for the domain.

server_dhcp

Template for configuration files for hosts which run a ISC-DHCP-server for the domain.

server_dns_castle / server_dns_loft

Template for configuration for our bind9/dns-servers of the 'castle'/'loft' domain.

server_kdc

Template for configuration files for hosts which run a Kerberos Key Distribution Center for the domain.

server_kdm

Template for configuration files for hosts which run a Kerberos Key Distribution Manager for the domain.

server_lxd

Template for configuration files for hosts which run a LXD-server.

server_ldap

Template for configuration files for hosts which run an OpenLDAP-server for the domain.

server_nfs

Template for configuration files for hosts which run an NFS-Kernel-Server-server for the domain.

server_vbox

Template for configuration files for hosts which run a VirtualBox-server for the domain.

server_web

Template for configuration files for hosts which run a web-server inside the domain.

server_samba_castle / server_samba_loft:

Template for configuration files for hosts which run a [SAMBA]()-server for the castle-domain.

Both templates are a bunch of static configuration files which cover the samba configuration and a bunch of incron.d jobs.

router_loft

Template of configuration files for routers which run for the loft-domain. The template mainly covers the firehol-, network/interfaces-configuration and the vpn-tunnel maintenance.

router_castle

Template for configuration files required for routers inside the castle-domain.

kioskpi

Template for configuration files for our KioskPis.

lightpi

Template for configuration files for our LightPis.