-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs #8175 - configure dispatch router on capsule
- Loading branch information
Showing
5 changed files
with
106 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# == Class: capsule::dispatch_router | ||
# | ||
# Install and configure Qpid Dispatch Router | ||
# | ||
class capsule::dispatch_router ( | ||
) { | ||
|
||
class { 'qpid::router': } | ||
|
||
# SSL Certificate Configuration | ||
class { 'certs::qpid_router': | ||
require => Package['qpid-dispatch-router'], | ||
} ~> | ||
qpid::router::ssl_profile { 'client': | ||
ca => $certs::ca_cert, | ||
cert => $certs::qpid_router::client_cert, | ||
key => $certs::qpid_router::client_key, | ||
} ~> | ||
qpid::router::ssl_profile { 'server': | ||
ca => $certs::ca_cert, | ||
cert => $certs::qpid_router::server_cert, | ||
key => $certs::qpid_router::server_key, | ||
} | ||
|
||
# Listen for katello-agent clients | ||
qpid::router::listener { 'clients': | ||
addr => $capsule::qpid_router_agent_addr, | ||
port => $capsule::qpid_router_agent_port, | ||
ssl_profile => 'server', | ||
} | ||
|
||
# Act as hub if pulp master, otherwise connect to hub | ||
if $capsule::pulp_master { | ||
qpid::router::listener {'hub': | ||
addr => $capsule::qpid_router_hub_addr, | ||
port => $capsule::qpid_router_hub_port, | ||
role => 'inter-router', | ||
ssl_profile => 'server', | ||
} | ||
|
||
# Connect dispatch router to the local qpid | ||
qpid::router::connector { 'broker': | ||
addr => $capsule::qpid_router_broker_addr, | ||
port => $capsule::qpid_router_broker_port, | ||
ssl_profile => 'client', | ||
role => 'on-demand', | ||
} | ||
|
||
qpid::router::link_route_pattern { 'broker-queue': | ||
prefix => 'queue.', | ||
connector => 'broker', | ||
} | ||
} else { | ||
qpid::router::connector { 'hub': | ||
addr => $capsule::parent_fqdn, | ||
port => $capsule::qpid_router_hub_port, | ||
ssl_profile => 'client', | ||
role => 'inter-router', | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters