engine: resources: Add dhcp:server and dhcp:host resources

This adds a new dhcp server resource, as well as a dhcp host resource
used to specify the static mapping between mac address and ip address.
It also adds a simple, pure-golang example dhcp client which might make
testing easier.

The dhcp resource is not meant to be a full-featured dhcp server
replacement, and it might still be useful to use the venerable dhcpd,
however for integrated, pure-golang bootstrapping environments, this
might prove to be very useful.

It can be combined with the tftp resource to build PXE setups with mgmt.

This resource can be extended further to support a dhcp:range directive,
automatic edges, and more!
This commit is contained in:
James Shubin
2020-03-29 03:02:56 -04:00
parent 016d021d5a
commit 583344138a
5 changed files with 1340 additions and 0 deletions

1177
engine/resources/dhcp.go Normal file

File diff suppressed because it is too large Load Diff