refs #7779 - Updating to add support for pulp crane #1
Conversation
port => 5000, | ||
priority => '03', | ||
ssl => true, | ||
ssl_cert => $crane::params::cert, |
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.
This means they're hardcoded. I'd at least set it to $crane::cert
, but also strongly consider adding them as class parameters:
class crane::apache (
$cert = $crane::cert,
$key = $crane::key,
$ca = $crane::ca,
) {
The benefit is that you can easily test this class without including the crane class and still pass in various parameters. That helps with performance. It can also help you when you use templates because they're already in scope and there's no need for the clunky scope.lookup
function.
Ideally this would include a use_ssl param and setup a vhost for SSL only if that was specified. However, I'd be OK with sticking to SSL only for now but would encourage removing the direct dependency on Certs and just allow passing in the cert files. This will make this module simpler and more re-usable. |
@ehelms that sounds like a very good idea and could easily be done by defaulting to |
54cb6e3
to
488c2a9
Compare
|
||
6. Ensure commit message begins with 'Fixes #<redmine_issue_number>' | ||
|
||
5. Push to your fork andaa submit a pull request. |
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.
s/andaa/and/
488c2a9
to
a0781ba
Compare
|
||
##Limitations | ||
|
||
* EL6 (RHEL6 / CentOS 6) |
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.
Should probably add EL7 here as well.
An admin should enable travis integration so the tests are actually executed btw. |
|
||
) inherits crane::params { | ||
|
||
Class['certs'] ~> |
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.
I think you can get rid of this dependency now that you've reworked the certs and expecting them to be handed to Crane.
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.
Also, one thing you could potential do is use the validators (https://github.com/puppetlabs/puppetlabs-stdlib -- search for validate) to ensure the certs are passed in
a9addef
to
3b58306
Compare
class crane ( | ||
$key = $crane::key, | ||
$cert = $crane::cert, | ||
$ca_cert = $crane::ca_cert, |
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.
Sorry I didn't catch this the first time! Conventionally these should be pointing at the params
@key = $crane::params::key,
@cert = $crane::params::cert,
@ca_cert = $crane::params::ca_cert,
3b58306
to
22486bc
Compare
APT |
👍 looks good to me. |
refs #7779 - Updating to add support for pulp crane
This is the initial PR to add the puppet-crane module.
This module does a simple config of the Pulp Crane application.