-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
76 lines (68 loc) · 1.46 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Rakefile
require File.expand_path(File.join(File.dirname(__FILE__), "lib", "autorio.rb"))
require "rainbow"
require "autorio/deployer"
require "autorio/master"
require "autorio/database"
require "autorio/nodelet"
require "autorio/storlet"
require "autorio/bomb"
require "autorio/cleaner"
include Autorio::Bomb
desc "Display the current version"
task :version do
begin
puts Rainbow("#{Autorio::Config.version}").magenta.bold
rescue StandardError => e
puts Rainbow(e.message).red
puts e.backtrace
end
end
desc "Deploy the master"
task :deploy, [:pre, :which] do |_t, args|
begin
Autorio::Deployer.new(args).deploy
rescue StandardError => e
log_exception(e)
end
end
desc "Cleanup master"
task :clean, [:pre, :which] do |_t, args|
begin
Autorio::Cleaner.new(args).clean
rescue StandardError => e
log_exception(e)
end
end
desc "Deploy the database"
task :deploy_db do
begin
Autorio::Database.new.deploy
rescue StandardError => e
log_exception(e)
end
end
desc "Cleanup db"
task :clean_db do
begin
Autorio::Database.new.clean if Autorio::Util.ask_yes_or_no
rescue StandardError => e
log_exception(e)
end
end
desc "Gather configs"
task :gather do
begin
Autorio::Master.new.gather
rescue StandardError => e
log_exception(e)
end
end
desc "Spread the configs"
task :spread, [:which] do |_t, args|
begin
Autorio::Deployer.new(args).spread
rescue StandardError => e
log_exception(e)
end
end