alpha_omega 0.0.95 → 0.0.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/alpha_omega/utils.rb +15 -15
- data/lib/alpha_omega/version.rb +1 -1
- data/libexec/build +50 -46
- data/libexec/check +50 -46
- data/libexec/compare +50 -46
- data/libexec/config +50 -46
- data/libexec/deploy +50 -46
- data/libexec/dist +50 -46
- data/libexec/dna +50 -46
- data/libexec/hosts +50 -46
- data/libexec/invoke +50 -46
- data/libexec/release +50 -46
- data/libexec/restart +50 -46
- data/libexec/rollback +50 -46
- data/libexec/shell +50 -46
- data/libexec/stage +50 -46
- metadata +25 -23
data/lib/alpha_omega/utils.rb
CHANGED
@@ -64,13 +64,13 @@ module AlphaOmega
|
|
64
64
|
|
65
65
|
def self.default_pods_tasks
|
66
66
|
Proc.new do |config, pod_name, pod, mix_pods, pods_config, opsdb, this_pod, this_node, &node_filter|
|
67
|
-
|
67
|
+
%w(app echo yaml).each do |tsuffix|
|
68
68
|
# world task accumulates all.* after tasks
|
69
|
-
config.task "world
|
69
|
+
config.task "world.#{tsuffix}" do # task world
|
70
70
|
end
|
71
71
|
|
72
72
|
# each pod task sets the pod context for host/group tasks
|
73
|
-
config.task "#{pod_name}
|
73
|
+
config.task "#{pod_name}.#{tsuffix}" do # task default, pod1
|
74
74
|
set :current_pod, pod_name
|
75
75
|
end
|
76
76
|
end
|
@@ -83,7 +83,7 @@ module AlphaOmega
|
|
83
83
|
node_dna[remote_name].deep_merge!(n)
|
84
84
|
|
85
85
|
if node_filter.nil? || node_filter.call(this_node, n)
|
86
|
-
config.task "#{task_name}.#{pod_name}" do # task host.default, host.pod1
|
86
|
+
config.task "#{task_name}.#{pod_name}.app" do # task host.default.app, host.pod1.app
|
87
87
|
role :app, remote_name
|
88
88
|
set :dna, node_dna[remote_name]
|
89
89
|
end
|
@@ -93,12 +93,12 @@ module AlphaOmega
|
|
93
93
|
end
|
94
94
|
|
95
95
|
config.task "#{task_name}.#{pod_name}.yaml" do # task host.default.yaml, host.pod1..yaml
|
96
|
-
StringIO.new({ remote_name => n }.to_yaml).lines.each {|l| puts "#{AlphaOmega.magic_prefix} #{l}" }
|
96
|
+
StringIO.new({ remote_name => n }.to_yaml).lines.to_a[1..-1].each {|l| puts "#{AlphaOmega.magic_prefix} #{l}" }
|
97
97
|
end
|
98
98
|
|
99
|
-
|
100
|
-
config.task "#{task_name}
|
101
|
-
after "#{task_name}
|
99
|
+
%w(app echo yaml).each do |tsuffix|
|
100
|
+
config.task "#{task_name}.#{tsuffix}" do # task host -> host.current_pod
|
101
|
+
after "#{task_name}.#{tsuffix}", "#{task_name}.#{current_pod}.#{tsuffix}"
|
102
102
|
end
|
103
103
|
end
|
104
104
|
|
@@ -111,15 +111,15 @@ module AlphaOmega
|
|
111
111
|
AlphaOmega.what_groups hosts do |task_name, nodes|
|
112
112
|
if task_name == "all"
|
113
113
|
# simulate all podXX all
|
114
|
-
|
114
|
+
%w(app echo yaml).each do |tsuffix|
|
115
115
|
unless pod_name == "default"
|
116
|
-
config.after "world
|
116
|
+
config.after "world.#{tsuffix}", "#{pod_name}.#{tsuffix}"
|
117
117
|
end
|
118
|
-
config.after "world
|
118
|
+
config.after "world.#{tsuffix}", "#{task_name}.#{tsuffix}"
|
119
119
|
end
|
120
120
|
end
|
121
121
|
|
122
|
-
config.task "#{task_name}.#{pod_name}" do
|
122
|
+
config.task "#{task_name}.#{pod_name}.app" do
|
123
123
|
unless mix_pods
|
124
124
|
if last_pod && last_pod != pod_name
|
125
125
|
puts "ERROR: cannot call tasks that mix different dc_env (last pod = #{last_pod}, current pod = #{pod_name})"
|
@@ -162,9 +162,9 @@ module AlphaOmega
|
|
162
162
|
end
|
163
163
|
end
|
164
164
|
|
165
|
-
|
166
|
-
config.task "#{task_name}
|
167
|
-
after "#{task_name}
|
165
|
+
%w(app echo yaml).each do |tsuffix|
|
166
|
+
config.task "#{task_name}.#{tsuffix}" do
|
167
|
+
after "#{task_name}.#{tsuffix}", "#{task_name}.#{current_pod}.#{tsuffix}"
|
168
168
|
end
|
169
169
|
end
|
170
170
|
end
|
data/lib/alpha_omega/version.rb
CHANGED
data/libexec/build
CHANGED
@@ -11,50 +11,6 @@ if ! echo "$hst_this" | egrep -q "^(admin|develop)"; then
|
|
11
11
|
fi
|
12
12
|
|
13
13
|
case "$(basename $0)" in
|
14
|
-
deploy|release)
|
15
|
-
bundle exec cap "$@" deploy
|
16
|
-
;;
|
17
|
-
|
18
|
-
rollback)
|
19
|
-
bundle exec cap "$@" deploy:rollback
|
20
|
-
;;
|
21
|
-
|
22
|
-
stage)
|
23
|
-
bundle exec cap "$@" deploy:update_code
|
24
|
-
;;
|
25
|
-
|
26
|
-
compare)
|
27
|
-
bundle exec cap "$@" deploy:compare
|
28
|
-
;;
|
29
|
-
|
30
|
-
restart)
|
31
|
-
bundle exec cap "$@" deploy:restart
|
32
|
-
;;
|
33
|
-
|
34
|
-
restart)
|
35
|
-
bundle exec cap "$@" deploy:restart
|
36
|
-
;;
|
37
|
-
|
38
|
-
build)
|
39
|
-
bundle exec cap "$@" deploy:build
|
40
|
-
;;
|
41
|
-
|
42
|
-
dist)
|
43
|
-
bundle exec cap "$@" deploy:dist
|
44
|
-
;;
|
45
|
-
|
46
|
-
config)
|
47
|
-
bundle exec cap "$@" deploy:config
|
48
|
-
;;
|
49
|
-
|
50
|
-
invoke)
|
51
|
-
bundle exec cap "$@" invoke
|
52
|
-
;;
|
53
|
-
|
54
|
-
shell)
|
55
|
-
bundle exec cap "$@" shell
|
56
|
-
;;
|
57
|
-
|
58
14
|
hosts)
|
59
15
|
export LOCAL_ONLY=true
|
60
16
|
|
@@ -72,7 +28,55 @@ case "$(basename $0)" in
|
|
72
28
|
;;
|
73
29
|
|
74
30
|
*)
|
75
|
-
|
76
|
-
|
31
|
+
set $(for a in "$@"; do echo $a.app; done)
|
32
|
+
case "$(basename $0)" in
|
33
|
+
deploy|release)
|
34
|
+
bundle exec cap "$@" deploy
|
35
|
+
;;
|
36
|
+
|
37
|
+
rollback)
|
38
|
+
bundle exec cap "$@" deploy:rollback
|
39
|
+
;;
|
40
|
+
|
41
|
+
stage)
|
42
|
+
bundle exec cap "$@" deploy:update_code
|
43
|
+
;;
|
44
|
+
|
45
|
+
compare)
|
46
|
+
bundle exec cap "$@" deploy:compare
|
47
|
+
;;
|
48
|
+
|
49
|
+
restart)
|
50
|
+
bundle exec cap "$@" deploy:restart
|
51
|
+
;;
|
52
|
+
|
53
|
+
restart)
|
54
|
+
bundle exec cap "$@" deploy:restart
|
55
|
+
;;
|
56
|
+
|
57
|
+
build)
|
58
|
+
bundle exec cap "$@" deploy:build
|
59
|
+
;;
|
60
|
+
|
61
|
+
dist)
|
62
|
+
bundle exec cap "$@" deploy:dist
|
63
|
+
;;
|
64
|
+
|
65
|
+
config)
|
66
|
+
bundle exec cap "$@" deploy:config
|
67
|
+
;;
|
68
|
+
|
69
|
+
invoke)
|
70
|
+
bundle exec cap "$@" invoke
|
71
|
+
;;
|
72
|
+
|
73
|
+
shell)
|
74
|
+
bundle exec cap "$@" shell
|
75
|
+
;;
|
76
|
+
|
77
|
+
*)
|
78
|
+
bundle exec cap "$@"
|
79
|
+
;;
|
80
|
+
esac
|
77
81
|
esac
|
78
82
|
|
data/libexec/check
CHANGED
@@ -11,50 +11,6 @@ if ! echo "$hst_this" | egrep -q "^(admin|develop)"; then
|
|
11
11
|
fi
|
12
12
|
|
13
13
|
case "$(basename $0)" in
|
14
|
-
deploy|release)
|
15
|
-
bundle exec cap "$@" deploy
|
16
|
-
;;
|
17
|
-
|
18
|
-
rollback)
|
19
|
-
bundle exec cap "$@" deploy:rollback
|
20
|
-
;;
|
21
|
-
|
22
|
-
stage)
|
23
|
-
bundle exec cap "$@" deploy:update_code
|
24
|
-
;;
|
25
|
-
|
26
|
-
compare)
|
27
|
-
bundle exec cap "$@" deploy:compare
|
28
|
-
;;
|
29
|
-
|
30
|
-
restart)
|
31
|
-
bundle exec cap "$@" deploy:restart
|
32
|
-
;;
|
33
|
-
|
34
|
-
restart)
|
35
|
-
bundle exec cap "$@" deploy:restart
|
36
|
-
;;
|
37
|
-
|
38
|
-
build)
|
39
|
-
bundle exec cap "$@" deploy:build
|
40
|
-
;;
|
41
|
-
|
42
|
-
dist)
|
43
|
-
bundle exec cap "$@" deploy:dist
|
44
|
-
;;
|
45
|
-
|
46
|
-
config)
|
47
|
-
bundle exec cap "$@" deploy:config
|
48
|
-
;;
|
49
|
-
|
50
|
-
invoke)
|
51
|
-
bundle exec cap "$@" invoke
|
52
|
-
;;
|
53
|
-
|
54
|
-
shell)
|
55
|
-
bundle exec cap "$@" shell
|
56
|
-
;;
|
57
|
-
|
58
14
|
hosts)
|
59
15
|
export LOCAL_ONLY=true
|
60
16
|
|
@@ -72,7 +28,55 @@ case "$(basename $0)" in
|
|
72
28
|
;;
|
73
29
|
|
74
30
|
*)
|
75
|
-
|
76
|
-
|
31
|
+
set $(for a in "$@"; do echo $a.app; done)
|
32
|
+
case "$(basename $0)" in
|
33
|
+
deploy|release)
|
34
|
+
bundle exec cap "$@" deploy
|
35
|
+
;;
|
36
|
+
|
37
|
+
rollback)
|
38
|
+
bundle exec cap "$@" deploy:rollback
|
39
|
+
;;
|
40
|
+
|
41
|
+
stage)
|
42
|
+
bundle exec cap "$@" deploy:update_code
|
43
|
+
;;
|
44
|
+
|
45
|
+
compare)
|
46
|
+
bundle exec cap "$@" deploy:compare
|
47
|
+
;;
|
48
|
+
|
49
|
+
restart)
|
50
|
+
bundle exec cap "$@" deploy:restart
|
51
|
+
;;
|
52
|
+
|
53
|
+
restart)
|
54
|
+
bundle exec cap "$@" deploy:restart
|
55
|
+
;;
|
56
|
+
|
57
|
+
build)
|
58
|
+
bundle exec cap "$@" deploy:build
|
59
|
+
;;
|
60
|
+
|
61
|
+
dist)
|
62
|
+
bundle exec cap "$@" deploy:dist
|
63
|
+
;;
|
64
|
+
|
65
|
+
config)
|
66
|
+
bundle exec cap "$@" deploy:config
|
67
|
+
;;
|
68
|
+
|
69
|
+
invoke)
|
70
|
+
bundle exec cap "$@" invoke
|
71
|
+
;;
|
72
|
+
|
73
|
+
shell)
|
74
|
+
bundle exec cap "$@" shell
|
75
|
+
;;
|
76
|
+
|
77
|
+
*)
|
78
|
+
bundle exec cap "$@"
|
79
|
+
;;
|
80
|
+
esac
|
77
81
|
esac
|
78
82
|
|
data/libexec/compare
CHANGED
@@ -11,50 +11,6 @@ if ! echo "$hst_this" | egrep -q "^(admin|develop)"; then
|
|
11
11
|
fi
|
12
12
|
|
13
13
|
case "$(basename $0)" in
|
14
|
-
deploy|release)
|
15
|
-
bundle exec cap "$@" deploy
|
16
|
-
;;
|
17
|
-
|
18
|
-
rollback)
|
19
|
-
bundle exec cap "$@" deploy:rollback
|
20
|
-
;;
|
21
|
-
|
22
|
-
stage)
|
23
|
-
bundle exec cap "$@" deploy:update_code
|
24
|
-
;;
|
25
|
-
|
26
|
-
compare)
|
27
|
-
bundle exec cap "$@" deploy:compare
|
28
|
-
;;
|
29
|
-
|
30
|
-
restart)
|
31
|
-
bundle exec cap "$@" deploy:restart
|
32
|
-
;;
|
33
|
-
|
34
|
-
restart)
|
35
|
-
bundle exec cap "$@" deploy:restart
|
36
|
-
;;
|
37
|
-
|
38
|
-
build)
|
39
|
-
bundle exec cap "$@" deploy:build
|
40
|
-
;;
|
41
|
-
|
42
|
-
dist)
|
43
|
-
bundle exec cap "$@" deploy:dist
|
44
|
-
;;
|
45
|
-
|
46
|
-
config)
|
47
|
-
bundle exec cap "$@" deploy:config
|
48
|
-
;;
|
49
|
-
|
50
|
-
invoke)
|
51
|
-
bundle exec cap "$@" invoke
|
52
|
-
;;
|
53
|
-
|
54
|
-
shell)
|
55
|
-
bundle exec cap "$@" shell
|
56
|
-
;;
|
57
|
-
|
58
14
|
hosts)
|
59
15
|
export LOCAL_ONLY=true
|
60
16
|
|
@@ -72,7 +28,55 @@ case "$(basename $0)" in
|
|
72
28
|
;;
|
73
29
|
|
74
30
|
*)
|
75
|
-
|
76
|
-
|
31
|
+
set $(for a in "$@"; do echo $a.app; done)
|
32
|
+
case "$(basename $0)" in
|
33
|
+
deploy|release)
|
34
|
+
bundle exec cap "$@" deploy
|
35
|
+
;;
|
36
|
+
|
37
|
+
rollback)
|
38
|
+
bundle exec cap "$@" deploy:rollback
|
39
|
+
;;
|
40
|
+
|
41
|
+
stage)
|
42
|
+
bundle exec cap "$@" deploy:update_code
|
43
|
+
;;
|
44
|
+
|
45
|
+
compare)
|
46
|
+
bundle exec cap "$@" deploy:compare
|
47
|
+
;;
|
48
|
+
|
49
|
+
restart)
|
50
|
+
bundle exec cap "$@" deploy:restart
|
51
|
+
;;
|
52
|
+
|
53
|
+
restart)
|
54
|
+
bundle exec cap "$@" deploy:restart
|
55
|
+
;;
|
56
|
+
|
57
|
+
build)
|
58
|
+
bundle exec cap "$@" deploy:build
|
59
|
+
;;
|
60
|
+
|
61
|
+
dist)
|
62
|
+
bundle exec cap "$@" deploy:dist
|
63
|
+
;;
|
64
|
+
|
65
|
+
config)
|
66
|
+
bundle exec cap "$@" deploy:config
|
67
|
+
;;
|
68
|
+
|
69
|
+
invoke)
|
70
|
+
bundle exec cap "$@" invoke
|
71
|
+
;;
|
72
|
+
|
73
|
+
shell)
|
74
|
+
bundle exec cap "$@" shell
|
75
|
+
;;
|
76
|
+
|
77
|
+
*)
|
78
|
+
bundle exec cap "$@"
|
79
|
+
;;
|
80
|
+
esac
|
77
81
|
esac
|
78
82
|
|
data/libexec/config
CHANGED
@@ -11,50 +11,6 @@ if ! echo "$hst_this" | egrep -q "^(admin|develop)"; then
|
|
11
11
|
fi
|
12
12
|
|
13
13
|
case "$(basename $0)" in
|
14
|
-
deploy|release)
|
15
|
-
bundle exec cap "$@" deploy
|
16
|
-
;;
|
17
|
-
|
18
|
-
rollback)
|
19
|
-
bundle exec cap "$@" deploy:rollback
|
20
|
-
;;
|
21
|
-
|
22
|
-
stage)
|
23
|
-
bundle exec cap "$@" deploy:update_code
|
24
|
-
;;
|
25
|
-
|
26
|
-
compare)
|
27
|
-
bundle exec cap "$@" deploy:compare
|
28
|
-
;;
|
29
|
-
|
30
|
-
restart)
|
31
|
-
bundle exec cap "$@" deploy:restart
|
32
|
-
;;
|
33
|
-
|
34
|
-
restart)
|
35
|
-
bundle exec cap "$@" deploy:restart
|
36
|
-
;;
|
37
|
-
|
38
|
-
build)
|
39
|
-
bundle exec cap "$@" deploy:build
|
40
|
-
;;
|
41
|
-
|
42
|
-
dist)
|
43
|
-
bundle exec cap "$@" deploy:dist
|
44
|
-
;;
|
45
|
-
|
46
|
-
config)
|
47
|
-
bundle exec cap "$@" deploy:config
|
48
|
-
;;
|
49
|
-
|
50
|
-
invoke)
|
51
|
-
bundle exec cap "$@" invoke
|
52
|
-
;;
|
53
|
-
|
54
|
-
shell)
|
55
|
-
bundle exec cap "$@" shell
|
56
|
-
;;
|
57
|
-
|
58
14
|
hosts)
|
59
15
|
export LOCAL_ONLY=true
|
60
16
|
|
@@ -72,7 +28,55 @@ case "$(basename $0)" in
|
|
72
28
|
;;
|
73
29
|
|
74
30
|
*)
|
75
|
-
|
76
|
-
|
31
|
+
set $(for a in "$@"; do echo $a.app; done)
|
32
|
+
case "$(basename $0)" in
|
33
|
+
deploy|release)
|
34
|
+
bundle exec cap "$@" deploy
|
35
|
+
;;
|
36
|
+
|
37
|
+
rollback)
|
38
|
+
bundle exec cap "$@" deploy:rollback
|
39
|
+
;;
|
40
|
+
|
41
|
+
stage)
|
42
|
+
bundle exec cap "$@" deploy:update_code
|
43
|
+
;;
|
44
|
+
|
45
|
+
compare)
|
46
|
+
bundle exec cap "$@" deploy:compare
|
47
|
+
;;
|
48
|
+
|
49
|
+
restart)
|
50
|
+
bundle exec cap "$@" deploy:restart
|
51
|
+
;;
|
52
|
+
|
53
|
+
restart)
|
54
|
+
bundle exec cap "$@" deploy:restart
|
55
|
+
;;
|
56
|
+
|
57
|
+
build)
|
58
|
+
bundle exec cap "$@" deploy:build
|
59
|
+
;;
|
60
|
+
|
61
|
+
dist)
|
62
|
+
bundle exec cap "$@" deploy:dist
|
63
|
+
;;
|
64
|
+
|
65
|
+
config)
|
66
|
+
bundle exec cap "$@" deploy:config
|
67
|
+
;;
|
68
|
+
|
69
|
+
invoke)
|
70
|
+
bundle exec cap "$@" invoke
|
71
|
+
;;
|
72
|
+
|
73
|
+
shell)
|
74
|
+
bundle exec cap "$@" shell
|
75
|
+
;;
|
76
|
+
|
77
|
+
*)
|
78
|
+
bundle exec cap "$@"
|
79
|
+
;;
|
80
|
+
esac
|
77
81
|
esac
|
78
82
|
|