gaptool-client 0.5.8 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/VERSION +1 -1
- data/gaptool-client.gemspec +2 -2
- data/lib/gaptool-client.rb +0 -96
- metadata +32 -31
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
ODZkNjJmOTIxN2QxOTU1Y2MyZDk5M2Y0YzE0YzZiYzAyNTIyNTY1Yg==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1f09eb674fd62f722fc51187e7ec33ea4b7a27ab
|
4
|
+
data.tar.gz: 14464ae7e1240ea6d9714015bd478c3581bb5e9a
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
MGFiMDkxM2RjZDMxNDVmNGZlNGNhMjQwNDZlMmQyYWE4YzEyM2Y1OGYwYjAy
|
11
|
-
NWQyOWRkMGVjMjE4ZjlhYWQyOGQwZDg5YzU3ZTRjOGQyOGFmZDM=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
OWE0MThjNzA4OTI1ZmJlMjgwNTZjYjVmNGNiZmJhNmE5ZTAxODlmYmQwNjEw
|
14
|
-
NWM5MTFmYjI4ZDc1NDAwODdkYWYyNjBjYzI0NjJmMTllZDljYjdmNWYxNjg5
|
15
|
-
OGNkNjNjZTc2MjkwZDZjZjVhNzRjYzM5YjdmMzliMTIyNmRhNjM=
|
6
|
+
metadata.gz: e675567f95a4c19b45b3ddb18ab2403210b61cae37b8386258e4b4e8d35e1fe882107e8e5b11357a67773553196f8bba524b47754deaa2ad5056b7eb808b765f
|
7
|
+
data.tar.gz: 9ae5976611e90fdfcc170ecfc166ca3557562ebb04e94aa884b7c6e4a051600539b2212dde7fbf2b63c69992aea398e03ac543b15dc02c8774fa270ca0cdf81f
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.6.0
|
data/gaptool-client.gemspec
CHANGED
@@ -9,7 +9,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
9
9
|
Gem::Specification.new do |s|
|
10
10
|
s.name = "gaptool-client"
|
11
11
|
s.version = File.read('VERSION').strip
|
12
|
-
s.authors = ["Francesco Laurita", "Matt Bailey"]
|
12
|
+
s.authors = ["Francesco Laurita", "Matt Bailey", "Giacomo Bagnoli"]
|
13
13
|
s.email = ["francesco@gild.com"]
|
14
14
|
s.homepage = "http://www.gild.com"
|
15
15
|
s.summary = %q{client for gaptool-server}
|
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
|
|
31
31
|
s.add_runtime_dependency 'clamp', "~> 0.6"
|
32
32
|
s.add_runtime_dependency 'net-ssh', "~> 2.9"
|
33
33
|
s.add_runtime_dependency 'net-scp', "~> 1.2"
|
34
|
-
s.add_runtime_dependency 'gaptool-api', "= 0.
|
34
|
+
s.add_runtime_dependency 'gaptool-api', "= 0.4.0"
|
35
35
|
s.add_runtime_dependency 'builder', "~> 3"
|
36
36
|
|
37
37
|
s.add_development_dependency 'shoulda', "~> 3"
|
data/lib/gaptool-client.rb
CHANGED
@@ -293,97 +293,6 @@ module Gaptool
|
|
293
293
|
end
|
294
294
|
end
|
295
295
|
|
296
|
-
class BalanceCommand < Clamp::Command
|
297
|
-
option ["-r", "--role"], "ROLE", "Role name to ssh to", :required => true
|
298
|
-
option ["-e", "--environment"], "ENVIRONMENT", "Which environment, e.g. production", :required => true
|
299
|
-
def execute
|
300
|
-
puts $api.balanceservices(role, environment)
|
301
|
-
end
|
302
|
-
end
|
303
|
-
|
304
|
-
class AddserviceCommand < Clamp::Command
|
305
|
-
option ["-r", "--role"], "ROLE", "Role name to ssh to", :required => true
|
306
|
-
option ["-e", "--environment"], "ENVIRONMENT", "Which environment, e.g. production", :required => true
|
307
|
-
option ["-n", "--name"], "NAME", "Name of the service, e.g. 'twitter'. MUST MATCH UPSTARTD SERVICE NAME.", :required => true
|
308
|
-
option ["-w", "--weight"], "WEIGHT", "Relative service weight, for the balancer to chose run location", :required => true
|
309
|
-
option ["-y", "--enabled"], :flag, "Enable this service in balance run"
|
310
|
-
option ["-k", "--keys"], "KEYS", "Hash of keys that will be written to YAML /tmp/apikeys-<service name>.yml. This will be eval()'d, write it like a ruby hash.", :required => true
|
311
|
-
def execute
|
312
|
-
if enabled?
|
313
|
-
en = 1
|
314
|
-
else
|
315
|
-
en = 0
|
316
|
-
end
|
317
|
-
puts $api.addservice(role, environment, name, eval(keys), weight, en)
|
318
|
-
end
|
319
|
-
end
|
320
|
-
|
321
|
-
class DelserviceCommand < Clamp::Command
|
322
|
-
option ["-r", "--role"], "ROLE", "Role name to ssh to", :required => true
|
323
|
-
option ["-e", "--environment"], "ENVIRONMENT", "Which environment, e.g. production", :required => true
|
324
|
-
option ["-n", "--name"], "NAME", "Name of the service, e.g. 'twitter'. MUST MATCH UPSTARTD SERVICE NAME.", :required => true
|
325
|
-
def execute
|
326
|
-
puts $api.deleteservice(role, environment, name)
|
327
|
-
end
|
328
|
-
end
|
329
|
-
|
330
|
-
class ServicesCommand < Clamp::Command
|
331
|
-
def execute
|
332
|
-
puts $api.getservices()
|
333
|
-
end
|
334
|
-
end
|
335
|
-
|
336
|
-
class SvcAPIList < Clamp::Command
|
337
|
-
option [ "-s", "--service"], "SERVICE", "Name of the service, omit to show all"
|
338
|
-
def execute
|
339
|
-
if service.nil?
|
340
|
-
keyhash = $api.svcapi_showkeys(:all)
|
341
|
-
keyhash.keys.each do |service|
|
342
|
-
puts Rainbow(service).green
|
343
|
-
keyhash[service].keys.each do |state|
|
344
|
-
puts Rainbow(" ┖ #{state}").cyan
|
345
|
-
keyhash[service][state].each do |key|
|
346
|
-
puts " - #{key}"
|
347
|
-
end
|
348
|
-
end
|
349
|
-
end
|
350
|
-
else
|
351
|
-
keyhash = $api.svcapi_showkeys(service)
|
352
|
-
puts Rainbow(service).green
|
353
|
-
keyhash.keys.each do |state|
|
354
|
-
puts Rainbow(" ┖ #{state}").cyan
|
355
|
-
keyhash[state].each do |key|
|
356
|
-
puts " - #{key}"
|
357
|
-
end
|
358
|
-
end
|
359
|
-
end
|
360
|
-
end
|
361
|
-
end
|
362
|
-
|
363
|
-
class SvcAPIDelete < Clamp::Command
|
364
|
-
option [ "-s", "--service"], "SERVICE", "Name of the service", :required => true
|
365
|
-
option [ "-k", "--key" ], "KEY", "string for storing as a key/deleting", :required => true
|
366
|
-
def execute
|
367
|
-
if $api.svcapi_deletekey(service, key)
|
368
|
-
puts "success"
|
369
|
-
end
|
370
|
-
end
|
371
|
-
end
|
372
|
-
|
373
|
-
class SvcAPIPut < Clamp::Command
|
374
|
-
option [ "-s", "--service"], "SERVICE", "Name of the service", :required => true
|
375
|
-
option [ "-k", "--key" ], "KEY", "string for storing as a key/deleting", :required => true
|
376
|
-
def execute
|
377
|
-
puts $api.svcapi_putkey(service, key)
|
378
|
-
end
|
379
|
-
end
|
380
|
-
|
381
|
-
class SvcAPI < Clamp::Command
|
382
|
-
subcommand "list", "List keys for a service or all services", SvcAPIList
|
383
|
-
subcommand "delete", "Delete key from a service", SvcAPIDelete
|
384
|
-
subcommand "put", "Put a new key for a service", SvcAPIPut
|
385
|
-
end
|
386
|
-
|
387
296
|
class MainCommand < Clamp::Command
|
388
297
|
|
389
298
|
subcommand "info", "Displays information about nodes", InfoCommand
|
@@ -392,11 +301,6 @@ module Gaptool
|
|
392
301
|
subcommand "ssh", "ssh to cluster host", SshCommand
|
393
302
|
subcommand "chefrun", "chefrun on a resource pool", ChefrunCommand
|
394
303
|
subcommand "deploy", "deploy on an application", DeployCommand
|
395
|
-
subcommand "balance", "balance services across nodes based on weight", BalanceCommand
|
396
|
-
subcommand "addservice", "add new service to service framework", AddserviceCommand
|
397
|
-
subcommand "delservice", "delete last service", DelserviceCommand
|
398
|
-
subcommand "services", "show all services", ServicesCommand
|
399
|
-
subcommand "svcapi", "manipulate service API keys/metadata", SvcAPI
|
400
304
|
subcommand "rehash", "Regenerate all host metadata. KNOW WHAT THIS DOES BEFORE RUNNING IT", RehashCommand
|
401
305
|
subcommand "runcmd", "Run command on instance", RuncmdCommand
|
402
306
|
|
metadata
CHANGED
@@ -1,98 +1,99 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gaptool-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francesco Laurita
|
8
8
|
- Matt Bailey
|
9
|
+
- Giacomo Bagnoli
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2014-09-
|
13
|
+
date: 2014-09-09 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: json
|
16
17
|
requirement: !ruby/object:Gem::Requirement
|
17
18
|
requirements:
|
18
|
-
- - ~>
|
19
|
+
- - "~>"
|
19
20
|
- !ruby/object:Gem::Version
|
20
21
|
version: '1.8'
|
21
22
|
type: :runtime
|
22
23
|
prerelease: false
|
23
24
|
version_requirements: !ruby/object:Gem::Requirement
|
24
25
|
requirements:
|
25
|
-
- - ~>
|
26
|
+
- - "~>"
|
26
27
|
- !ruby/object:Gem::Version
|
27
28
|
version: '1.8'
|
28
29
|
- !ruby/object:Gem::Dependency
|
29
30
|
name: peach
|
30
31
|
requirement: !ruby/object:Gem::Requirement
|
31
32
|
requirements:
|
32
|
-
- - ~>
|
33
|
+
- - "~>"
|
33
34
|
- !ruby/object:Gem::Version
|
34
35
|
version: '0.5'
|
35
36
|
type: :runtime
|
36
37
|
prerelease: false
|
37
38
|
version_requirements: !ruby/object:Gem::Requirement
|
38
39
|
requirements:
|
39
|
-
- - ~>
|
40
|
+
- - "~>"
|
40
41
|
- !ruby/object:Gem::Version
|
41
42
|
version: '0.5'
|
42
43
|
- !ruby/object:Gem::Dependency
|
43
44
|
name: rainbow
|
44
45
|
requirement: !ruby/object:Gem::Requirement
|
45
46
|
requirements:
|
46
|
-
- - ~>
|
47
|
+
- - "~>"
|
47
48
|
- !ruby/object:Gem::Version
|
48
49
|
version: '2.0'
|
49
50
|
type: :runtime
|
50
51
|
prerelease: false
|
51
52
|
version_requirements: !ruby/object:Gem::Requirement
|
52
53
|
requirements:
|
53
|
-
- - ~>
|
54
|
+
- - "~>"
|
54
55
|
- !ruby/object:Gem::Version
|
55
56
|
version: '2.0'
|
56
57
|
- !ruby/object:Gem::Dependency
|
57
58
|
name: clamp
|
58
59
|
requirement: !ruby/object:Gem::Requirement
|
59
60
|
requirements:
|
60
|
-
- - ~>
|
61
|
+
- - "~>"
|
61
62
|
- !ruby/object:Gem::Version
|
62
63
|
version: '0.6'
|
63
64
|
type: :runtime
|
64
65
|
prerelease: false
|
65
66
|
version_requirements: !ruby/object:Gem::Requirement
|
66
67
|
requirements:
|
67
|
-
- - ~>
|
68
|
+
- - "~>"
|
68
69
|
- !ruby/object:Gem::Version
|
69
70
|
version: '0.6'
|
70
71
|
- !ruby/object:Gem::Dependency
|
71
72
|
name: net-ssh
|
72
73
|
requirement: !ruby/object:Gem::Requirement
|
73
74
|
requirements:
|
74
|
-
- - ~>
|
75
|
+
- - "~>"
|
75
76
|
- !ruby/object:Gem::Version
|
76
77
|
version: '2.9'
|
77
78
|
type: :runtime
|
78
79
|
prerelease: false
|
79
80
|
version_requirements: !ruby/object:Gem::Requirement
|
80
81
|
requirements:
|
81
|
-
- - ~>
|
82
|
+
- - "~>"
|
82
83
|
- !ruby/object:Gem::Version
|
83
84
|
version: '2.9'
|
84
85
|
- !ruby/object:Gem::Dependency
|
85
86
|
name: net-scp
|
86
87
|
requirement: !ruby/object:Gem::Requirement
|
87
88
|
requirements:
|
88
|
-
- - ~>
|
89
|
+
- - "~>"
|
89
90
|
- !ruby/object:Gem::Version
|
90
91
|
version: '1.2'
|
91
92
|
type: :runtime
|
92
93
|
prerelease: false
|
93
94
|
version_requirements: !ruby/object:Gem::Requirement
|
94
95
|
requirements:
|
95
|
-
- - ~>
|
96
|
+
- - "~>"
|
96
97
|
- !ruby/object:Gem::Version
|
97
98
|
version: '1.2'
|
98
99
|
- !ruby/object:Gem::Dependency
|
@@ -101,85 +102,85 @@ dependencies:
|
|
101
102
|
requirements:
|
102
103
|
- - '='
|
103
104
|
- !ruby/object:Gem::Version
|
104
|
-
version: 0.
|
105
|
+
version: 0.4.0
|
105
106
|
type: :runtime
|
106
107
|
prerelease: false
|
107
108
|
version_requirements: !ruby/object:Gem::Requirement
|
108
109
|
requirements:
|
109
110
|
- - '='
|
110
111
|
- !ruby/object:Gem::Version
|
111
|
-
version: 0.
|
112
|
+
version: 0.4.0
|
112
113
|
- !ruby/object:Gem::Dependency
|
113
114
|
name: builder
|
114
115
|
requirement: !ruby/object:Gem::Requirement
|
115
116
|
requirements:
|
116
|
-
- - ~>
|
117
|
+
- - "~>"
|
117
118
|
- !ruby/object:Gem::Version
|
118
119
|
version: '3'
|
119
120
|
type: :runtime
|
120
121
|
prerelease: false
|
121
122
|
version_requirements: !ruby/object:Gem::Requirement
|
122
123
|
requirements:
|
123
|
-
- - ~>
|
124
|
+
- - "~>"
|
124
125
|
- !ruby/object:Gem::Version
|
125
126
|
version: '3'
|
126
127
|
- !ruby/object:Gem::Dependency
|
127
128
|
name: shoulda
|
128
129
|
requirement: !ruby/object:Gem::Requirement
|
129
130
|
requirements:
|
130
|
-
- - ~>
|
131
|
+
- - "~>"
|
131
132
|
- !ruby/object:Gem::Version
|
132
133
|
version: '3'
|
133
134
|
type: :development
|
134
135
|
prerelease: false
|
135
136
|
version_requirements: !ruby/object:Gem::Requirement
|
136
137
|
requirements:
|
137
|
-
- - ~>
|
138
|
+
- - "~>"
|
138
139
|
- !ruby/object:Gem::Version
|
139
140
|
version: '3'
|
140
141
|
- !ruby/object:Gem::Dependency
|
141
142
|
name: rdoc
|
142
143
|
requirement: !ruby/object:Gem::Requirement
|
143
144
|
requirements:
|
144
|
-
- - ~>
|
145
|
+
- - "~>"
|
145
146
|
- !ruby/object:Gem::Version
|
146
147
|
version: '3'
|
147
148
|
type: :development
|
148
149
|
prerelease: false
|
149
150
|
version_requirements: !ruby/object:Gem::Requirement
|
150
151
|
requirements:
|
151
|
-
- - ~>
|
152
|
+
- - "~>"
|
152
153
|
- !ruby/object:Gem::Version
|
153
154
|
version: '3'
|
154
155
|
- !ruby/object:Gem::Dependency
|
155
156
|
name: bundler
|
156
157
|
requirement: !ruby/object:Gem::Requirement
|
157
158
|
requirements:
|
158
|
-
- - ~>
|
159
|
+
- - "~>"
|
159
160
|
- !ruby/object:Gem::Version
|
160
161
|
version: '1'
|
161
162
|
type: :development
|
162
163
|
prerelease: false
|
163
164
|
version_requirements: !ruby/object:Gem::Requirement
|
164
165
|
requirements:
|
165
|
-
- - ~>
|
166
|
+
- - "~>"
|
166
167
|
- !ruby/object:Gem::Version
|
167
168
|
version: '1'
|
168
169
|
- !ruby/object:Gem::Dependency
|
169
170
|
name: simplecov
|
170
171
|
requirement: !ruby/object:Gem::Requirement
|
171
172
|
requirements:
|
172
|
-
- - ~>
|
173
|
+
- - "~>"
|
173
174
|
- !ruby/object:Gem::Version
|
174
175
|
version: '0'
|
175
176
|
type: :development
|
176
177
|
prerelease: false
|
177
178
|
version_requirements: !ruby/object:Gem::Requirement
|
178
179
|
requirements:
|
179
|
-
- - ~>
|
180
|
+
- - "~>"
|
180
181
|
- !ruby/object:Gem::Version
|
181
182
|
version: '0'
|
182
|
-
description:
|
183
|
+
description: "\n gaptool client\n "
|
183
184
|
email:
|
184
185
|
- francesco@gild.com
|
185
186
|
executables:
|
@@ -187,8 +188,8 @@ executables:
|
|
187
188
|
extensions: []
|
188
189
|
extra_rdoc_files: []
|
189
190
|
files:
|
190
|
-
- .document
|
191
|
-
- .gitignore
|
191
|
+
- ".document"
|
192
|
+
- ".gitignore"
|
192
193
|
- Gemfile
|
193
194
|
- LICENSE.txt
|
194
195
|
- README.md
|
@@ -209,12 +210,12 @@ require_paths:
|
|
209
210
|
- lib
|
210
211
|
required_ruby_version: !ruby/object:Gem::Requirement
|
211
212
|
requirements:
|
212
|
-
- -
|
213
|
+
- - ">="
|
213
214
|
- !ruby/object:Gem::Version
|
214
215
|
version: '0'
|
215
216
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
216
217
|
requirements:
|
217
|
-
- -
|
218
|
+
- - ">="
|
218
219
|
- !ruby/object:Gem::Version
|
219
220
|
version: '0'
|
220
221
|
requirements: []
|