Let me apologize up front for this huge post…
I am still very new to Foreman. I’m continuing my proof-of-concept for an organization with roughly 8000 nodes which I would like to manage with Foreman.
Before diving into my exact question, let me give a quick summary of what my organization looks like:
- 1300 branch offices.
- Each branch office has two subnets:
- “Workstation-Net” - This includes a single Linux server for the branch and some Windows workstations (I only care about the server in this scenario).
- “Kiosk-Net” - This subnet includes 3-5 kiosk-type systems running Linux.
I want to be able to use Foreman to provision both the branch server (in “Workstation-Net”) and the kiosk systems (in “Kiosk-Net”) for each branch.
Now I’m trying to understand how to organize this all in Foreman. Let me explain how I have things setup now in my lab environment.
I have two labs, which are modeled just like a branch office, with two subnets:
Now because each lab has two subnets, I need to create a total or four subnets in Foreman:
So my understanding is that when provisioning a system via discovery (and using auto-provision), I need to match up the discovered nodes with a host group. I now create four host groups, one for each subnet:
Now, the way a “server” provisions is much different than how a “kiosk” would provision. So I create two separate kickstart provisioning templates, which are associated with their respective host groups:
- Associated with “Lab_01_Workstation-Net_HG” and “Lab_02_Workstation-Net_HG”.
- Associated with “Lab_01_Kiosk-Net_HG” and “Lab_02_Kiosk-Net_HG”.
I have no idea if this is the most effective way to organize this all, but at least I can now execute the following workflow:
- System PXE boots into discovery image.
- From Foreman, the discovered host can be manually assigned to its respective host group depending if it is a “server” or a “kiosk”. The host group ultimately dictates what the node provisions as.
- The system then reboots and provisions successfully.
However, a requirement of mine is to have auto-provisioning, which means setting up discovery rules. The thing that trips me up though is that each rule can only assign to one host group.
So this basically means I need to create a discovery rule for each host group, each having a search pattern which only matches systems in that discovered host group’s subnet, right?
If I’m understanding this all correctly (which I probably am not), that would seem like a lot of subnets, host groups, provisioning template associations, and discovery rules (if factoring in the entire organization, not just my labs)!
I’m sure that I could script something that pulls this data out of a CSV sheet and creates the needed objects via the Foreman API, but… I am wondering if I’m just over-complicating this and completely missing a better way of organizing this all?
Again, sorry for the huge book here. Thank you so much for reading and if you have any tips for me, I would be so appreciative!