judo 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/judo +2 -0
- data/lib/judo/server.rb +10 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.4
|
data/bin/judo
CHANGED
@@ -37,6 +37,7 @@ Usage: judo launch [options] SERVER ...
|
|
37
37
|
|
38
38
|
judo swap [options] SERVER SERVER ## swap elastic IP's and names on the two servers
|
39
39
|
|
40
|
+
judo watch [options] SERVER ## watch the server's boot process
|
40
41
|
judo info [options] [SERVER ...]
|
41
42
|
judo console [options] [SERVER ...] ## shows AWS console output
|
42
43
|
judo ssh [options] [SERVER ...] ## ssh's into the server
|
@@ -117,6 +118,7 @@ begin
|
|
117
118
|
when "volumes" then do_volumes(judo)
|
118
119
|
when "list" then do_list(judo, ARGV)
|
119
120
|
when "groups" then do_groups(judo)
|
121
|
+
when "watch" then find_servers(judo, ARGV) { |s| s.ssh_command("tail -n 1000 -f /var/log/kuzushi.log") }
|
120
122
|
when "info" then find_servers(judo, ARGV) { |s| do_info(judo, s) }
|
121
123
|
when "console" then find_servers(judo, ARGV) { |s| puts s.console_output }
|
122
124
|
when "commit" then find_groups(judo, ARGV) { |g| g.compile }
|
data/lib/judo/server.rb
CHANGED
@@ -460,6 +460,9 @@ module Judo
|
|
460
460
|
`dig +short -x #{elastic_ip}`.strip
|
461
461
|
end
|
462
462
|
|
463
|
+
## TODO: got this error once ---
|
464
|
+
## /Library/Ruby/Gems/1.8/gems/aws-2.3.8/lib/awsbase/right_awsbase.rb:696:in `request_info_impl': VolumeInUse: vol-09c44760 is already attached to an instance (Aws::AwsError)
|
465
|
+
|
463
466
|
def attach_volumes
|
464
467
|
return unless running?
|
465
468
|
volumes.each do |device,volume_id|
|
@@ -486,6 +489,13 @@ module Judo
|
|
486
489
|
volume_id
|
487
490
|
end
|
488
491
|
|
492
|
+
def ssh_command(cmd)
|
493
|
+
wait_for_ssh
|
494
|
+
@base.keypair_file do |file|
|
495
|
+
system "ssh -i #{file} #{config["user"]}@#{hostname} '#{cmd}'"
|
496
|
+
end
|
497
|
+
end
|
498
|
+
|
489
499
|
def connect_ssh
|
490
500
|
wait_for_ssh
|
491
501
|
@base.keypair_file do |file|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 4
|
9
|
+
version: 0.3.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Orion Henry
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-05-
|
17
|
+
date: 2010-05-24 00:00:00 -04:00
|
18
18
|
default_executable: judo
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|