I am trying to find a solution when deploying VMs and physical hosts using PXE where I can interact with a database to build a host or VM so I can manipulate the build process. An example of this would be to build a xenserver using a database so I can determine to role of the xenserver, ie is it a pool master or a slave. I could have IP information regarding the pool, the members in that pool and hostnames etc. I then would run a python script for example that could look up database values and configure the host accordingly. This is sometimes referred to as zero touch.
I have been reading up about puppet razor, cobbler, gpxe and some other next gen pxe tools but I thought I would ask if it is possible to interact with a database using these tools, or if anyone else has had some experience doing this?
The problem I see is when do I run these scripts to interact with a DB? Ie, can I get the PXE server to do this and pass the values to the servers I am building via say a kickstart script or do I do run the scripts directly on the server after PXE has build the server?
Any suggestions would be welcome? Many thanks