Skip to content

Commit

Permalink
qpidd: hostname for config cmds
Browse files Browse the repository at this point in the history
  • Loading branch information
timogoebel committed Sep 24, 2017
1 parent 6c88e13 commit 6fc92a8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
#
# $qpid_wcache_page_size:: The size (in KB) of the pages in the write page cache
#
# $qpid_interface:: The interface qpidd listens to.
#
# $qpid_hostname:: Hostname used to connect to qpidd.
#
# $package_names:: Packages that this module ensures are present instead of the default
#
# $manage_repo:: Whether to manage the yum repository
Expand Down Expand Up @@ -79,6 +83,8 @@

String $post_sync_token = $::katello::params::post_sync_token,
Integer[0, 1000] $qpid_wcache_page_size = $::katello::params::qpid_wcache_page_size,
Optional[String] $qpid_interface = $::katello::params::qpid_interface,
Optional[String] $qpid_hostname = $::katello::params::qpid_hostname,
Integer[1] $num_pulp_workers = $::katello::params::num_pulp_workers,
Optional[Integer] $max_tasks_per_pulp_worker = $::katello::params::max_tasks_per_pulp_worker,
Optional[Stdlib::HTTPUrl] $proxy_url = $::katello::params::proxy_url,
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
$reset_data = 'NONE'

$qpid_hostname = 'localhost'
$qpid_interface = 'lo'
$qpid_url = "amqp:ssl:${qpid_hostname}:5671"
$candlepin_event_queue = 'katello_event_queue'
$candlepin_qpid_exchange = 'event'
Expand Down
6 changes: 5 additions & 1 deletion manifests/qpid.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
String $candlepin_event_queue = $::katello::candlepin_event_queue,
String $candlepin_qpid_exchange = $::katello::candlepin_qpid_exchange,
Integer[0, 5000] $wcache_page_size = $::katello::qpid_wcache_page_size,
String $interface = 'lo',
String $interface = $::katello::qpid_interface,
Optional[String] $hostname = $::katello::qpid_hostname,
) {
include ::certs
include ::certs::qpid
Expand All @@ -28,16 +29,19 @@
onlyif => "list binding | grep ${candlepin_event_queue} | grep '*.*'",
ssl_cert => $::certs::qpid::client_cert,
ssl_key => $::certs::qpid::client_key,
hostname => $hostname,
} ->
qpid::config::queue { $candlepin_event_queue:
ssl_cert => $::certs::qpid::client_cert,
ssl_key => $::certs::qpid::client_key,
hostname => $hostname,
}

qpid::config::bind { ['entitlement.created', 'entitlement.deleted', 'pool.created', 'pool.deleted', 'compliance.created']:
queue => $candlepin_event_queue,
exchange => $candlepin_qpid_exchange,
ssl_cert => $::certs::qpid::client_cert,
ssl_key => $::certs::qpid::client_key,
hostname => $hostname,
}
}
1 change: 1 addition & 0 deletions spec/classes/katello_qpid_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
:candlepin_qpid_exchange => 'event',
:wcache_page_size => 8,
:interface => 'eth0',
:hostname => 'localhost',
}
end

Expand Down

0 comments on commit 6fc92a8

Please sign in to comment.