Skip to content

Commit 7c27c94

Browse files
committed
drop dynflow_core support
it's gone since smart_proxy_dynflow 0.4.0
1 parent 372b724 commit 7c27c94

File tree

8 files changed

+13
-217
lines changed

8 files changed

+13
-217
lines changed

manifests/plugin/ansible.pp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,4 @@
8383
enabled => $enabled,
8484
listen_on => $listen_on,
8585
}
86-
87-
if $foreman_proxy::plugin::dynflow::external_core {
88-
Foreman_proxy::Settings_file['ansible'] ~> Service['smart_proxy_dynflow_core']
89-
}
9086
}

manifests/plugin/dynflow.pp

Lines changed: 9 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -14,75 +14,42 @@
1414
#
1515
# $listen_on:: Proxy feature listens on https, http, or both
1616
#
17-
# $core_listen:: Address to listen on for the dynflow core service
18-
#
19-
# $core_port:: Port to use for the local dynflow core service
20-
#
2117
# $ssl_disabled_ciphers:: Disable SSL ciphers. For example: ['NULL-MD5', 'NULL-SHA']
2218
#
2319
# $tls_disabled_versions:: Disable TLS versions. Version 1.0 is always disabled. For example: ['1.1']
2420
#
2521
# $open_file_limit:: Limit number of open files - Only Red Hat Operating Systems with Software Collections.
26-
#
27-
# $external_core:: Forces usage of external/internal Dynflow core
2822
class foreman_proxy::plugin::dynflow (
2923
Boolean $enabled = $foreman_proxy::plugin::dynflow::params::enabled,
3024
Foreman_proxy::ListenOn $listen_on = $foreman_proxy::plugin::dynflow::params::listen_on,
3125
Optional[Stdlib::Absolutepath] $database_path = $foreman_proxy::plugin::dynflow::params::database_path,
3226
Boolean $console_auth = $foreman_proxy::plugin::dynflow::params::console_auth,
33-
String $core_listen = $foreman_proxy::plugin::dynflow::params::core_listen,
34-
Integer[0, 65535] $core_port = $foreman_proxy::plugin::dynflow::params::core_port,
3527
Optional[Array[String]] $ssl_disabled_ciphers = $foreman_proxy::plugin::dynflow::params::ssl_disabled_ciphers,
3628
Optional[Array[String]] $tls_disabled_versions = $foreman_proxy::plugin::dynflow::params::tls_disabled_versions,
3729
Integer[1] $open_file_limit = $foreman_proxy::plugin::dynflow::params::open_file_limit,
38-
Boolean $external_core = $foreman_proxy::plugin::dynflow::params::external_core,
3930
) inherits foreman_proxy::plugin::dynflow::params {
40-
if $foreman_proxy::ssl {
41-
$core_url = "https://${facts['networking']['fqdn']}:${core_port}"
42-
} else {
43-
$core_url = "http://${facts['networking']['fqdn']}:${core_port}"
44-
}
45-
4631
foreman_proxy::plugin::module { 'dynflow':
4732
enabled => $enabled,
4833
listen_on => $listen_on,
4934
}
5035

51-
if $external_core {
52-
$service = 'smart_proxy_dynflow_core'
53-
54-
file { '/etc/smart_proxy_dynflow_core/settings.yml':
55-
ensure => file,
56-
content => template('foreman_proxy/plugin/dynflow_core.yml.erb'),
57-
require => Foreman_proxy::Plugin['dynflow_core'],
58-
notify => Service[$service],
59-
}
60-
61-
file { '/etc/smart_proxy_dynflow_core/settings.d':
62-
ensure => link,
63-
target => "${foreman_proxy::config_dir}/settings.d",
64-
require => Foreman_proxy::Plugin['dynflow_core'],
65-
notify => Service[$service],
66-
}
67-
} else {
68-
$service = 'foreman-proxy'
36+
file { '/etc/smart_proxy_dynflow_core/settings.yml':
37+
ensure => absent,
6938
}
70-
71-
foreman_proxy::plugin { 'dynflow_core':
72-
notify => Service[$service],
39+
-> file { '/etc/smart_proxy_dynflow_core/settings.d':
40+
ensure => absent,
41+
}
42+
-> foreman_proxy::plugin { 'dynflow_core':
43+
version => absent,
7344
}
7445

46+
$service = 'foreman-proxy'
47+
7548
systemd::service_limits { "${service}.service":
7649
limits => {
7750
'LimitNOFILE' => $open_file_limit,
7851
},
7952
restart_service => false,
80-
require => Foreman_proxy::Plugin['dynflow_core'],
8153
notify => Service[$service],
8254
}
83-
84-
service { 'smart_proxy_dynflow_core':
85-
ensure => $external_core,
86-
enable => $external_core,
87-
}
8855
}

manifests/plugin/dynflow/params.pp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
# use in-memory sqlite by default for performance reasons
77
$database_path = undef
88
$console_auth = true
9-
$core_listen = '*'
10-
$core_port = 8008
119
$ssl_disabled_ciphers = undef
1210
$tls_disabled_versions = undef
1311
$open_file_limit = 1000000
14-
$external_core = false
1512
}

manifests/plugin/remote_execution/ssh.pp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,4 @@
9090
}
9191
}
9292
}
93-
94-
if $foreman_proxy::plugin::dynflow::external_core {
95-
if $ssh_kerberos_auth {
96-
Package[$kerberos_pkg] ~> Service['smart_proxy_dynflow_core']
97-
}
98-
Foreman_proxy::Settings_file['remote_execution_ssh'] ~> Service['smart_proxy_dynflow_core']
99-
}
10093
}

