mtncd 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile.lock +1 -1
- data/bin/mtncd +28 -21
- data/lib/mtncd/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODM3OGI1Y2NjMDgxODI3YmE1OGQ2YWZiMTc4ODQxYTMzOGFlY2U2NQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDlkYzdmNGY0NjE3ODMzOTg3N2Y4NGE1YmU2YWUwYWMxMjdiNjIzNQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NzFmODY3MWQwNjQyNjE3MGEwZmQxMGQ3MGEyYzgwMmVkNTk5N2NkOGUzODQ4
|
10
|
+
OTE5MzZmMTAyYzkxNWUxN2E5MGZlNjU0ZTQ1ZTdhNmExYWRhZWQwZjhiMTE2
|
11
|
+
OWJmZjQ3M2I0NTdhOWNjNWU4NTRlOGQyOWZkYzFlNjZjOTQ5YWY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTQ3NDNlMjk5NTA1ZjM4NGU5ZDIyOGJkMTcwZTI0OWMzNjU4MmE1MzVjZjNk
|
14
|
+
Nzg0MDM2OTgxODVjZjZiNDdjMzMxYjk5ZGJhMjgwOTMwYzgyMGZiNjEyY2Rj
|
15
|
+
ODA3ZDRmMWU5YzI2ZjE3N2E4ZTRiMjgyZDk3NmY5ZmI3MDU1YWI=
|
data/Gemfile.lock
CHANGED
data/bin/mtncd
CHANGED
@@ -29,9 +29,9 @@ command :deploy do |deploy|
|
|
29
29
|
start.desc 'deploy starting with environment'
|
30
30
|
start.default_value 'integration'
|
31
31
|
start.flag :env, :must_match => {
|
32
|
-
'
|
33
|
-
'
|
34
|
-
'prod' =>
|
32
|
+
'integ' => 'integration',
|
33
|
+
'stage' => 'staging',
|
34
|
+
'prod' => 'prod'
|
35
35
|
}
|
36
36
|
|
37
37
|
start.desc 'use deployment id'
|
@@ -41,8 +41,8 @@ command :deploy do |deploy|
|
|
41
41
|
start.desc 'local or global cluster command'
|
42
42
|
start.default_value 'global'
|
43
43
|
start.flag :cluster, :must_match => {
|
44
|
-
'global' =>
|
45
|
-
'local' =>
|
44
|
+
'global' => 'global',
|
45
|
+
'local' => 'local'
|
46
46
|
}
|
47
47
|
|
48
48
|
start.desc 'regex matching shipcodes to exclude from a deploy (overrides config file)'
|
@@ -56,12 +56,12 @@ command :deploy do |deploy|
|
|
56
56
|
start.switch :single
|
57
57
|
|
58
58
|
start.action do |global_options,options,args|
|
59
|
-
if $config['role'] == 'sled' && options[:cluster] ==
|
60
|
-
raise
|
59
|
+
if $config['role'] == 'sled' && options[:cluster] == 'global'
|
60
|
+
raise 'global commands are only available on central or infra nodes'
|
61
61
|
end
|
62
62
|
|
63
|
-
if $config['role'] == 'central' && options[:cluster] ==
|
64
|
-
raise
|
63
|
+
if $config['role'] == 'central' && options[:cluster] == 'local'
|
64
|
+
raise 'local commands are only available on infra or sled nodes'
|
65
65
|
end
|
66
66
|
|
67
67
|
event_options_hash = {
|
@@ -90,7 +90,7 @@ command :deploy do |deploy|
|
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
93
|
-
deploy.desc
|
93
|
+
deploy.desc 'stops a deployment'
|
94
94
|
deploy.command :stop do |stop|
|
95
95
|
stop.desc 'use deployment id'
|
96
96
|
stop.flag :id, :required => true
|
@@ -98,17 +98,17 @@ command :deploy do |deploy|
|
|
98
98
|
stop.desc 'local or global cluster command'
|
99
99
|
stop.default_value 'global'
|
100
100
|
stop.flag :cluster, :must_match => {
|
101
|
-
|
102
|
-
|
101
|
+
'global' => 'global',
|
102
|
+
'local' => 'local'
|
103
103
|
}
|
104
104
|
|
105
105
|
stop.action do |global_options,options,args|
|
106
|
-
if $config['role'] == 'sled' && options[:cluster] ==
|
107
|
-
raise
|
106
|
+
if $config['role'] == 'sled' && options[:cluster] == 'global'
|
107
|
+
raise 'global commands are only available on central or infra nodes'
|
108
108
|
end
|
109
109
|
|
110
|
-
if $config['role'] == 'central' && options[:cluster] ==
|
111
|
-
raise
|
110
|
+
if $config['role'] == 'central' && options[:cluster] == 'local'
|
111
|
+
raise 'local commands are only available on infra or sled nodes'
|
112
112
|
end
|
113
113
|
|
114
114
|
event_options_hash = {
|
@@ -147,16 +147,17 @@ command :status do |status|
|
|
147
147
|
status.desc 'local or global cluster'
|
148
148
|
status.default_value 'global'
|
149
149
|
status.flag :cluster, :must_match => {
|
150
|
-
'global' =>
|
151
|
-
'local' =>
|
150
|
+
'global' => 'global',
|
151
|
+
'local' => 'local'
|
152
152
|
}
|
153
153
|
|
154
|
-
status.action do |global_options,options,args|
|
155
|
-
|
154
|
+
status.action do |global_options,options,args|
|
155
|
+
|
156
|
+
if $config['role'] == 'sled' && options[:cluster] == 'global'
|
156
157
|
raise "global status is only available on central or infra nodes"
|
157
158
|
end
|
158
159
|
|
159
|
-
if $config['role'] == 'central' && options[:cluster] ==
|
160
|
+
if $config['role'] == 'central' && options[:cluster] == 'local'
|
160
161
|
raise "local status is only available on infra or sled nodes"
|
161
162
|
end
|
162
163
|
|
@@ -196,6 +197,12 @@ command :system do |system|
|
|
196
197
|
# check resque
|
197
198
|
begin
|
198
199
|
Resque.redis = "#{$config['system']['redis']['ip']}:#{$config['system']['redis']['port']}"
|
200
|
+
|
201
|
+
# clean up any workers that didn't exit gracefuly.
|
202
|
+
Resque.workers.each { |worker|
|
203
|
+
worker.prune_dead_workers
|
204
|
+
}
|
205
|
+
|
199
206
|
result = (Resque.workers.count == $config['system']['resque']['workers']) ? "OK" : "\033[31mFAIL\033[0m"
|
200
207
|
success = Resque.workers.count == $config['system']['resque']['workers'] unless success == false
|
201
208
|
puts "Resque - Should have #{$config['system']['resque']['workers']} workers, running #{Resque.workers.count} workers - [#{result}]"
|
data/lib/mtncd/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mtncd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MTN Satellite Communications
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: resque
|