i have requirement to query my external CMDB, for different teams roles,
server life-cycle environment, group of servers belongs to some specific
group of application team, all those information and using those i want to
setup roles/permissions in katello/satello.
I am planning to populate all information as yaml using node.rb by adding
some more code to query external CMDB, and by using those values i can
design where my host belongs to and to which application group and what all
users have permission to that host.
Does anyone have any suggestion to make it better way? or extending node.rb
with all those information is the right way?
if anyone has any experience before with similar or matching requirements ?
i have requirement to query my external CMDB, for different teams roles,
server life-cycle environment, group of servers belongs to some specific
group of application team, all those information and using those i want to
setup roles/permissions in katello/satello.
I am planning to populate all information as yaml using node.rb by adding
some more code to query external CMDB, and by using those values i can
design where my host belongs to and to which application group and what all
users have permission to that host.
Does anyone have any suggestion to make it better way? or extending
node.rb with all those information is the right way?
if anyone has any experience before with similar or matching requirements ?
I'd use a combination of foreman_hooks and an external process. Changing
node.rb will be obfuscation at best and you will risk losing your edits on
an upgrade.
foreman_hooks are great and (generally) work well. Be careful of any update
hooks you have which trigger and update - you'll find yourself in a
recursive nightmare (update triggers a hook which makes and update which
triggers the hook…). Great think about hooks is you can have various
actions base against what happens to the host. For example, we use a
destroy hook to clean AD entries and set CMDB entries when a host is
removed etc.
Personally, to scrape a CMDB and set permissions etc I'd probably look at
an external API based script and batch this. Just my view…