Skip to content

Commit

Permalink
Add postgresql-evr extension to katello
Browse files Browse the repository at this point in the history
  • Loading branch information
ianballou committed Apr 20, 2020
1 parent 7a047d4 commit 412c9e9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
8 changes: 8 additions & 0 deletions manifests/application.pp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
$candlepin_event_queue = $katello::params::candlepin_event_queue
$crane_url = $katello::params::crane_url
$crane_ca_cert = $certs::katello_server_ca_cert
$postgresql_evr_package = $katello::params::postgresql_evr_package
$manage_db = $foreman::db_manage

# Katello database seeding needs candlepin
Anchor <| title == 'katello::repo' or title == 'katello::candlepin' |> ->
Expand All @@ -72,6 +74,12 @@
config_file => "${foreman::plugin_config_dir}/katello.yaml",
}

if $manage_db {
package { $postgresql_evr_package:
ensure => installed,
}
}

foreman::config::apache::fragment { 'katello':
ssl_content => file('katello/katello-apache-ssl.conf'),
}
Expand Down
6 changes: 6 additions & 0 deletions manifests/globals.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,10 @@

$candlepin_qpid_exchange = 'event'
$candlepin_event_queue = 'katello_event_queue'

if $facts['os']['release']['major'] == '7' {
$postgresql_evr_package = 'rh-postgresql12-postgresql-evr'
} else {
$postgresql_evr_package = 'postgresql-evr'
}
}
5 changes: 4 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@
# The oauth key for Candlepin
# @param candlepin_oauth_secret
# The oauth secret for Candlepin
# @param postgresql_evr_package
# The contextual package name for the PostgreSQL EVR extension
class katello::params (
Stdlib::HTTPSUrl $pulp_url = "https://${facts['networking']['fqdn']}/pulp/api/v2/",
Stdlib::HTTPSUrl $crane_url = "https://${facts['networking']['fqdn']}:5000",
Stdlib::Host $qpid_hostname = 'localhost',
String[1] $candlepin_oauth_key = $katello::globals::candlepin_oauth_key,
String[1] $candlepin_oauth_secret = $katello::globals::candlepin_oauth_secret,
Stdlib::Host $candlepin_host = 'localhost',
Stdlib::HTTPSUrl $candlepin_url = "https://${candlepin_host}:8443/candlepin"
Stdlib::HTTPSUrl $candlepin_url = "https://${candlepin_host}:8443/candlepin",
String[1] $postgresql_evr_package = $katello::globals::postgresql_evr_package,
) inherits katello::globals {
}
1 change: 1 addition & 0 deletions spec/classes/application_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class { 'katello::params':
it { is_expected.to compile.with_all_deps }
it { is_expected.to create_package('tfm-rubygem-katello') }
it { is_expected.not_to create_package('tfm-rubygem-katello').that_requires('Anchor[katello::candlepin]') }
it { is_expected.to create_package('rh-postgresql12-postgresql-evr') }
it { is_expected.to contain_class('certs::qpid') }
it { is_expected.to contain_class('katello::qpid_client') }

Expand Down

0 comments on commit 412c9e9

Please sign in to comment.