Hello,
My ultimate goal is to have puppet master take care of node deployment configuration even before OS gets deployed. That is puppet master configuring kickstart templates/disk partitions of a node with help of facts on puppet razor and hiera with role/profile pattern.
To be more specific. Our environment needs different disk partitions/kickstart passwords/kickstart templates depending on the role/profile/cluster of the node. All this data cannot be received from factor and instead has to come from a CMDB/hiera. We are already used to configuring nodes post OS deployment with the help of role/profile pattern and using hiera to distribute the data across the hierarchy.
I am just trying out puppet razor and its features, thinking it would solve this problem of receiving kicstart data about a node from hiera depending on its mac-address. I would also like to configure hostname depending on the node mac-address which it would receive from hiera.
I could accomplish the above by using puppet and hiera, and manually enter kickstart data on hiera for razor node and configure with puppet - but in this case - I will need me to mention all the kickstart static data of all the nodes as "razor node data on hiera". I do not want to create a huge set of static data for razor node. I would instead want the kickstart template on puppet razor node to be automatically populated whenever that respective node gets deployed through razor.
In short this is the hierarchy that i have..
---
:backends:
- yaml
- eyaml
:yaml:
:datadir: "<>"
:eyaml:
:datadir: "<>"
:pkcs7_private_key: /<>
:pkcs7_public_key: /<>
:hierarchy:
- "nodes/%{::trusted.certname}"
- "mac/%{::mac}"
- "virtual/%{::virtual}"
- "role/%{role}"
- "cluster/%{cluster}"
- "os/%{::operatingsystem}/%{::operatingsystemmajrelease}"
- common
:merge_behavior: deep
:logger: puppet
I would want to specify data as follows:
mac/ef:as:as:sg:as:fg
"disk partitiion": "<>"
cluster/test
"disk partition":<>
role/test
"disk partition":<>
I would then want the respective node during node provisioning to pick up the above data from hiera depending on its facts "::mac", and use the data in kickstart template/pxe templates etc...
That would help me keep all the configuration data for a node at one place(hiera), and not repeat it or use some other tool to do the same with some other database.
Please let me know, if anyone has any ideas on how to accomplish the above.
Thanks,
↧