spec/acceptance/dynflow_spec.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,4 @@
66
include_examples 'the example', 'dynflow.pp'
77

88
it_behaves_like 'the default foreman proxy application'
9-
10-
describe service('smart_proxy_dynflow_core') do
11-
it { is_expected.not_to be_enabled }
12-
it { is_expected.not_to be_running }
13-
end
14-
15-
describe port(8008) do
16-
it { is_expected.not_to be_listening }
17-
end
189
end

spec/classes/foreman_proxy__plugin__dynflow_spec.rb

Lines changed: 2 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,14 @@
1616
'---',
1717
':enabled: https',
1818
':database: ',
19-
':core_url: https://foo.example.com:8008',
20-
':external_core: false',
19+
':console_auth: true',
2120
]
2221
verify_exact_contents(catalogue,
2322
"#{etc_dir}/foreman-proxy/settings.d/dynflow.yml",
2423
lines)
2524
end
2625

27-
it { should contain_foreman_proxy__plugin('dynflow_core') }
28-
it { should contain_service('smart_proxy_dynflow_core').
29-
with(ensure: false, enable: false) }
3026
it { should contain_systemd__service_limits('foreman-proxy.service') }
31-
32-
it { should_not contain_file("#{etc_dir}/smart_proxy_dynflow_core/settings.d") }
33-
it { should_not contain_file("#{etc_dir}/smart_proxy_dynflow_core/settings.yml") }
34-
it { should_not contain_systemd__service_limits('smart_proxy_dynflow_core.service') }
3527
end
3628

3729
describe 'with custom settings' do
@@ -40,69 +32,17 @@
4032
:ssl_disabled_ciphers => ['NULL-MD5', 'NULL-SHA'],
4133
:tls_disabled_versions => ['1.1'],
4234
:open_file_limit => 8000,
43-
:external_core => true,
4435
} end
4536

4637
it { should compile.with_all_deps }
4738
it { should contain_foreman_proxy__plugin__module('dynflow') }
4839

