Hi all, I’m writing in because I think I need just a little help with fully wrapping my head around content views in Foreman. I’ve read some documentation, which I don’t blame for my lack of understanding, I am just not putting it all together for some reason in my brain!
So let me lay out an example and then ask my questions.
Host Types
I’m basically managing two types of systems with Foreman:
- CentOS 8 servers
- CentOS 8 kiosks
Lifecycle Environment
And my lifecycle environment looks like so:
- Library > DEV > QA > PROD
Products
Here are the products I have created for said systems:
- CentOS8 - This product contains all of the CentOS repositories.
- Extras - This contains repositories that my team will use to put custom RPMs in. It contains three repositories:
- Servers - Extra packages for our servers.
- Kiosks - Extra packages for our kiosks.
- Application - Contains custom RPMs that deliver our in-house application and components.
Content Views
Now, I build several content views using my products:
- CentOS 8 for x86_64 - This content view contains:
- The “CentOS 8” product
- All of its repositories.
- The “CentOS 8” product
- Server Extras - This content view contains:
- The “Extras” product.
- The “Servers” repository only.
- The “Extras” product.
- Kiosk Extras - This content view contains:
- The “Extras” product.
- The “Kiosk” repository only.
- The “Extras” product.
- Application - This content view contains:
- The “Extras” product.
- The “Application” repository only.
- The “Extras” product.
Composite Content Views
Now that I have the main content views created, I create two types of composite content views:
- Servers - Contains the following content views:
- CentOS 8 for x86_64
- Server Extras
- Application
- Kiosks - Contains the following content views:
- CentOS 8 for x86_64
- Kiosk Extras
Overview
So that is how I am logically (or non-logically) organizing this stuff. I can think of a few other ways to do it, but my brain is hurting trying to figure out what makes the most sense, and what won’t be hell to manage.
My idea at least is that I simply subscribe “server” type hosts to the “Servers” composite content view and “kiosk” type hosts to the “Kiosks” composite content view, and those systems can get what they need, while the lesser content views, products, and repositories underneath are logically separated.
I would then have some lab systems subscribed to the “DEV” environment, some to the “QA” environment and production systems obviously to the “PROD” environment.
So now that I’ve explained my environment, my first question is…
Does the above make sense in regards to how I’ve logically separated things? Do you foresee any difficulties I may encounter by doing it like this? Maybe I should opt for something a little more simple?
So lets say I do go forward with everything setup like the above, here is a scenario I wonder about…
Scenarios
One scenario I’d like to walk through is the below. I have some questions throughout the scenario and if anyone can offer advice on them, it would be much appreciated.
Lets say I build a custom package that delivers something I need on my kiosks. I’d imagine the process would look like so:
- RPM is built.
- Via hammer, API or GUI I upload the RPM into the “Kiosk” repository in the “Extras” product.
- So at this point, my package is in the “Library” environment, correct?
- Now I need to get my package into the “DEV” environment so I can install it on my development systems to perform my own unit testing. Here is where I get confused. Do I now go to the lesser “Kiosk Extras” content view, make a new version and promote it to “DEV” or do I go to the composite content view “Kiosks” and promote that to “DEV”? Or do I basically do both?
- I’d imagine I now promote my “Kiosk” composite content view version to “QA” and finally “PROD”.
Conclusion
I think I dumped enough in one single post for now! Apologies for the book. If anyone found the time to read through this and has any answers or advice for me, I would be very appreciative.
Thank you!