foreman_maintain 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1b6168d49244a6f59fd0500867fa753c55545cbb299af9c4572ca814d072927
4
- data.tar.gz: d5bf3284f717958e4fd3dec1adea6b7f71a67fa854c23457915aeb0417017604
3
+ metadata.gz: cdc12ecbef4e02dd8b77b3c4888623c13e418b7435a53f8dc1d280b9faf0b699
4
+ data.tar.gz: 4d75194cf9184f68be21cbc55cba1def43d76eff4cfc1bc92a091b93662c3371
5
5
  SHA512:
6
- metadata.gz: 6d735d3febc81e314bcbe0dc8649536f34998f72aa2b1851c4d568fd90b38cb46dac41dd1ce24d9845c8135abecf90742d0ff9aef6afc03188362420dc1df936
7
- data.tar.gz: 4975f14be4a458950c88c3eb3b3edc0fccdd988e134a913c6fb5e7e2dcfdb29dd43ae11dcd5978673d5c0d468c3155a3cd91254d1caed89789038404b034805e
6
+ metadata.gz: 26f3e34a2670e7b92ddeb1db1107446fb71ded2d1cbe5b79afa259a3a13a5d87e8d45a63f7ba235fa485099689c30eee366bd7bace95d52db7f28cb0dcad5d35
7
+ data.tar.gz: 217124b53d7294d7d4be7c6be9a1a7e6fb43e58190c30abdcbcb9e48daf0e0e3164ca9e5b617e3c08add2a83d722dac7f5dd91f8163b400008ac748f8e32d56d
@@ -0,0 +1,92 @@
1
+ module Scenarios::Capsule_6_13
2
+ class Abstract < ForemanMaintain::Scenario
3
+ def self.upgrade_metadata(&block)
4
+ metadata do
5
+ tags :upgrade_scenario
6
+ confine do
7
+ feature(:capsule) &&
8
+ (feature(:capsule).current_minor_version == '6.12' || \
9
+ ForemanMaintain.upgrade_in_progress == '6.13')
10
+ end
11
+ instance_eval(&block)
12
+ end
13
+ end
14
+
15
+ def target_version
16
+ '6.13'
17
+ end
18
+ end
19
+
20
+ class PreUpgradeCheck < Abstract
21
+ upgrade_metadata do
22
+ description 'Checks before upgrading to Capsule 6.13'
23
+ tags :pre_upgrade_checks
24
+ run_strategy :fail_slow
25
+ end
26
+
27
+ def compose
28
+ add_steps(find_checks(:default))
29
+ add_steps(find_checks(:pre_upgrade))
30
+ add_step(Checks::Foreman::CheckpointSegments)
31
+ add_step(Checks::Repositories::Validate.new(:version => '6.13'))
32
+ end
33
+ end
34
+
35
+ class PreMigrations < Abstract
36
+ upgrade_metadata do
37
+ description 'Procedures before migrating to Capsule 6.13'
38
+ tags :pre_migrations
39
+ end
40
+
41
+ def compose
42
+ add_steps(find_procedures(:pre_migrations))
43
+ add_step(Procedures::Service::Stop.new)
44
+ end
45
+ end
46
+
47
+ class Migrations < Abstract
48
+ upgrade_metadata do
49
+ description 'Migration scripts to Capsule 6.13'
50
+ tags :migrations
51
+ end
52
+
53
+ def set_context_mapping
54
+ context.map(:assumeyes, Procedures::Installer::Upgrade => :assumeyes)
55
+ end
56
+
57
+ def compose
58
+ add_step(Procedures::Repositories::Setup.new(:version => '6.13'))
59
+ modules_to_enable = ["satellite-capsule:#{el_short_name}"]
60
+ add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
61
+ add_step(Procedures::Packages::UnlockVersions.new)
62
+ add_step(Procedures::Packages::Update.new(:assumeyes => true))
63
+ add_step_with_context(Procedures::Installer::Upgrade)
64
+ end
65
+ end
66
+
67
+ class PostMigrations < Abstract
68
+ upgrade_metadata do
69
+ description 'Procedures after migrating to Capsule 6.13'
70
+ tags :post_migrations
71
+ end
72
+
73
+ def compose
74
+ add_step(Procedures::RefreshFeatures)
75
+ add_step(Procedures::Service::Start.new)
76
+ add_steps(find_procedures(:post_migrations))
77
+ end
78
+ end
79
+
80
+ class PostUpgradeChecks < Abstract
81
+ upgrade_metadata do
82
+ description 'Checks after upgrading to Capsule 6.13'
83
+ tags :post_upgrade_checks
84
+ run_strategy :fail_slow
85
+ end
86
+
87
+ def compose
88
+ add_steps(find_checks(:default))
89
+ add_steps(find_checks(:post_upgrade))
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,92 @@
1
+ module Scenarios::Capsule_6_13_z
2
+ class Abstract < ForemanMaintain::Scenario
3
+ def self.upgrade_metadata(&block)
4
+ metadata do
5
+ tags :upgrade_scenario
6
+ confine do
7
+ feature(:capsule) &&
8
+ (feature(:capsule).current_minor_version == '6.13' || \
9
+ ForemanMaintain.upgrade_in_progress == '6.13.z')
10
+ end
11
+ instance_eval(&block)
12
+ end
13
+ end
14
+
15
+ def target_version
16
+ '6.13.z'
17
+ end
18
+ end
19
+
20
+ class PreUpgradeCheck < Abstract
21
+ upgrade_metadata do
22
+ description 'Checks before upgrading to Capsule 6.13.z'
23
+ tags :pre_upgrade_checks
24
+ run_strategy :fail_slow
25
+ end
26
+
27
+ def compose
28
+ add_steps(find_checks(:default))
29
+ add_steps(find_checks(:pre_upgrade))
30
+ add_step(Checks::Foreman::CheckpointSegments)
31
+ add_step(Checks::Repositories::Validate.new(:version => '6.13'))
32
+ end
33
+ end
34
+
35
+ class PreMigrations < Abstract
36
+ upgrade_metadata do
37
+ description 'Procedures before migrating to Capsule 6.13.z'
38
+ tags :pre_migrations
39
+ end
40
+
41
+ def compose
42
+ add_steps(find_procedures(:pre_migrations))
43
+ add_step(Procedures::Service::Stop.new)
44
+ end
45
+ end
46
+
47
+ class Migrations < Abstract
48
+ upgrade_metadata do
49
+ description 'Migration scripts to Capsule 6.13.z'
50
+ tags :migrations
51
+ end
52
+
53
+ def set_context_mapping
54
+ context.map(:assumeyes, Procedures::Installer::Upgrade => :assumeyes)
55
+ end
56
+
57
+ def compose
58
+ add_step(Procedures::Repositories::Setup.new(:version => '6.13'))
59
+ modules_to_enable = ["satellite-capsule:#{el_short_name}"]
60
+ add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
61
+ add_step(Procedures::Packages::UnlockVersions.new)
62
+ add_step(Procedures::Packages::Update.new(:assumeyes => true))
63
+ add_step_with_context(Procedures::Installer::Upgrade)
64
+ end
65
+ end
66
+
67
+ class PostMigrations < Abstract
68
+ upgrade_metadata do
69
+ description 'Procedures after migrating to Capsule 6.13.z'
70
+ tags :post_migrations
71
+ end
72
+
73
+ def compose
74
+ add_step(Procedures::RefreshFeatures)
75
+ add_step(Procedures::Service::Start.new)
76
+ add_steps(find_procedures(:post_migrations))
77
+ end
78
+ end
79
+
80
+ class PostUpgradeChecks < Abstract
81
+ upgrade_metadata do
82
+ description 'Checks after upgrading to Capsule 6.13.z'
83
+ tags :post_upgrade_checks
84
+ run_strategy :fail_slow
85
+ end
86
+
87
+ def compose
88
+ add_steps(find_checks(:default))
89
+ add_steps(find_checks(:post_upgrade))
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,95 @@
1
+ module Scenarios::Satellite_6_13
2
+ class Abstract < ForemanMaintain::Scenario
3
+ def self.upgrade_metadata(&block)
4
+ metadata do
5
+ tags :upgrade_scenario
6
+ confine do
7
+ feature(:satellite) &&
8
+ (feature(:satellite).current_minor_version == '6.12' || \
9
+ ForemanMaintain.upgrade_in_progress == '6.13')
10
+ end
11
+ instance_eval(&block)
12
+ end
13
+ end
14
+
15
+ def target_version
16
+ '6.13'
17
+ end
18
+ end
19
+
20
+ class PreUpgradeCheck < Abstract
21
+ upgrade_metadata do
22
+ description 'Checks before upgrading to Satellite 6.13'
23
+ tags :pre_upgrade_checks
24
+ run_strategy :fail_slow
25
+ end
26
+
27
+ def compose
28
+ add_steps(find_checks(:default))
29
+ add_steps(find_checks(:pre_upgrade))
30
+ add_step(Checks::Foreman::CheckpointSegments)
31
+ add_step(Checks::Repositories::Validate.new(:version => '6.13'))
32
+ end
33
+ end
34
+
35
+ class PreMigrations < Abstract
36
+ upgrade_metadata do
37
+ description 'Procedures before migrating to Satellite 6.13'
38
+ tags :pre_migrations
39
+ end
40
+
41
+ def compose
42
+ add_steps(find_procedures(:pre_migrations))
43
+ add_step(Procedures::Service::Stop.new)
44
+ end
45
+ end
46
+
47
+ class Migrations < Abstract
48
+ upgrade_metadata do
49
+ description 'Migration scripts to Satellite 6.13'
50
+ tags :migrations
51
+ run_strategy :fail_fast
52
+ end
53
+
54
+ def set_context_mapping
55
+ context.map(:assumeyes, Procedures::Installer::Upgrade => :assumeyes)
56
+ end
57
+
58
+ def compose
59
+ add_step(Procedures::Repositories::Setup.new(:version => '6.13'))
60
+ modules_to_enable = ["satellite:#{el_short_name}"]
61
+ add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
62
+ add_step(Procedures::Packages::UnlockVersions.new)
63
+ add_step(Procedures::Packages::Update.new(:assumeyes => true))
64
+ add_step_with_context(Procedures::Installer::Upgrade)
65
+ add_step(Procedures::Installer::UpgradeRakeTask)
66
+ end
67
+ end
68
+
69
+ class PostMigrations < Abstract
70
+ upgrade_metadata do
71
+ description 'Procedures after migrating to Satellite 6.13'
72
+ tags :post_migrations
73
+ end
74
+
75
+ def compose
76
+ add_step(Procedures::RefreshFeatures)
77
+ add_step(Procedures::Service::Start.new)
78
+ add_step(Procedures::Pulpcore::TrimRpmChangelogs.new)
79
+ add_steps(find_procedures(:post_migrations))
80
+ end
81
+ end
82
+
83
+ class PostUpgradeChecks < Abstract
84
+ upgrade_metadata do
85
+ description 'Checks after upgrading to Satellite 6.13'
86
+ tags :post_upgrade_checks
87
+ run_strategy :fail_slow
88
+ end
89
+
90
+ def compose
91
+ add_steps(find_checks(:default))
92
+ add_steps(find_checks(:post_upgrade))
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,94 @@
1
+ module Scenarios::Satellite_6_13_z
2
+ class Abstract < ForemanMaintain::Scenario
3
+ def self.upgrade_metadata(&block)
4
+ metadata do
5
+ tags :upgrade_scenario
6
+ confine do
7
+ feature(:satellite) &&
8
+ (feature(:satellite).current_minor_version == '6.13' || \
9
+ ForemanMaintain.upgrade_in_progress == '6.13.z')
10
+ end
11
+ instance_eval(&block)
12
+ end
13
+ end
14
+
15
+ def target_version
16
+ '6.13.z'
17
+ end
18
+ end
19
+
20
+ class PreUpgradeCheck < Abstract
21
+ upgrade_metadata do
22
+ description 'Checks before upgrading to Satellite 6.13.z'
23
+ tags :pre_upgrade_checks
24
+ run_strategy :fail_slow
25
+ end
26
+
27
+ def compose
28
+ add_steps(find_checks(:default))
29
+ add_steps(find_checks(:pre_upgrade))
30
+ add_step(Checks::Foreman::CheckpointSegments)
31
+ add_step(Checks::Repositories::Validate.new(:version => '6.13'))
32
+ end
33
+ end
34
+
35
+ class PreMigrations < Abstract
36
+ upgrade_metadata do
37
+ description 'Procedures before migrating to Satellite 6.13.z'
38
+ tags :pre_migrations
39
+ end
40
+
41
+ def compose
42
+ add_steps(find_procedures(:pre_migrations))
43
+ add_step(Procedures::Service::Stop.new)
44
+ end
45
+ end
46
+
47
+ class Migrations < Abstract
48
+ upgrade_metadata do
49
+ description 'Migration scripts to Satellite 6.13.z'
50
+ tags :migrations
51
+ end
52
+
53
+ def set_context_mapping
54
+ context.map(:assumeyes, Procedures::Installer::Upgrade => :assumeyes)
55
+ end
56
+
57
+ def compose
58
+ add_step(Procedures::Repositories::Setup.new(:version => '6.13'))
59
+ modules_to_enable = ["satellite:#{el_short_name}"]
60
+ add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
61
+ add_step(Procedures::Packages::UnlockVersions.new)
62
+ add_step(Procedures::Packages::Update.new(:assumeyes => true))
63
+ add_step_with_context(Procedures::Installer::Upgrade)
64
+ add_step(Procedures::Installer::UpgradeRakeTask)
65
+ end
66
+ end
67
+
68
+ class PostMigrations < Abstract
69
+ upgrade_metadata do
70
+ description 'Procedures after migrating to Satellite 6.13.z'
71
+ tags :post_migrations
72
+ end
73
+
74
+ def compose
75
+ add_step(Procedures::RefreshFeatures)
76
+ add_step(Procedures::Service::Start.new)
77
+ add_step(Procedures::Pulpcore::TrimRpmChangelogs.new)
78
+ add_steps(find_procedures(:post_migrations))
79
+ end
80
+ end
81
+
82
+ class PostUpgradeChecks < Abstract
83
+ upgrade_metadata do
84
+ description 'Checks after upgrading to Satellite 6.13.z'
85
+ tags :post_upgrade_checks
86
+ run_strategy :fail_slow
87
+ end
88
+
89
+ def compose
90
+ add_steps(find_checks(:default))
91
+ add_steps(find_checks(:post_upgrade))
92
+ end
93
+ end
94
+ end
@@ -1,3 +1,3 @@
1
1
  module ForemanMaintain
