Skip to content
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

[WIP] Fixes #20852 - Refactor module #136

Closed
wants to merge 6 commits into from
Closed

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Aug 22, 2017

This is not ready for review at all and only meant for me to run the forklift pipeline with it.

@ekohl ekohl changed the title [WIP] Refactor module [WIP] Fixes #20852 - Refactor module Sep 5, 2017
@timogoebel
Copy link
Member

@ekohl: I know that is is not meant for a review. But I revied it anyways. This looks already pretty good to me and I'd love to have this as a base for further improvement. What do you think is missing here?

@ekohl
Copy link
Member Author

ekohl commented Oct 8, 2017

@timogoebel I don't recall if this current iteration actually worked. Other than that I want to rename the parent_fqdn parameter. It will be a breaking change but in this patch it should be qdrouter_hostname or similar I think.

@timogoebel
Copy link
Member

@ekohl: Maybe we can extract that change first to make this less complex. I'm working on a PR to separate the upstreams for qpid and the reverse proxy. I'll send that over in a bit. I'd like if this PR would be just refactoring without changing anything.

@ekohl
Copy link
Member Author

ekohl commented Oct 8, 2017

@timogoebel that's always a good idea.

@ekohl
Copy link
Member Author

ekohl commented Oct 17, 2017

@timogoebel rebased. It's not split into a bit more separate commits. I still feel like the pulp refactoring could be split up further for easier review but I think the first commits can be merged already.

@ekohl ekohl force-pushed the refactor branch 3 times, most recently from 7528bf0 to 6e2beea Compare February 15, 2018 13:10

$pulp = $::foreman_proxy::plugin::pulp::pulpnode_enabled
$pulp_node = $::foreman_proxy::plugin::pulp::pulpnode_enabled
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We really should replace the node nomenclature.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, but what should be the correct name?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reached out to pulp-dev list to look for commonly accepted nomenclature. The best I could arrive at is 'parent' and 'child' from the responses I got.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given in how many places this naming is currently used, I'm leaning to keeping that outside of this refactor.

String $broker_host = $::foreman_proxy_content::qpid_router_broker_addr,
Integer[0, 65535] $broker_port = $::foreman_proxy_content::qpid_router_broker_port,
) {
if $qpid_router {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be it's own manifest? Pulp does not actually talk to the router and you may choose to deploy the router separately from your Pulp host or even your qpid host. That is, you could have Pulp server, Qpid server and Qdrouter running all separately or router and qpid paired.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're right.

ca_cert => $::certs::ca_cert,
data_dir => '/var/lib/pulp/published/docker/v2/app',
subscribe => Class['certs::apache'],
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can run on a Smart proxy as well serving up docker content off the Pulp server there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's why I added enable_crane there.

# The pulp node configuration
#
# In this scenario we assume there is another pulp instance somewhere and this
# talks to a qpid router somewhere.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is technically speaking incorrect. This connection diagram may help with wrapping your brain around all the connection points.

The dispatch router serves as a public interface for services that need to talk to qpid. Generally speaking thats only clients talking to dispatch router which then talks to either Qpid directly (on a server) or talks to another dispatch router (on a smart proxy). Currently Pulp talks directly to qpid over localhost. If we worked on a spread deployment and split out qpid we'd need to consider having Pulp talk to the router but for current setups it does not.

owner => 'root',
group => 'root',
mode => '0644',
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block can be dropped from sight including the template.


include ::certs::apache
include ::certs::qpid_client
class { '::pulp':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth considering centralizing Pulp install and configuration in one place at this juncture? I don't want to over complicate this large re-factor but as we've pointed out in the past we setup Pulp here and in puppet-katello.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered moving it all into puppet-katello, but you're right we have overlap. We should at least centralize pulp in one place.

ekohl added 6 commits August 3, 2018 13:12
Since all notifies are handled inside the class, they don't have to be
duplicated outside of the class. We also default to the correct
variables so no need to explicitly initialize.
Since certs::katello now inherits from certs, this require is no longer
needed.
While it looks like it's no longer possible to override the proxy
hostname on the cert, this can now be done through the certs module.
@ekohl
Copy link
Member Author

ekohl commented Dec 12, 2019

Closing this now but will pick this up via other PRs.

@ekohl ekohl closed this Dec 12, 2019
@ekohl ekohl deleted the refactor branch August 4, 2022 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants