Integrating Dell Server Configuration Profiles

Currently I am building this outside of Foreman (lack of ruby knowledge), but would like some pointers and thoughts on the following. With some luck will be able to actually find time to build it as a plugin in a couple months.

With Dell servers (HP has something similar but I am not familiar with it), you can set a DHCP option (not sure this would work w/o url rewriting rules because of the default requests or managing DHCP) alternatively using command line or web-ui tools, load a system configuration xml that configures, the BMC, RAID, NICs, etc. from an http source.

What I was thinking about is a plugin that allows you to specify a path in unattended (/unattened/bmc?mac=&<any other url params, service tag for dell’s>), a flag indicating if it is host specific (in this case mac/other params must be able to map to a specific host’s bmc interface), and the template to render. I can see extending this to other protocols (generate tftp files). This would allow configuring the system out of the box with information we are capturing in foreman.

I can see this idea being extended to support other hardware as well (Juniper switches).

Any thoughts, suggestions, pointers on where to start (if I can find the time)?

This plugin did something similar by introducing a new template type, so you could perhaps borrow some code.

The plugins functionality was moved to core in this PR, if you want to directly go this route.

As a workaround until then you could perhaps use the script type for the template and adjust you DHCP config manually.

1 Like

Yeah, the userdata plugin mostly does what you want.
Or you could take a look at foreman_register which also renders a template for a host.

And this is some code to find a host by a mac address parameter:

You don’t need a plugin, you can leverage any template kind you don’t use. Usually “script” is unused, the only missing bit is searching by service tags - unattended currently only search by MAC addresses. Tokens would need to be disabled (token_duration set to 0) in order to get the data tho.

Adding search by something else should be relatively small patch. If it works, I would not be against adding a new template kind if we find generic enough name for it (each vendor will probably have a different term).

Once you have a working template make sure to share it in