-
Notifications
You must be signed in to change notification settings - Fork 108
Document how to setup external OpenVox server for Smart Proxy #4610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
The PR preview for c6d7040 is available at theforeman-foreman-documentation-preview-pr-4610.surge.sh The following output files are affected by this PR: |
|
@ekohl Mind taking a look? What to do about this for our downstream? Do we call it OpenVox or Puppet? |
ekohl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting approach, but architecturally I don't like the request forwarder approach because you're mixing identities.
Normally the Foreman Proxy represents a Puppetserver or OpenVox server somewhere. By default that is on the same machine, but it doesn't have to be. That's why there's a --foreman-proxy-puppet-url parameter.
However, there's a big gap that isn't well covered: the facts and reports are sent directly to Foreman, identified with the Smart Proxy's identity (= certificates). Ideally the Smart Proxy Puppet module would have an endpoint where Puppetserver / OpenVox server can send those and also query the ENC with proper authentication. Inline I've linked to the puppetca_token_whitelisting that already took that path. We just never finished it.
There are a few items inline that I consider blocking, like hiding the guides for anything but katello and orcharhino.
| . Configure your OpenVox server to use ENC and/or a report upload script in `/etc/puppetlabs/puppet/puppet.conf`: | ||
| + | ||
| [source, ini, options="nowrap", subs="+quotes,verbatim,attributes"] | ||
| ---- | ||
|
|
||
| [main] | ||
| ... | ||
| reports = logs, foreman | ||
|
|
||
| [server] | ||
| ... | ||
| node_terminus = exec | ||
| external_nodes = /opt/puppetlabs/puppet/bin/ruby /etc/puppetlabs/puppet/node.rb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps use puppet config set?
# puppet config set --section main reports "logs, foreman"
# puppet config set --section server node_terminus exec
# puppet config set --section server external_nodes "/opt/puppetlabs/puppet/bin/ruby /etc/puppetlabs/puppet/node.rb"Though I'd strongly advise against including logs in reports because it fills up your disks. There is no rotation set up by default.
guides/common/modules/proc_installing-the-request-forwarder-plugin.adoc
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO we should never document manual steps to install Smart Proxy plugins and config files outside of the installer, which is why I'm tempted to hide all these steps in the katello build.
guides/common/modules/proc_attaching-smart-proxy-to-external-openvox-server.adoc
Outdated
Show resolved
Hide resolved
guides/common/modules/proc_attaching-smart-proxy-to-external-openvox-server.adoc
Outdated
Show resolved
Hide resolved
| For more information, see xref:installing-the-request-forwarder-plugin[]. | ||
|
|
||
| .Limitations | ||
| * {Project} cannot manage Autosign entries on the external OpenVox server. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better if the puppetca_token_whitelisting provider was used. https://theforeman.org/manuals/3.17/index.html#puppetca_token_whitelisting describes how to do it manually. There are installer options for this, but you need manual steps on your OpenVox server too.
I think you need:
--foreman-proxy-puppetca-provider puppetca_token_whitelisting \
--foreman-proxy-puppet-url https://openvox.example.com:8140
And possibly configure the right certificate locations.
Then on the OpenVox server you need to install https://github.com/theforeman/smart-proxy/blob/develop/extra/puppet_sign.rb and configure the authentication.
|
|
||
| .Limitations | ||
| * {Project} cannot manage Autosign entries on the external OpenVox server. | ||
| * {Project} cannot obtain the modules and classes present on your OpenVox server but for its ENC functionality it must have a list of all available environments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you configure the Smart Proxy to query the remote OpenVox server? As noted above, --foreman-proxy-puppet-url https://openvox.example.com:8140 provided you have set up authentication on the OpenVox server side.
| . If you are sending the Puppet reports through {SmartProxyServers}, you must add your OpenVox server to `/etc/foreman-proxy/settings.yaml` on your {SmartProxyServer}: | ||
| + | ||
| [source, yaml, options="nowrap", subs="+quotes,verbatim,attributes"] | ||
| ---- | ||
| :trusted_hosts: | ||
| - _My_OpenVox_Server_FQDN_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please always use the installer to modify this because the installer will revert it. It should have a --foreman-proxy-trusted-hosts flag but note we also have some default values for that. Passing 1 value clears the others. The default is itself on Foreman and Foreman + itself on Smart Proxies.
86eb407 to
f0ee5ff
Compare
maximiliankolb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Ewoud for your input; I appreciate it. I will convert this to draft until I get some more insights downstream too.
I applied some suggestions already and rebased it to HEAD of "master".
guides/common/modules/proc_attaching-smart-proxy-to-external-openvox-server.adoc
Outdated
Show resolved
Hide resolved
guides/common/modules/proc_attaching-smart-proxy-to-external-openvox-server.adoc
Outdated
Show resolved
Hide resolved
|
Thanks for the feedback Ewoud. I think the detailed comments to the documentation are valid points. |
|
Thanks for the feedback. I'll need to get back to a longer reply, but I want to leave theforeman/puppet-puppetserver_foreman#69 (review) here. There I laid out a lot of context of how to have a more native integration in OpenVox. What isn't explicitly called out there, but something to consider: include all the integration bits in OpenVox itself so you only need to change configuration. If you then use https://github.com/OpenVoxProject/container-openvoxserver it should be fairly straight forward with environment variables. Note those are just general thoughts. The exact implementation details could be different. |
|
Thanks Jonas and Ewoud for your input. I spoke with @knoppi about it. We will need to spend more time on yet. I will keep this upstream PR as is for now and apply changes later on. |
f0ee5ff to
c6d7040
Compare
|
This design is certainly something that with my downstream hat on is interesting. About a year or 2 ago I spent quite a bit of time thinking about it but never got around to implementing it properly. In light of containerization I think we should revisit that again. Right now it's a very busy period for me, but when it settles down a bit I can try to dig up my notes and share them in something that's readable/understandable for others. If I forget then please remind me. |
What changes are you introducing?
Why are you introducing these changes? (Explanation, links to references, issues, etc.)
Anything else to add? (Considerations, potential downsides, alternative solutions you have explored, etc.)
Refs https://theforeman.org/manuals/3.17/index.html#3.5.5FactsandtheENC
Refs #579
Contributor checklists
Please cherry-pick my commits into: