Skip to content

Commit

Permalink
Refs #28922: Communicate via localhost to Candlepin
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms committed Feb 26, 2020
1 parent decf125 commit bc26a74
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
3 changes: 2 additions & 1 deletion manifests/application.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
Optional[Enum['SSLv23', 'TLSv1', '']] $cdn_ssl_version = undef,
Boolean $use_pulp_2_for_file = false,
Boolean $use_pulp_2_for_docker = false,
Stdlib::Host $candlepin_host = 'localhost',
) {
include foreman
include certs
Expand Down Expand Up @@ -55,7 +56,7 @@
$enable_deb = $katello::params::enable_deb
$pulp_url = $katello::params::pulp_url
$pulp_ca_cert = $certs::katello_server_ca_cert # TODO: certs::apache::...
$candlepin_url = $katello::params::candlepin_url
$candlepin_url = "https://${candlepin_host}:8443/candlepin"
$candlepin_oauth_key = $katello::params::candlepin_oauth_key
$candlepin_oauth_secret = $katello::params::candlepin_oauth_secret
$candlepin_ca_cert = $certs::ca_cert
Expand Down
9 changes: 8 additions & 1 deletion manifests/candlepin.pp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @summary Install and configure candlepin
#
# @param host
# The host Candlepin's Tomcat should run on
# @param db_host
# The database host
# @param db_port
Expand All @@ -18,6 +20,7 @@
# @param manage_db
# Whether to manage the database. Set this to false when using a remote database
class katello::candlepin (
Stdlib::Host $host = 'localhost',
Stdlib::Host $db_host = 'localhost',
Optional[Stdlib::Port] $db_port = undef,
String $db_name = 'candlepin',
Expand All @@ -28,11 +31,15 @@
Boolean $manage_db = true,
) {
include certs
include certs::candlepin
include katello::params

class { 'certs::candlepin':
hostname => $host,
}

Anchor <| title == 'katello::qpid::event_queue' |> ->
class { 'candlepin':
host => $host,
user_groups => $certs::candlepin::group,
oauth_key => $katello::params::candlepin_oauth_key,
oauth_secret => $katello::params::candlepin_oauth_secret,
Expand Down
5 changes: 5 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
#
# $qpid_hostname:: Hostname used to connect to qpidd.
#
# $candlepin_host:: Host for Candlepin
#
# $candlepin_db_host:: Host with Candlepin DB
#
# $candlepin_db_port:: Port accepting connections to Candlepin DB
Expand Down Expand Up @@ -122,6 +124,7 @@

Stdlib::Absolutepath $repo_export_dir = '/var/lib/pulp/katello-export',

Stdlib::Host $candlepin_host = 'localhost',
String $candlepin_db_host = 'localhost',
Optional[Stdlib::Port] $candlepin_db_port = undef,
String $candlepin_db_name = 'candlepin',
Expand Down Expand Up @@ -166,6 +169,7 @@
}

class { 'katello::candlepin':
host => $candlepin_host,
db_host => $candlepin_db_host,
db_port => $candlepin_db_port,
db_name => $candlepin_db_name,
Expand Down Expand Up @@ -206,6 +210,7 @@
cdn_ssl_version => $cdn_ssl_version,
use_pulp_2_for_file => $use_pulp_2_for_file,
use_pulp_2_for_docker => $use_pulp_2_for_docker,
candlepin_host => $candlepin_host,
}

}
3 changes: 0 additions & 3 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
# This is a reversed model compared to the "regular" globals, but the
# parameters on globals are reserved for the foreman-installer
#
# @param candlepin_url
# The URL to connect to Candlepin
# @param pulp_url
# The URL to connect to Pulp
# @param crane_url
Expand All @@ -21,7 +19,6 @@
# @param candlepin_oauth_secret
# The oauth secret for Candlepin
class katello::params (
Stdlib::Httpsurl $candlepin_url = "https://${facts['fqdn']}:8443/candlepin",
Stdlib::Httpsurl $pulp_url = "https://${facts['fqdn']}/pulp/api/v2/",
Stdlib::Httpsurl $crane_url = "https://${facts['fqdn']}:5000",
Stdlib::Host $qpid_hostname = 'localhost',
Expand Down

0 comments on commit bc26a74

Please sign in to comment.