I am new to foreman, and I am curious if its possible to add custom actions
to the hosts section like if somehow I assign per each MAC facts about its
APC information, so if the box ever dies, or I do want to reload/reboot, I
can do it from the GUI using custom facts, and actions from the Foreman GUI?
Has it been done before, or is there a way to build your own action hook to
the dropdown to run custom commands?
Thanks!
> I am new to foreman, and I am curious if its possible to add custom
> actions to the hosts section like if somehow I assign per each MAC facts
> about its APC information, so if the box ever dies, or I do want to
> reload/reboot, I can do it from the GUI using custom facts, and actions
> from the Foreman GUI?
We have some support for power, but it's mostly based around separaet
BMC devices and IPMI, which I'm unsure if APC units support (and if they
did, we probably wouldn't toggle it correctly).
Foreman itself lets you add a BMC interface to hosts, then for power
control it sends a request to the smart proxy (if :bmc is true) which
executes ipmitool/freeipmi.
You might be able to completely override and change the behaviour of the
power management controls using a plugin, so the same buttons in the web
UI are used, but it calls your APC code instead.
> Has it been done before, or is there a way to build your own action hook
> to the dropdown to run custom commands?
Mostly it's through plugins. Here's some more info:
http://theforeman.org/projects/foreman/wiki/Plugins
https://github.com/theforeman/foreman_bootdisk adds a new dropdown menu
to the host page, you might want to look at that.
···
On 06/03/14 21:54, Joe Shang wrote:
–
Dominic Cleal
Red Hat Engineering