Graph-IT

Graph-IT Push

The 'graphit/push'-project contains a PHP tool that aside from some helper functionallity is ment to generate configuration files for specified hosts and copy those generated files to the host machine. This allows us a faster setup of systems inside our network (see: 'Server/Rechner hinzufügen'), to update configurations and keep them consistent in case:

Installation

Run:

composer create-project --stability dev graphit/push <target folder>

Components

The main components of the graphit/push-project are:

push.php

This is the executable of the push-project.

Usage:

push.php [options] [arguments]

Workflow

The general work flow when using push to handle host configuration files is to:

  1. Create/Update the network.json-file by hand if need be. This is the case whenever a new network host group is added. (see: network.json)
  2. Create/Update the inventory.json-file using the inventory:xxx-commands of push. (see: inventory.json and push.php).
  3. In case no dynamic data for the host exists, collect the dynamic data (/etc/network/interfaces and /etc/fstab) using dynamic:acquire. (see: push.php)
  4. Generate the files which need to be synched to the host using the configuration:xxx-commands of push. (see: push.php)
  5. Compare the generated configuration files of a host against the existing configuration using the configuration:diffsync-command of push. (see: push.php)
  6. Copy/Apply the newly generated configuration files to the host using the configuration:diffsync-command of push. (see: push.php)

Folders

Here's an overview of the folders which are present inside the project folder.