Project

General

Profile

Download (1.94 KB) Statistics
| Branch: | Tag: | Revision:
e361f5c2 Ivan Nečas
module Scenarios::Satellite_6_2
class Abstract < ForemanMaintain::Scenario
def self.upgrade_metadata(&block)
metadata do
tags :upgrade_to_satellite_6_2
confine do
feature(:downstream) && feature(:downstream).current_minor_version == '6.1'
end
instance_eval(&block)
end
end
end

class PreUpgradeCheck < Abstract
upgrade_metadata do
4af0ee09 Ivan Nečas
description 'Checks before upgrading to Satellite 6.2'
e361f5c2 Ivan Nečas
tags :pre_upgrade_checks
run_strategy :fail_slow
end

def compose
add_steps(find_checks(:default))
add_steps(find_checks(:pre_upgrade))
end
end

65803389 Ivan Nečas
class PreMigrations < Abstract
upgrade_metadata do
4af0ee09 Ivan Nečas
description 'Procedures before migrating to Satellite 6.2'
65803389 Ivan Nečas
tags :pre_migrations
e361f5c2 Ivan Nečas
end

def compose
add_steps(find_procedures(:pre_migrations))
f9b002c7 kgaikwad
add_step(Procedures::KatelloService::Stop.new)
e361f5c2 Ivan Nečas
end
end

65803389 Ivan Nečas
class Migrations < Abstract
upgrade_metadata do
4af0ee09 Ivan Nečas
description 'Migration scripts to Satellite 6.2'
65803389 Ivan Nečas
tags :migrations
e361f5c2 Ivan Nečas
end

def compose
65803389 Ivan Nečas
add_step(Procedures::Repositories::Setup.new(:version => '6.2'))
add_step(Procedures::Packages::Update.new(:assumeyes => false))
de680896 Ivan Nečas
add_step(Procedures::Installer::Upgrade.new)
e361f5c2 Ivan Nečas
end
end

65803389 Ivan Nečas
class PostMigrations < Abstract
upgrade_metadata do
4af0ee09 Ivan Nečas
description 'Procedures after migrating to Satellite 6.2'
65803389 Ivan Nečas
tags :post_migrations
e361f5c2 Ivan Nečas
end

def compose
f9b002c7 kgaikwad
add_step(Procedures::KatelloService::Start.new)
e361f5c2 Ivan Nečas
add_steps(find_procedures(:post_migrations))
end
end

65803389 Ivan Nečas
class PostUpgradeChecks < Abstract
upgrade_metadata do
4af0ee09 Ivan Nečas
description 'Checks after upgrading to Satellite 6.2'
65803389 Ivan Nečas
tags :post_upgrade_checks
e361f5c2 Ivan Nečas
run_strategy :fail_slow
end

def compose
add_steps(find_checks(:default))
add_steps(find_checks(:post_upgrade))
end
end
end

ForemanMaintain::UpgradeRunner.register_version('6.2', :upgrade_to_satellite_6_2)