Closed ColonelPanicks closed 6 years ago
A rethinking of the above, the initial outline is far more complicated than needs be. Quite simply what this would require from metalware is for it to template and run scripts in a directory as part of the metal build process. The requirements of which are:
/var/lib/metalware/build_hooks/
metal build node001
would do the equivalent of metal render /var/lib/metalware/build_hooks/myhook.sh node001 |/bin/bash
, specifying a group with -g nodes
would loop through the nodes and the build_hook scripts) /var/log/metalware/build_hooks.log
Not to be confused with #207.
The concept of build hooks would be able to run commands on both the controller and infrastructure systems as part of the build process.
An Example
The IPA service (which usually runs on
infra01
) is a host and user information service for the cluster. When a node is being built it needs to be added to the IPA service, this requires a command to be run on bothinfra01
and the node being built.Currently, hosts are added to the IPA server on
infra01
manually and the node is connected by using a firstrun script as part of the build process.Further to this, if a node is being rebuilt then
infra01
needs to disable and re-enable the entry for the host otherwise the IPA connection will fail.What We're Looking For
Build hooks would need to:
metal build