Project

General

Profile

« Previous | Next » 

Revision 37540211

Added by Eric Helms over 10 years ago

Updates to become a parameterized class and reduce the dependencies
this module has to only the certs module.

Previously, this module for deploying Candlepin was tightly coupled
to a few different modules including the Katello module. This work
attempts to invert the relationship by parameterizing the Candlepin
class. This will allow a module like the Katello module to set certain
parameters that it would like Candlepin to use during configuration.
The only module left as a dependence is the certs module that creates
and sets up a keystore for tomcat via https.

View differences:

templates/etc/candlepin/candlepin.conf.erb
jpa.config.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
jpa.config.hibernate.connection.driver_class=org.postgresql.Driver
jpa.config.hibernate.connection.url=jdbc:postgresql:<%= scope.lookupvar("candlepin::params::db_name") %>
jpa.config.hibernate.connection.url=jdbc:postgresql:<%= scope.lookupvar("candlepin::db_name") %>
jpa.config.hibernate.hbm2ddl.auto=validate
jpa.config.hibernate.connection.username=<%= scope.lookupvar("candlepin::params::db_user") %>
jpa.config.hibernate.connection.username=<%= scope.lookupvar("candlepin::db_user") %>
<% Puppet::Parser::Functions::function('katello_passencrypt') %>
jpa.config.hibernate.connection.password=<%= scope.function_katello_passencrypt([scope.lookupvar("candlepin::params::db_pass")]) %>
jpa.config.hibernate.connection.password=<%= scope.function_katello_passencrypt([scope.lookupvar("candlepin::db_pass")]) %>
candlepin.consumer_system_name_pattern = .+
candlepin.environment_content_filtering=<%= scope.lookupvar("candlepin::params::env_filtering_enabled") %>
candlepin.environment_content_filtering=<%= scope.lookupvar("candlepin::env_filtering_enabled") %>
candlepin.auth.basic.enable = false
candlepin.auth.trusted.enable = false
candlepin.enable_cert_v3=true
candlepin.export.prefix.weburl=<%= scope.lookupvar("candlepin::params::weburl") %>
candlepin.export.prefix.apiurl=<%= scope.lookupvar("candlepin::params::apiurl") %>
<% if scope.lookupvar("candlepin::params::katello_oauth_key") != "" -%>
candlepin.export.prefix.weburl=<%= scope.lookupvar("candlepin::weburl") %>
candlepin.export.prefix.apiurl=<%= scope.lookupvar("candlepin::apiurl") %>
<% if scope.lookupvar("candlepin::oauth_key") != "" -%>
module.config.katello=org.candlepin.katello.KatelloModule
candlepin.auth.oauth.enable = true
candlepin.auth.oauth.consumer.<%= scope.lookupvar("candlepin::params::katello_oauth_key") %>.secret = <%= scope.lookupvar("candlepin::params::katello_oauth_secret") %>
candlepin.crl.file = <%= scope.lookupvar("candlepin::params::crl_file") %>
candlepin.auth.oauth.consumer.<%= scope.lookupvar("candlepin::oauth_key") %>.secret = <%= scope.lookupvar("candlepin::oauth_secret") %>
candlepin.crl.file = <%= scope.lookupvar("candlepin::crl_file") %>
<%- end -%>
<% if scope.lookupvar("candlepin::params::thumbslug_oauth_key") != "" -%>
candlepin.auth.oauth.consumer.thumbslug.secret = <%= scope.lookupvar("candlepin::params::thumbslug_oauth_secret") %>
<% if scope.lookupvar("candlepin::thumbslug_enabled") -%>
candlepin.auth.oauth.consumer.thumbslug.secret = <%= scope.lookupvar("candlepin::thumbslug_oauth_secret") %>
<%- end -%>

Also available in: Unified diff