|
10 | 10 | # |
11 | 11 | # $puppet:: Enable puppet |
12 | 12 | # |
13 | | -# $pulp_admin_password:: Password for the Pulp admin user. It should be left blank so that a random password is generated |
14 | | -# |
15 | | -# $pulp_max_speed:: The maximum download speed per second for a Pulp task, such as a sync. (e.g. "4 Kb" (Uses SI KB), 4MB, or 1GB" ) |
16 | | -# |
17 | | -# $pulp_num_workers:: Number of Pulp workers to use. |
18 | | -# |
19 | | -# $pulp_proxy_port:: Port of the http proxy server |
20 | | -# |
21 | | -# $pulp_proxy_url:: URL of the http proxy server |
22 | | -# |
23 | | -# $pulp_proxy_username:: Proxy username for authentication |
24 | | -# |
25 | | -# $pulp_proxy_password:: Proxy password for authentication |
26 | | -# |
27 | | -# $pulp_puppet_wsgi_processes:: Number of WSGI processes to spawn for the puppet webapp |
28 | | -# |
29 | | -# $pulp_ca_cert:: Absolute path to PEM encoded CA certificate file, used by Pulp to validate the identity of the broker using SSL. |
30 | | -# |
31 | 13 | # $reverse_proxy:: Add reverse proxy to the parent |
32 | 14 | # |
33 | 15 | # $reverse_proxy_port:: Reverse proxy listening port |
|
62 | 44 | # |
63 | 45 | # $qpid_router_sasl_password:: SASL password to be used from router to broker |
64 | 46 | # |
65 | | -# $manage_broker:: Manage the qpid message broker when applicable |
66 | | -# |
67 | | -# $pulp_worker_timeout:: The amount of time (in seconds) before considering a worker as missing. If Pulp's |
68 | | -# mongo database has slow I/O, then setting a higher number may resolve issues where workers are |
69 | | -# going missing incorrectly. |
70 | | -# |
71 | 47 | # $pulpcore_manage_postgresql:: Manage the Pulpcore PostgreSQL database. |
72 | 48 | # |
73 | 49 | # $pulpcore_postgresql_host:: Host of the Pulpcore PostgreSQL database. Must be specified if external/unmanaged. |
|
97 | 73 | # |
98 | 74 | class foreman_proxy_content ( |
99 | 75 | String[1] $parent_fqdn = $foreman_proxy_content::params::parent_fqdn, |
100 | | - String $pulp_admin_password = $foreman_proxy_content::params::pulp_admin_password, |
101 | | - Optional[String] $pulp_max_speed = undef, |
102 | | - Optional[Integer[1]] $pulp_num_workers = undef, |
103 | | - Optional[String] $pulp_proxy_password = undef, |
104 | | - Optional[Stdlib::Port] $pulp_proxy_port = undef, |
105 | | - Optional[String] $pulp_proxy_url = undef, |
106 | | - Optional[String] $pulp_proxy_username = undef, |
107 | | - Integer[1] $pulp_puppet_wsgi_processes = 1, |
108 | | - Optional[Stdlib::Absolutepath] $pulp_ca_cert = undef, |
109 | | - Integer[0] $pulp_worker_timeout = 60, |
110 | 76 |
|
111 | 77 | Boolean $puppet = true, |
112 | 78 |
|
|
129 | 95 | Optional[String] $qpid_router_sasl_username = 'katello_agent', |
130 | 96 | Optional[String] $qpid_router_sasl_password = $foreman_proxy_content::params::qpid_router_sasl_password, |
131 | 97 |
|
132 | | - Boolean $manage_broker = true, |
133 | | - |
134 | 98 | Boolean $pulpcore_manage_postgresql = true, |
135 | 99 | Stdlib::Host $pulpcore_postgresql_host = 'localhost', |
136 | 100 | Stdlib::Port $pulpcore_postgresql_port = 5432, |
|
148 | 112 | include foreman_proxy |
149 | 113 | include foreman_proxy::plugin::pulp |
150 | 114 |
|
151 | | - $pulp_master = $foreman_proxy::plugin::pulp::enabled |
152 | | - $pulp = $foreman_proxy::plugin::pulp::pulpnode_enabled |
153 | 115 | $pulpcore_mirror = $foreman_proxy::plugin::pulp::pulpcore_mirror |
154 | 116 | $pulpcore = $foreman_proxy::plugin::pulp::pulpcore_enabled |
155 | 117 |
|
156 | 118 | $foreman_proxy_fqdn = $facts['networking']['fqdn'] |
157 | 119 | $foreman_url = $foreman_proxy::foreman_base_url |
158 | | - $reverse_proxy_real = ($pulp or $pulpcore_mirror) or $reverse_proxy |
| 120 | + $reverse_proxy_real = $pulpcore_mirror or $reverse_proxy |
159 | 121 |
|
160 | 122 | # TODO: doesn't allow deploying a Pulp non-mirror without Foreman |
161 | | - $shared_with_foreman_vhost = ($pulpcore and !$pulpcore_mirror) or $pulp_master |
| 123 | + $shared_with_foreman_vhost = $pulpcore and !$pulpcore_mirror |
162 | 124 |
|
163 | 125 | $rhsm_port = $reverse_proxy_real ? { |
164 | 126 | true => $reverse_proxy_port, |
|
205 | 167 | } |
206 | 168 | contain foreman_proxy_content::dispatch_router |
207 | 169 |
|
208 | | - if $pulp_master { |
| 170 | + if $pulpcore_mirror { |
| 171 | + class { 'foreman_proxy_content::dispatch_router::connector': |
| 172 | + host => $parent_fqdn, |
| 173 | + port => $qpid_router_hub_port, |
| 174 | + } |
| 175 | + contain foreman_proxy_content::dispatch_router::connector |
| 176 | + } else { |
209 | 177 | class { 'foreman_proxy_content::dispatch_router::hub': |
210 | 178 | hub_addr => $qpid_router_hub_addr, |
211 | 179 | hub_port => $qpid_router_hub_port, |
|
216 | 184 | sasl_password => $qpid_router_sasl_password, |
217 | 185 | } |
218 | 186 | contain foreman_proxy_content::dispatch_router::hub |
219 | | - } else { |
220 | | - class { 'foreman_proxy_content::dispatch_router::connector': |
221 | | - host => $parent_fqdn, |
222 | | - port => $qpid_router_hub_port, |
223 | | - } |
224 | | - contain foreman_proxy_content::dispatch_router::connector |
225 | 187 | } |
226 | 188 | } |
227 | | - |
228 | | - include apache |
229 | | - |
230 | | - if $manage_broker { |
231 | | - include foreman_proxy_content::broker |
232 | | - } |
233 | | - |
234 | | - class { 'certs::qpid_client': |
235 | | - require => Class['pulp::install'], |
236 | | - notify => Class['pulp::service'], |
237 | | - } |
238 | | - |
239 | | - include certs::apache |
240 | | - |
241 | | - class { 'pulp': |
242 | | - enable_ostree => false, |
243 | | - enable_rpm => false, |
244 | | - enable_iso => false, |
245 | | - enable_deb => false, |
246 | | - enable_puppet => false, |
247 | | - enable_docker => false, |
248 | | - default_password => $pulp_admin_password, |
249 | | - messaging_transport => 'qpid', |
250 | | - messaging_auth_enabled => false, |
251 | | - messaging_ca_cert => pick($pulp_ca_cert, $certs::qpid_client::qpid_client_ca_cert), |
252 | | - messaging_client_cert => $certs::qpid_client::qpid_client_cert, |
253 | | - messaging_url => "ssl://${qpid_router_broker_addr}:${qpid_router_broker_port}", |
254 | | - broker_url => "qpid://${qpid_router_broker_addr}:${qpid_router_broker_port}", |
255 | | - broker_use_ssl => true, |
256 | | - manage_broker => false, |
257 | | - manage_httpd => true, |
258 | | - manage_plugins_httpd => true, |
259 | | - manage_squid => true, |
260 | | - puppet_wsgi_processes => $pulp_puppet_wsgi_processes, |
261 | | - num_workers => $pulp_num_workers, |
262 | | - repo_auth => true, |
263 | | - https_cert => $certs::apache::apache_cert, |
264 | | - https_key => $certs::apache::apache_key, |
265 | | - https_chain => $certs::apache::apache_ca_cert, |
266 | | - https_ca_cert => $certs::ca_cert, |
267 | | - yum_max_speed => $pulp_max_speed, |
268 | | - proxy_port => $pulp_proxy_port, |
269 | | - proxy_url => $pulp_proxy_url, |
270 | | - proxy_username => $pulp_proxy_username, |
271 | | - proxy_password => $pulp_proxy_password, |
272 | | - worker_timeout => $pulp_worker_timeout, |
273 | | - } |
274 | 189 | } |
275 | 190 |
|
276 | 191 | if $pulpcore_mirror { |
|
296 | 211 | $apache_https_ca = undef |
297 | 212 | $apache_https_chain = undef |
298 | 213 | Class['foreman::config::apache'] -> Class['pulpcore::apache'] |
299 | | - } elsif $pulp and $pulp::manage_httpd { |
300 | | - $servername = $facts['networking']['fqdn'] |
301 | | - $priority = '05' |
302 | | - $apache_http_vhost = 'pulp-http' |
303 | | - $apache_https_vhost = 'pulp-https' |
304 | | - $apache_https_cert = undef |
305 | | - $apache_https_key = undef |
306 | | - $apache_https_ca = undef |
307 | | - $apache_https_chain = undef |
308 | | - Class['pulp::apache'] -> Class['pulpcore::apache'] |
309 | 214 | } else { |
310 | 215 | include certs::apache |
311 | 216 | Class['certs::apache'] ~> Class['pulpcore::apache'] |
|
0 commit comments