<div dir="ltr"><div><br></div><div>Hi there,</div><div><br></div><div>We use MySQL as a backend for our Kea infrastructure, and at the time we were doing application development, the hook libraries were all licensed products and a lot of the other nice glue just didn't exist. Granted we don't do anything terrible sophisitcated with our setup, but within our environment, Kea itself is managed by the aforementioned application using standard MySQL APIs; the configuration itself that Kea supports lives in that application's database (VLAN info, subnet IDs, scopes, etc.) using fairly basic but predictable rules, and the application has an HTTP endpoint that will generate YAML of all our scopes that we then feed into Salt states to manage the Kea config. It sounds maybe a bit more complicated than it actually is, but the basic gist is:</div><div><br></div><div>- scope information is managed by an in-house provisioning application</div><div>- said application generates configuration data that is loaded directly into our configuration management pipeline</div><div>- said configuration management pipeline is used to keep our Kea servers up to date</div><div>- said application supports API-driven management of lease/reservation data directly in Kea via Python's MySQL API</div><div><br></div><div>Granted, our use case is very specific -- we use Kea as more of a programmatic resource for a general-purpose infrastructure provisioning service -- but it's definitely done a lot of heavy lifting for us over the last 2-3 years. I guess maybe what I'm saying is you may get where you want to go using other approaches to managing DHCP as a service via Kea without having to dive directly into its APIs, and while a separate information source adds complexity, if you can script the interactions between it and Kea, it's possible to end up with the results it sounds like you're looking for.</div><div><br></div><div>hth,</div><div>Klaus</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 21, 2020 at 11:08 AM KennyU05 <<a href="mailto:kennyunger@gmail.com">kennyunger@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
I'm attempting to build some in-house automation processes on top of Kea. It<br>
will utilize a MariaDB Galera database on the backend. As part of this tool,<br>
I will be required to insert configuration data directly into the Kea MySQL<br>
database. I've been frustratingly fumbling my way through creating the<br>
subnet, the pool, and all the associated links between the subnet and the<br>
server. Right now I'm trying to figure out how to create the options. We<br>
don't use anything non-standard. However, I'm having difficulty<br>
understanding what the requirements are for the dhcp4_options table. I've<br>
read through the ARM as well as the database creation script in source. I<br>
even dug into some of Kea's code to try to understand what it was looking<br>
for. Granted, I'm a SysAdmin by trade, so my coding abilities aren't as<br>
skilled as the Kea devs.<br>
<br>
What I'm hoping to find is more clear documentation or examples of a MySQL<br>
configuration backend that demonstrates the data required to have a fully<br>
functioning DHCP server. This could be as simple as a MySQL dump of a simple<br>
working database.<br>
<br>
I know that ISC probably wants to encourage people to use the cb_cmds<br>
subscriber-only hook, and I don't blame them. At the same time, if they want<br>
people to really switch away from the old ISC-DHCP implementation they<br>
should make Kea as easy to adopt as possible.<br>
<br>
If I can't get the Kea CB figured out, I'll just end up writing scripts to<br>
generate the old JSON configuration files based of a database of my own<br>
creation.<br>
<br>
Any help or insight from people who have gone through this struggle would be<br>
greatly appreciated!<br>
<br>
Thanks!<br>
Kenny<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://kea-users.7364.n8.nabble.com/" rel="noreferrer" target="_blank">http://kea-users.7364.n8.nabble.com/</a><br>
_______________________________________________<br>
ISC funds the development of this software with paid support subscriptions. Contact us at <a href="https://www.isc.org/contact/" rel="noreferrer" target="_blank">https://www.isc.org/contact/</a> for more information.<br>
<br>
To unsubscribe visit <a href="https://lists.isc.org/mailman/listinfo/kea-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a>.<br>
<br>
Kea-users mailing list<br>
<a href="mailto:Kea-users@lists.isc.org" target="_blank">Kea-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/kea-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
</blockquote></div>