Foreman as a node_terminus
In doing performance testing on using foreman as an ENC we noticed that we were chewing up a lot of CPU on the puppetmasters. Looking at it, I hypothesized that a lot of that was being spent exec-ing new ENC processes, firing up Ruby, etc. So to test I was looking at the puppet indirector, the 'exec' node_terminus and the foreman ENC script and tried to do some work to crib together a foreman node_terminus. In our synthetic setup it saved about 15% CPU. Not spectacular, but I figured it helps.
I'm brand new to Ruby and probably did some dumb stuff, but I thought I'd suggest this upstream. It doesn't entirely replace node.rb functionality, and there are downsides I'm sure, like needing to restart the puppetmaster to pick up config changes. I'm not in a position to be able to contribute, but I would like to file this as a feature request and attach this as an example of what could be done.
#1 Updated by Dominic Cleal over 5 years ago
- Project changed from Foreman to Installer
- Category changed from Puppet integration to Foreman modules
Interesting, thanks Michael. This would be similar the report processor, so makes sense.
One downside might be losing some of the features of node.rb for fact uploads when not acting as an ENC (or people using it on a cronjob instead for async uploads), but perhaps we could have code sharing between them (if possible, due to Ruby packaging).
#2 Updated by Ewoud Kohl van Wijngaarden over 5 years ago
That sounds very interesting. I wonder if we can make node.rb load the indirection to provide a compatible interface. For debugging it's nice you can do /etc/puppet/node.rb fqdn to see what puppet would use. It certainly sounds like it makes a lot of sense.