Skip to content

Commit 380bef5

Browse files
committed
Drop Pulp 2 as puppet-katello handles deploying for main server
1 parent a034f34 commit 380bef5

File tree

6 files changed

+9
-185
lines changed

6 files changed

+9
-185
lines changed

manifests/broker.pp

Lines changed: 0 additions & 22 deletions
This file was deleted.

manifests/init.pp

Lines changed: 9 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,6 @@
1010
#
1111
# $puppet:: Enable puppet
1212
#
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-
#
3113
# $reverse_proxy:: Add reverse proxy to the parent
3214
#
3315
# $reverse_proxy_port:: Reverse proxy listening port
@@ -62,12 +44,6 @@
6244
#
6345
# $qpid_router_sasl_password:: SASL password to be used from router to broker
6446
#
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-
#
7147
# $pulpcore_manage_postgresql:: Manage the Pulpcore PostgreSQL database.
7248
#
7349
# $pulpcore_postgresql_host:: Host of the Pulpcore PostgreSQL database. Must be specified if external/unmanaged.
@@ -97,16 +73,6 @@
9773
#
9874
class foreman_proxy_content (
9975
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,
11076

11177
Boolean $puppet = true,
11278

@@ -129,8 +95,6 @@
12995
Optional[String] $qpid_router_sasl_username = 'katello_agent',
13096
Optional[String] $qpid_router_sasl_password = $foreman_proxy_content::params::qpid_router_sasl_password,
13197

132-
Boolean $manage_broker = true,
133-
13498
Boolean $pulpcore_manage_postgresql = true,
13599
Stdlib::Host $pulpcore_postgresql_host = 'localhost',
136100
Stdlib::Port $pulpcore_postgresql_port = 5432,
@@ -148,17 +112,15 @@
148112
include foreman_proxy
149113
include foreman_proxy::plugin::pulp
150114

151-
$pulp_master = $foreman_proxy::plugin::pulp::enabled
152-
$pulp = $foreman_proxy::plugin::pulp::pulpnode_enabled
153115
$pulpcore_mirror = $foreman_proxy::plugin::pulp::pulpcore_mirror
154116
$pulpcore = $foreman_proxy::plugin::pulp::pulpcore_enabled
155117

156118
$foreman_proxy_fqdn = $facts['networking']['fqdn']
157119
$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
159121

160122
# 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
162124

163125
$rhsm_port = $reverse_proxy_real ? {
164126
true => $reverse_proxy_port,
@@ -205,7 +167,13 @@
205167
}
206168
contain foreman_proxy_content::dispatch_router
207169

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 {
209177
class { 'foreman_proxy_content::dispatch_router::hub':
210178
hub_addr => $qpid_router_hub_addr,
211179
hub_port => $qpid_router_hub_port,
@@ -216,61 +184,8 @@
216184
sasl_password => $qpid_router_sasl_password,
217185
}
218186
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
225187
}
226188
}
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-
}
274189
}
275190

276191
if $pulpcore_mirror {
@@ -296,16 +211,6 @@
296211
$apache_https_ca = undef
297212
$apache_https_chain = undef
298213
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']
309214
} else {
310215
include certs::apache
311216
Class['certs::apache'] ~> Class['pulpcore::apache']

manifests/params.pp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# when not specified, we expect all in one installation
44
$parent_fqdn = $facts['networking']['fqdn']
55

6-
$pulp_admin_password = extlib::cache_data('foreman_cache_data', 'pulp_node_admin_password', extlib::random_password(32))
7-
86
$qpid_router_sasl_password = extlib::cache_data('foreman_cache_data', 'qpid_router_sasl_password', extlib::random_password(16))
97

108
$pulpcore_postgresql_password = extlib::cache_data('pulpcore_cache_data', 'db_password', extlib::random_password(32))

manifests/pub_dir.pp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,6 @@
2323
content => template('foreman_proxy_content/httpd_pub.erb'),
2424
ssl_content => template('foreman_proxy_content/httpd_pub.erb'),
2525
}
26-
} elsif $foreman_proxy_content::pulp {
27-
pulp::apache::fragment { 'pub_dir':
28-
ssl_content => template('foreman_proxy_content/httpd_pub.erb'),
29-
}
30-
31-
file { "${apache::confd_dir}/pulp-vhosts80/pub_dir.conf":
32-
ensure => file,
33-
content => template('foreman_proxy_content/httpd_pub.erb'),
34-
owner => 'apache',
35-
group => 'apache',
36-
mode => '0600',
37-
notify => Service['httpd'],
38-
}
3926
} else {
4027
apache::vhost { 'foreman_proxy_content':
4128
servername => $servername,

spec/classes/foreman_proxy_content__broker_spec.rb

Lines changed: 0 additions & 13 deletions
This file was deleted.

spec/classes/foreman_proxy_content_spec.rb

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -22,37 +22,6 @@ class { 'foreman_proxy::plugin::pulp':
2222
it { is_expected.to contain_class('foreman_proxy_content::pub_dir') }
2323
end
2424

25-
context 'with pulp', if: facts[:operatingsystemmajrelease] == '7' do
26-
let(:params) do
27-
{
28-
qpid_router: false
29-
}
30-
end
31-
32-
let(:pre_condition) do
33-
<<-PUPPET
34-
include foreman_proxy
35-
class { 'foreman_proxy::plugin::pulp':
36-
enabled => false,
37-
pulpnode_enabled => true,
38-
pulpcore_enabled => false,
39-
}
40-
PUPPET
41-
end
42-
43-
it { is_expected.to compile.with_all_deps }
44-
it { is_expected.to contain_class('pulp').with(manage_squid: true) }
45-
it { is_expected.not_to contain_class('foreman_proxy_content::dispatch_router') }
46-
it { is_expected.to contain_class('pulpcore') }
47-
it { is_expected.to contain_class('foreman_proxy_content::pub_dir') }
48-
49-
it do
50-
is_expected.to contain_class('foreman_proxy_content::reverse_proxy')
51-
.with(path: '/')
52-
.with(port: 8443)
53-
end
54-
end
55-
5625
context 'with pulpcore' do
5726
let(:params) do
5827
{

0 commit comments

Comments
 (0)