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 f6dda3e commit 5e52329
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 @@ -21,6 +21,7 @@
Boolean $use_pulp_2_for_file = false,
Boolean $use_pulp_2_for_docker = false,
Stdlib::Absolutepath $repo_export_dir = '/var/lib/pulp/katello-export',
Stdlib::Host $candlepin_host = 'localhost',
) {
include foreman
include certs
Expand Down Expand Up @@ -59,7 +60,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 All @@ -187,6 +191,7 @@
use_pulp_2_for_file => $use_pulp_2_for_file,
use_pulp_2_for_docker => $use_pulp_2_for_docker,
repo_export_dir => $repo_export_dir,
candlepin_host => $candlepin_host,
}

class { 'katello::pulp':
Expand Down
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 5e52329

Please sign in to comment.