2
- VERSION = '1.2.2'.freeze
2
+ VERSION = '1.2.3'.freeze
3
3
  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.2.2
4
+ version: 1.2.3
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: 2023-01-03 00:00:00.000000000 Z
11
+ date: 2023-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clamp
@@ -351,6 +351,8 @@ files:
351
351
  - definitions/scenarios/upgrade_to_capsule_6_11_z.rb
352
352
  - definitions/scenarios/upgrade_to_capsule_6_12.rb
353
353
  - definitions/scenarios/upgrade_to_capsule_6_12_z.rb
354
+ - definitions/scenarios/upgrade_to_capsule_6_13.rb
355
+ - definitions/scenarios/upgrade_to_capsule_6_13_z.rb
354
356
  - definitions/scenarios/upgrade_to_capsule_6_8.rb
355
357
  - definitions/scenarios/upgrade_to_capsule_6_8_z.rb
356
358
  - definitions/scenarios/upgrade_to_capsule_6_9.rb
@@ -363,6 +365,8 @@ files:
363
365
  - definitions/scenarios/upgrade_to_satellite_6_11_z.rb
364
366
  - definitions/scenarios/upgrade_to_satellite_6_12.rb
365
367
  - definitions/scenarios/upgrade_to_satellite_6_12_z.rb
368
+ - definitions/scenarios/upgrade_to_satellite_6_13.rb
369
+ - definitions/scenarios/upgrade_to_satellite_6_13_z.rb
366
370
  - definitions/scenarios/upgrade_to_satellite_6_2.rb
367
371
  - definitions/scenarios/upgrade_to_satellite_6_2_z.rb
368
372
  - definitions/scenarios/upgrade_to_satellite_6_3.rb