-
Notifications
You must be signed in to change notification settings - Fork 136
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
Fixes #35985 - Use Katello integration in theforeman/puppet #828
Conversation
Looks like I missed at least the ssl key: # dnf install https://yum.puppet.com/puppet7-release-el-8.noarch.rpm https://yum.theforeman.org/releases/nightly/el8/x86_64/foreman-release.rpm https://yum.theforeman.org/katello/nightly/katello/el8/x86_64/katello-repos-latest.rpm
# dnf module enable katello:el8 pulpcore:el8
# dnf install https://ekohl.nl/foreman-installer-3.6.0-0.1.develop.el8.noarch.rpm https://ekohl.nl/foreman-installer-katello-3.6.0-0.1.develop.el8.noarch.rpm
# foreman-installer --scenario katello --enable-puppet --puppet-server true --foreman-proxy-puppet true --foreman-proxy-puppetca true -s --tuning development --enable-foreman-plugin-puppet
# grep ssl /etc/puppetlabs/puppet/foreman.yaml
:ssl_ca: "/etc/pki/katello/puppet/puppet_client_ca.crt"
:ssl_cert: "/etc/pki/katello/puppet/puppet_client.crt"
:ssl_key: "/etc/puppetlabs/puppet/ssl/private_keys/centos8-stream.wisse.example.com.pem" But it at least demonstrates the effect. Fixing the ssl key and adding some tests for it now. |
Did that
Right now it's not trivial since I need to look at how I'd simulate Hiera in rspec-puppet. |
This will need a migration alongside of it to I imagine to capture the previous choice of the user had for |
Not really. We drop the parameter (while all the others remain). Kafo automatically drops non-existent parameters from the answers file. There is the implication that the user can no longer pass in the certificate parameters. Or rather, they're being ignored. That may be misleading and I can update the help for it. |
@@ -0,0 +1,2 @@ | |||
--- | |||
puppet::server::foreman::katello: true |
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.
So I fully understand, this will only trigger this class if the main puppet class is enabled?
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.
Pretty much, but I'm going to be pedantic.
Technically only if the puppet::server::foreman
class ends up being evaluated without a more specific answer. Hiera is more like a datastore. If Puppet doesn't ask about the value, it doesn't affect anything.
For example, this will trigger a lookup:
include puppet::server::foreman
But this won't:
class { 'puppet::server::foreman':
katello => true, # or false - doesn't matter
}
For us that typically means you need to: include puppet
, make sure both puppet::server
and puppet::server_foreman
are true.
We will need a change to the bats tests to handle the new and old way of enabling puppet: https://github.com/theforeman/forklift/blob/master/bats/fb-test-puppet.bats#L22 |
theforeman/forklift#1649 should be that. |
@ehelms could you take a look again? |
Related PRs: