Skip to content

Commit d194d62

Browse files
committed
Remove configs related to katello -> artemis connection
1 parent 6a2ada3 commit d194d62

12 files changed

Lines changed: 8 additions & 275 deletions

File tree

examples/basic_candlepin.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,4 @@
5858
truststore_password => $truststore_password,
5959
java_package => 'java-17-openjdk',
6060
java_home => '/usr/lib/jvm/jre-17',
61-
artemis_client_dn => Deferred('pick', ['', 'CN=ActiveMQ Artemis Deferred, OU=Artemis, O=ActiveMQ, L=AMQ, ST=AMQ, C=AMQ']),
6261
}

files/tomcat/cert-roles.properties

Lines changed: 0 additions & 1 deletion
This file was deleted.

files/tomcat/jaas.conf

Lines changed: 0 additions & 1 deletion
This file was deleted.

files/tomcat/login.config

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

manifests/artemis.pp

Lines changed: 6 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,60 +4,23 @@
44
class candlepin::artemis {
55
assert_private()
66

7-
$broker_context = {
8-
'module_name' => $module_name,
9-
'artemis_host' => $candlepin::artemis_host,
10-
'artemis_port' => $candlepin::artemis_port,
11-
'keystore_file' => $candlepin::keystore_file,
12-
'keystore_password' => $candlepin::_keystore_password,
13-
'truststore_file' => $candlepin::truststore_file,
14-
'truststore_password' => $candlepin::_truststore_password,
15-
}
16-
17-
file { $candlepin::broker_config_file:
18-
ensure => file,
19-
content => epp('candlepin/broker.xml.epp', $broker_context),
20-
mode => '0640',
21-
owner => $candlepin::user,
22-
group => $candlepin::group,
7+
file { '/etc/candlepin/broker.xml':
8+
ensure => absent,
239
}
2410

2511
file { "${candlepin::tomcat_conf}/login.config":
26-
ensure => file,
27-
content => file('candlepin/tomcat/login.config'),
28-
mode => '0640',
29-
owner => $candlepin::user,
30-
group => $candlepin::group,
12+
ensure => absent,
3113
}
3214

3315
file { "${candlepin::tomcat_conf}/cert-users.properties":
34-
ensure => file,
35-
content => Deferred('inline_epp', ["katelloUser=<%= \$artemis_client_dn %>\n", { 'artemis_client_dn' => $candlepin::artemis_client_dn }]),
36-
mode => '0640',
37-
owner => $candlepin::user,
38-
group => $candlepin::group,
16+
ensure => absent,
3917
}
4018

4119
file { "${candlepin::tomcat_conf}/cert-roles.properties":
42-
ensure => file,
43-
content => file('candlepin/tomcat/cert-roles.properties'),
44-
mode => '0640',
45-
owner => $candlepin::user,
46-
group => $candlepin::group,
20+
ensure => absent,
4721
}
4822

4923
file { "${candlepin::tomcat_conf}/conf.d/jaas.conf":
50-
ensure => file,
51-
content => file('candlepin/tomcat/jaas.conf'),
52-
mode => '0640',
53-
owner => $candlepin::user,
54-
group => $candlepin::group,
55-
}
56-
57-
if $facts['os']['selinux']['enabled'] {
58-
selboolean { 'candlepin_can_bind_activemq_port':
59-
value => 'on',
60-
persistent => true,
61-
}
24+
ensure => absent,
6225
}
6326
}

manifests/config.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
$candlepin_context = {
1818
'module_name' => $module_name,
1919
'adapter_module' => $candlepin::adapter_module,
20-
'broker_config_file' => $candlepin::broker_config_file,
2120
'ca_cert' => $candlepin::ca_cert,
2221
'ca_key' => $candlepin::ca_key,
2322
'ca_key_password' => $candlepin::_ca_key_password,

manifests/init.pp

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@
6767
# Keystore type
6868
#
6969
# @param truststore_file
70-
# Truststore file to use for Tomcat and Artemis
70+
# Truststore file to use for Tomcat
7171
#
7272
# @param truststore_password
73-
# Password for truststore being used with Tomcat and Artemis
73+
# Password for truststore being used with Tomcat
7474
#
7575
# @param ca_key
7676
# CA key file to use
@@ -149,18 +149,6 @@
149149
# @param expired_pools_schedule
150150
# Quartz schedule notation for how often to run the ExpiredPoolsJob
151151
#
152-
# @param artemis_port
153-
# Port to expose Artemis on
154-
#
155-
# @param artemis_host
156-
# Host address to have Artemis listen on; defaults to localhost
157-
#
158-
# @param artemis_client_dn
159-
# Full DN for the client certificate used to talk to Artemis
160-
#
161-
# @param broker_config_file
162-
# Config file for Artemis
163-
#
164152
# @param user
165153
# User under which Candlepin will run
166154
#
@@ -230,10 +218,6 @@
230218
Boolean $security_manager = false,
231219
Optional[Integer[0]] $shutdown_wait = undef,
232220
String $expired_pools_schedule = '0 0 0 * * ?',
233-
Stdlib::Host $artemis_host = 'localhost',
234-
Stdlib::Port $artemis_port = 61613,
235-
Variant[Deferred, String] $artemis_client_dn = 'CN=ActiveMQ Artemis Client, OU=Artemis, O=ActiveMQ, L=AMQ, ST=AMQ, C=AMQ',
236-
Stdlib::Absolutepath $broker_config_file = '/etc/candlepin/broker.xml',
237221
String $user = 'tomcat',
238222
String $group = 'tomcat',
239223
Boolean $disable_fips = true,

spec/acceptance/basic_candlepin_spec.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
require 'spec_helper_acceptance'
22

3-
#TODO: Add Artemis listening test https://projects.theforeman.org/issues/29561
4-
53
describe 'candlepin works' do
64
include_examples 'the example', 'basic_candlepin.pp'
75

@@ -28,12 +26,4 @@
2826
# Test that the least cipher strength is "strong" or "A"
2927
its(:stdout) { should match(/least strength: (A|strong)/) }
3028
end
31-
32-
describe file("/etc/tomcat/cert-users.properties") do
33-
it { should be_file }
34-
it { should be_mode 640 }
35-
it { should be_owned_by 'tomcat' }
36-
it { should be_grouped_into 'tomcat' }
37-
its(:content) { should eq("katelloUser=CN=ActiveMQ Artemis Deferred, OU=Artemis, O=ActiveMQ, L=AMQ, ST=AMQ, C=AMQ\n") }
38-
end
3929
end

spec/classes/candlepin_spec.rb

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
'candlepin.ca_key=/etc/candlepin/certs/candlepin-ca.key',
3535
'candlepin.ca_cert=/etc/candlepin/certs/candlepin-ca.crt',
3636
'candlepin.async.jobs.ExpiredPoolsCleanupJob.schedule=0 0 0 * * ?',
37-
'candlepin.audit.hornetq.config_path=/etc/candlepin/broker.xml',
3837
'candlepin.db.database_manage_on_startup=Manage',
3938
])
4039
end
@@ -52,19 +51,6 @@
5251
])
5352
end
5453

55-
it { is_expected.to contain_file('/etc/tomcat/login.config') }
56-
it { is_expected.to contain_file('/etc/tomcat/cert-roles.properties') }
57-
it { is_expected.to contain_file('/etc/tomcat/conf.d/jaas.conf') }
58-
it do
59-
is_expected.to contain_file('/etc/tomcat/cert-users.properties').
60-
with_content("katelloUser=CN=ActiveMQ Artemis Client, OU=Artemis, O=ActiveMQ, L=AMQ, ST=AMQ, C=AMQ\n")
61-
end
62-
63-
it do
64-
is_expected.to contain_file('/etc/candlepin/broker.xml').
65-
with_content(/^ <acceptor name="stomp">tcp:\/\/localhost:61613\?protocols=STOMP;useEpoll=false;sslEnabled=true;trustStorePath=\/etc\/candlepin\/certs\/truststore;trustStorePassword=;keyStorePath=\/etc\/candlepin\/certs\/keystore;keyStorePassword=;needClientAuth=true<\/acceptor>/)
66-
end
67-
6854
# database
6955
it { is_expected.not_to contain_class('candlepin::database::mysql') }
7056
it { is_expected.to contain_class('candlepin::database::postgresql') }
@@ -122,11 +108,6 @@
122108
is_expected.to contain_concat_fragment('General Config').
123109
with_content(sensitive(/^candlepin.ca_key_password=MY_CA_KEY_PASSWORD$/))
124110
end
125-
it do
126-
is_expected.to contain_file('/etc/candlepin/broker.xml').
127-
with_content(sensitive(/;keyStorePassword=MY_KEYSTORE_PASSWORD;/)).
128-
with_content(sensitive(/;trustStorePassword=MY_TRUSTSTORE_PASSWORD;/))
129-
end
130111
it do
131112
is_expected.to contain_file('/etc/tomcat/server.xml').
132113
with_content(sensitive(/^ *keystorePass="MY_KEYSTORE_PASSWORD"$/))
@@ -230,7 +211,6 @@
230211
let(:facts) { override_facts(super(), os: {selinux: {enabled: true}}) }
231212

232213
it { is_expected.to compile.with_all_deps }
233-
it { is_expected.to contain_selboolean('candlepin_can_bind_activemq_port').that_requires('Package[candlepin-selinux]') }
234214

235215
if facts[:os]['release']['major'] == '8'
236216
it { is_expected.to contain_package('candlepin-selinux').that_requires('Package[pki-core]') }
@@ -241,7 +221,6 @@
241221
let(:facts) { override_facts(super(), os: {selinux: {enabled: false}}) }
242222

243223
it { is_expected.to compile.with_all_deps }
244-
it { is_expected.not_to contain_selboolean('candlepin_can_bind_activemq_port') }
245224
it { is_expected.not_to contain_package('candlepin-selinux') }
246225
end
247226
end

spec/setup_acceptance_node.pp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,6 @@
2222
ensure => installed,
2323
require => Yumrepo['candlepin'],
2424
}
25-
26-
# Workaround for https://github.com/theforeman/puppet-candlepin/issues/185#issuecomment-822284497
27-
$tomcat_conf_files = [
28-
'/etc/tomcat/login.config',
29-
'/etc/tomcat/cert-users.properties',
30-
'/etc/tomcat/cert-roles.properties',
31-
'/etc/tomcat/conf.d/jaas.conf'
32-
]
33-
file { $tomcat_conf_files:
34-
ensure => file,
35-
require => Package['candlepin-selinux'],
36-
}
3725
}
3826

3927
# Used to test which TLS versions are enabled

0 commit comments

Comments
 (0)