49-
it 'should create settings.d symlink' do
50-
should contain_file("#{etc_dir}/smart_proxy_dynflow_core/settings.d").
51-
with_ensure('link').with_target("#{etc_dir}/foreman-proxy/settings.d")
52-
end
53-
54-
it 'should create systemd service limits' do
55-
should contain_systemd__service_limits('smart_proxy_dynflow_core.service').
56-
with_limits({'LimitNOFILE' => 8000}).that_notifies('Service[smart_proxy_dynflow_core]')
57-
end
58-
59-
it 'should generate correct dynflow core settings.yml' do
60-
verify_exact_contents(catalogue, "#{etc_dir}/smart_proxy_dynflow_core/settings.yml", [
61-
'---',
62-
':database: /var/lib/foreman-proxy/dynflow/dynflow.sqlite',
63-
':console_auth: true',
64-
':foreman_url: https://foo.example.com',
65-
':listen: "*"',
66-
':port: 8008',
67-
':use_https: true',
68-
':ssl_ca_file: /etc/puppetlabs/puppet/ssl/certs/ca.pem',
69-
':ssl_certificate: /etc/puppetlabs/puppet/ssl/certs/foo.example.com.pem',
70-
':ssl_private_key: /etc/puppetlabs/puppet/ssl/private_keys/foo.example.com.pem',
71-
':ssl_disabled_ciphers: ["NULL-MD5", "NULL-SHA"]',
72-
':tls_disabled_versions: ["1.1"]',
73-
])
74-
end
75-
7640
it 'should generate correct dynflow.yml' do
7741
verify_exact_contents(catalogue, "#{etc_dir}/foreman-proxy/settings.d/dynflow.yml", [
7842
'---',
7943
':enabled: https',
8044
':database: /var/lib/foreman-proxy/dynflow/dynflow.sqlite',
81-
':core_url: https://foo.example.com:8008',
82-
':external_core: true',
83-
])
84-
end
85-
end
86-
87-
describe 'without external_core' do
88-
let(:params) { { external_core: false } }
89-
90-
it { should contain_foreman_proxy__plugin('dynflow_core') }
91-
it { should contain_service('smart_proxy_dynflow_core').
92-
with(ensure: false, enable: false) }
93-
it { should contain_systemd__service_limits('foreman-proxy.service') }
94-
95-
it { should_not contain_file("#{etc_dir}/smart_proxy_dynflow_core/settings.d") }
96-
it { should_not contain_file("#{etc_dir}/smart_proxy_dynflow_core/settings.yml") }
97-
it { should_not contain_systemd__service_limits('smart_proxy_dynflow_core.service') }
98-
99-
it 'should generate correct dynflow.yml' do
100-
verify_exact_contents(catalogue, "#{etc_dir}/foreman-proxy/settings.d/dynflow.yml", [
101-
'---',
102-
':enabled: https',
103-
':database: ',
104-
':core_url: https://foo.example.com:8008',
105-
':external_core: false',
45+
':console_auth: true',
10646
])
10747
end
10848
end

templates/plugin/dynflow.yml.erb

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
---
22
:enabled: <%= @module_enabled %>
33
:database: <%= scope.lookupvar('::foreman_proxy::plugin::dynflow::database_path') %>
4-
:core_url: <%= scope.lookupvar('::foreman_proxy::plugin::dynflow::core_url') %>
54

6-
# If true, external core will be used even if the core gem is available
7-
# If false, the feature will be disabled if the core gem is unavailable
8-
# If unset, the process will fallback to autodetection, using external core if the core gem is unavailable
9-
<% external_core = scope.lookupvar('::foreman_proxy::plugin::dynflow::external_core') -%>
10-
<% if [nil, :undefined, :undef].include?(external_core) -%>
11-
# :external_core: true
12-
<% else -%>
13-
:external_core: <%= external_core %>
14-
<% end -%>
5+
# Require a valid cert to access Dynflow console
6+
:console_auth: <%= scope.lookupvar('::foreman_proxy::plugin::dynflow::console_auth') %>

templates/plugin/dynflow_core.yml.erb

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

0 commit comments

Comments
 (0)