-
Notifications
You must be signed in to change notification settings - Fork 269
Add parameter to enable iop-advisor-engine to rh_cloud plugin #1204
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,5 +1,16 @@ | ||||||||||||||||||||
# Installs rh_cloud plugin | ||||||||||||||||||||
class foreman::plugin::rh_cloud { | ||||||||||||||||||||
# @summary Installs rh_cloud plugin | ||||||||||||||||||||
# | ||||||||||||||||||||
# @param enable_iop_advisor_engine | ||||||||||||||||||||
# Enable iop-advisor-engine integration | ||||||||||||||||||||
# | ||||||||||||||||||||
class foreman::plugin::rh_cloud ( | ||||||||||||||||||||
Boolean $enable_iop_advisor_engine = false, | ||||||||||||||||||||
) { | ||||||||||||||||||||
foreman::plugin { 'rh_cloud': | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. theforeman/foreman_rh_cloud#932 introduces settings. IMHO this should create a
Suggested change
I'm not 100% sure on the use of symbols vs strings though. That could break. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
😡 Why are we using symbols again? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because it makes life interesting? I wonder if we should enhance https://github.com/theforeman/foreman/blob/9e5da95e3194f37b71f013794835fd1d0f9a4a30/config/settings.rb#L40 to symbolize keys. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe… but I am not shooting at that can of worms today. |
||||||||||||||||||||
config => epp('foreman/rh_cloud.yaml.epp', { 'enable_iop_advisor_engine' => $enable_iop_advisor_engine }), | ||||||||||||||||||||
} | ||||||||||||||||||||
|
||||||||||||||||||||
class { 'iop_advisor_engine': | ||||||||||||||||||||
ensure => bool2str($enable_iop_advisor_engine, 'present', 'absent'), | ||||||||||||||||||||
} | ||||||||||||||||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,16 @@ | |
it_behaves_like 'an idempotent resource' do | ||
let(:manifest) do | ||
<<-PUPPET | ||
# iop_advisor_engine requires foreman-proxy certs to talk back to Foreman | ||
# TODO: redesign the deployment in a way that it better aligns with our architecture | ||
file { '/etc/foreman-proxy': | ||
ensure => directory, | ||
} | ||
|
||
group { 'foreman-proxy': | ||
ensure => present, | ||
} | ||
Comment on lines
+11
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need a foreman-proxy in puppet-foreman? That feels like a horrible violation of principles where Foreman should never read files from foreman-proxy. Is this because of certs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yepp, advisor-engine uses the proxy cert to auth against Foreman, and that lives in /etc/foreman-proxy (and gets read from there into a podman secret). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I already mentioned before that I feel advisor engine belongs closer to a Smart Proxy because that's where all our external integration lives. We really need to figure out external services in a consistent way, especially if we expect more services to be added. Perhaps our Smart Proxy model isn't scalable, but I've made a mental note we need to discuss this. For now a note above it in the acceptance test is a "good enough" to allow us to proceed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, we're abusing a bit of the SP architecture, even tho I still think it's not actually a SP thing (e.g. you can't have multiple of it, which breaks the SP paradigm). I'll add a note to the test, yes. |
||
|
||
include foreman | ||
include foreman::plugin::rh_cloud | ||
PUPPET | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<%- | | ||
Boolean $enable_iop_advisor_engine, | ||
| -%> | ||
--- | ||
:foreman_rh_cloud: | ||
:use_local_advisor_engine: <%= $enable_iop_advisor_engine %> |
Uh oh!
There was an error while loading. Please reload this page.