foreman_maintain 1.0.9 → 1.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/definitions/features/installer.rb +3 -1
- data/definitions/features/puppet_server.rb +0 -2
- data/definitions/procedures/foreman/apipie_cache.rb +1 -1
- data/definitions/procedures/installer/run_for_6_11.rb +52 -0
- data/definitions/scenarios/puppet.rb +3 -0
- data/definitions/scenarios/self_upgrade.rb +12 -2
- data/definitions/scenarios/upgrade_to_satellite_6_11.rb +1 -1
- data/lib/foreman_maintain/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40bec791581fb8e2670586e331afd5e89ba1ca436b38d95e848837fc8ce1fdd3
|
4
|
+
data.tar.gz: 54f35bb8139e221173ca57786c93e36559957116577907fa936d0ff3f4256858
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e00f5941e44f62e5fa09d47924fa231af050cf32ae555a775bdb247753c0b38d1a2b3c554e86d3699287f1a4367a461f780be6fca5c897031feffbf07de9f53
|
7
|
+
data.tar.gz: 80447d1b43a06edcdd7d9846637c4f484f8bd454e9bdda303355223f64671fa276e37e1c0c8bf50aff1c6213ed30d23028c850b31e1e9f3463b1660994109902
|
@@ -64,7 +64,9 @@ class Features::Installer < ForemanMaintain::Feature
|
|
64
64
|
def config_files
|
65
65
|
Dir.glob(File.join(config_directory, '**/*')) +
|
66
66
|
[
|
67
|
-
'/usr/local/bin/validate_postgresql_connection.sh'
|
67
|
+
'/usr/local/bin/validate_postgresql_connection.sh',
|
68
|
+
'/opt/puppetlabs/puppet/cache/foreman_cache_data',
|
69
|
+
'/opt/puppetlabs/puppet/cache/pulpcore_cache_data'
|
68
70
|
]
|
69
71
|
end
|
70
72
|
|
@@ -11,8 +11,6 @@ class Features::PuppetServer < ForemanMaintain::Feature
|
|
11
11
|
[
|
12
12
|
'/etc/puppet',
|
13
13
|
'/etc/puppetlabs',
|
14
|
-
'/opt/puppetlabs/puppet/cache/foreman_cache_data',
|
15
|
-
'/var/lib/puppet/foreman_cache_data',
|
16
14
|
'/opt/puppetlabs/puppet/ssl/',
|
17
15
|
'/var/lib/puppet/ssl',
|
18
16
|
'/var/lib/puppet',
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module Procedures::Installer
|
2
|
+
class RunFor6_11 < ForemanMaintain::Procedure
|
3
|
+
metadata do
|
4
|
+
description 'Run installer with Candlepin SSL CA'\
|
5
|
+
' when using external database with SSL'
|
6
|
+
param :assumeyes, 'Do not ask for confirmation'
|
7
|
+
manual_detection
|
8
|
+
end
|
9
|
+
|
10
|
+
def run
|
11
|
+
if extdb_and_ssl?
|
12
|
+
run_installer_with_extra_option
|
13
|
+
else
|
14
|
+
run_installer
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def ext_db?
|
19
|
+
!feature(:foreman_database).local?
|
20
|
+
end
|
21
|
+
|
22
|
+
def installer_answers
|
23
|
+
@installer_answers ||= feature(:installer).answers
|
24
|
+
end
|
25
|
+
|
26
|
+
def server_db_with_ssl?
|
27
|
+
installer_answers.fetch('katello')['candlepin_db_ssl']
|
28
|
+
end
|
29
|
+
|
30
|
+
def extdb_and_ssl?
|
31
|
+
ext_db? && server_db_with_ssl?
|
32
|
+
end
|
33
|
+
|
34
|
+
def run_installer_with_extra_option
|
35
|
+
ssl_ca_path = installer_answers.fetch('foreman')['db_root_cert']
|
36
|
+
spinner_msg = "Running installer with --katello-candlepin-db-ssl-ca #{ssl_ca_path} argument!"
|
37
|
+
with_spinner(spinner_msg) do
|
38
|
+
installer_args = feature(:installer).installer_arguments
|
39
|
+
new_ssl_arg = " --katello-candlepin-db-ssl-ca #{ssl_ca_path}"
|
40
|
+
installer_args << new_ssl_arg
|
41
|
+
feature(:installer).run(installer_args)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def run_installer
|
46
|
+
with_spinner('Executing installer') do
|
47
|
+
assumeyes_val = @assumeyes.nil? ? assumeyes? : @assumeyes
|
48
|
+
feature(:installer).upgrade(:interactive => !assumeyes_val)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -15,6 +15,9 @@ module ForemanMaintain::Scenarios
|
|
15
15
|
add_step(Procedures::Puppet::RemovePuppet)
|
16
16
|
add_step(Procedures::Puppet::RemovePuppetData) if context.get(:remove_data)
|
17
17
|
add_step(Procedures::Service::Restart)
|
18
|
+
if server?
|
19
|
+
add_step(Procedures::Foreman::ApipieCache)
|
20
|
+
end
|
18
21
|
end
|
19
22
|
end
|
20
23
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
module ForemanMaintain::Scenarios
|
2
2
|
class SelfUpgradeBase < ForemanMaintain::Scenario
|
3
|
+
include ForemanMaintain::Concerns::Downstream
|
3
4
|
def enabled_system_repos_id
|
4
5
|
repository_manager.enabled_repos.keys
|
5
6
|
end
|
@@ -67,7 +68,10 @@ module ForemanMaintain::Scenarios
|
|
67
68
|
|
68
69
|
def repos_ids_to_reenable
|
69
70
|
repos_ids_to_reenable = stored_enabled_repos_ids - all_maintenance_repos
|
70
|
-
|
71
|
+
if use_rhsm?
|
72
|
+
repos_ids_to_reenable << maintenance_repo(maintenance_repo_version)
|
73
|
+
end
|
74
|
+
repos_ids_to_reenable
|
71
75
|
end
|
72
76
|
|
73
77
|
def use_rhsm?
|
@@ -79,6 +83,10 @@ module ForemanMaintain::Scenarios
|
|
79
83
|
|
80
84
|
true
|
81
85
|
end
|
86
|
+
|
87
|
+
def req_repos_to_update_pkgs
|
88
|
+
main_rh_repos + [maintenance_repo_id(target_version)]
|
89
|
+
end
|
82
90
|
end
|
83
91
|
|
84
92
|
class SelfUpgrade < SelfUpgradeBase
|
@@ -94,9 +102,10 @@ module ForemanMaintain::Scenarios
|
|
94
102
|
pkgs_to_update = %w[satellite-maintain rubygem-foreman_maintain]
|
95
103
|
add_step(Procedures::Repositories::BackupEnabledRepos.new)
|
96
104
|
disable_repos
|
97
|
-
add_step(Procedures::Repositories::Enable.new(repos:
|
105
|
+
add_step(Procedures::Repositories::Enable.new(repos: req_repos_to_update_pkgs,
|
98
106
|
use_rhsm: use_rhsm?))
|
99
107
|
add_step(Procedures::Packages::Update.new(packages: pkgs_to_update, assumeyes: true))
|
108
|
+
disable_repos('*')
|
100
109
|
enable_repos(repos_ids_to_reenable)
|
101
110
|
end
|
102
111
|
end
|
@@ -113,6 +122,7 @@ module ForemanMaintain::Scenarios
|
|
113
122
|
|
114
123
|
def compose
|
115
124
|
if check_min_version('foreman', '2.5') || check_min_version('foreman-proxy', '2.5')
|
125
|
+
disable_repos('*')
|
116
126
|
enable_repos(repos_ids_to_reenable)
|
117
127
|
end
|
118
128
|
end
|
@@ -61,7 +61,7 @@ module Scenarios::Satellite_6_11
|
|
61
61
|
add_step(Procedures::Repositories::Setup.new(:version => '6.11'))
|
62
62
|
add_step(Procedures::Packages::UnlockVersions.new)
|
63
63
|
add_step(Procedures::Packages::Update.new(:assumeyes => true))
|
64
|
-
add_step_with_context(Procedures::Installer::
|
64
|
+
add_step_with_context(Procedures::Installer::RunFor6_11)
|
65
65
|
add_step(Procedures::Installer::UpgradeRakeTask)
|
66
66
|
end
|
67
67
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_maintain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Nečas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|
@@ -266,6 +266,7 @@ files:
|
|
266
266
|
- definitions/procedures/foreman_tasks/ui_investigate.rb
|
267
267
|
- definitions/procedures/hammer_setup.rb
|
268
268
|
- definitions/procedures/installer/run.rb
|
269
|
+
- definitions/procedures/installer/run_for_6_11.rb
|
269
270
|
- definitions/procedures/installer/upgrade.rb
|
270
271
|
- definitions/procedures/installer/upgrade_rake_task.rb
|
271
272
|
- definitions/procedures/knowledge_base_article.rb
|