rudy 0.2 → 0.2.1
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/rudy/command/release.rb +6 -4
- data/lib/rudy/scm/svn.rb +3 -3
- data/rudy.gemspec +1 -1
- data/support/rudy-ec2-startup +4 -3
- metadata +1 -1
data/lib/rudy/command/release.rb
CHANGED
@@ -18,20 +18,22 @@ module Rudy
|
|
18
18
|
|
19
19
|
raise "The security group #{filter} does not exist" if machine_group && !@ec2.groups.exists?(machine_group)
|
20
20
|
list = @ec2.instances.list(machine_group)
|
21
|
-
raise "Please start an instance in #{machine_group} before releasing!" if list.empty?
|
21
|
+
raise "Please start an instance in #{machine_group} before releasing! (rudy -e stage instances --start)" if list.empty?
|
22
22
|
puts "Creating release from: #{Dir.pwd}"
|
23
23
|
|
24
24
|
tag = @scm.create_release
|
25
25
|
|
26
26
|
machine = list.values.first # NOTE: we're assuming there's only one machine
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
basename = File.basename(@rscripts[keypairname])
|
29
|
+
puts "Running #{basename}..."
|
30
|
+
scp machine[:dns_name], keypairpath, user, @rscripts[keypairname], "/mnt/"
|
31
|
+
ssh machine[:dns_name], keypairpath, user, "chmod 755 /mnt/#{basename} && /mnt/#{basename} #{tag}"
|
31
32
|
|
32
33
|
@user = "rudy"
|
33
34
|
basename = File.basename(@rscripts[keypairname])
|
34
35
|
|
36
|
+
puts "Running #{basename}..."
|
35
37
|
scp machine[:dns_name], keypairpath, user, @rscripts[keypairname], "~/"
|
36
38
|
ssh machine[:dns_name], keypairpath, user, "chmod 755 ~/#{basename} && ~/#{basename} test #{@access_key} #{@secret_key} r1ll1r1ll1"
|
37
39
|
|
data/lib/rudy/scm/svn.rb
CHANGED
@@ -23,7 +23,7 @@ module Rudy
|
|
23
23
|
puts "Creating tag: #{release_tag}"
|
24
24
|
cmd = "svn copy -m 'Another Release by Rudy!' #{release} #{release_tag}"
|
25
25
|
|
26
|
-
`#{cmd}`
|
26
|
+
`#{cmd} 2>&1`
|
27
27
|
|
28
28
|
release_tag
|
29
29
|
end
|
@@ -45,12 +45,12 @@ module Rudy
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def valid_uri?(uri)
|
48
|
-
ret = `svn info #{uri} 2
|
48
|
+
ret = `svn info #{uri} 2>&1` || '' # Valid SVN URIs will return some info
|
49
49
|
(ret =~ /Repository UUID/) ? true : false
|
50
50
|
end
|
51
51
|
|
52
52
|
def everything_checked_in?
|
53
|
-
`svn diff . 2
|
53
|
+
`svn diff . 2>&1` == '' # svn diff should return nothing
|
54
54
|
end
|
55
55
|
end
|
56
56
|
end
|
data/rudy.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
@spec = Gem::Specification.new do |s|
|
2
2
|
s.name = "rudy"
|
3
|
-
s.version = "0.2"
|
3
|
+
s.version = "0.2.1"
|
4
4
|
s.summary = "Rudy is a handy staging and deployment tool for Amazon EC2."
|
5
5
|
s.description = "Rudy is a handy staging and deployment tool for Amazon EC2."
|
6
6
|
s.author = "Delano Mandelbaum"
|
data/support/rudy-ec2-startup
CHANGED
@@ -4,9 +4,6 @@
|
|
4
4
|
# who: delano@solutious.com
|
5
5
|
# when: 2009-02-20 (rev: 3)
|
6
6
|
|
7
|
-
# NOTE: This is a prototype version of this script. A cleaner version
|
8
|
-
# with better documentation is forthcoming.
|
9
|
-
|
10
7
|
# Runs when an ec2 instance startups up.
|
11
8
|
# Grabs configuration from the run time user data and stores it locally.
|
12
9
|
# Expects message data in the yaml format:
|
@@ -26,6 +23,10 @@
|
|
26
23
|
# * cd /etc/rc5.d
|
27
24
|
# * ln -s ../init.d/rudy-ec2-startup S17rudy
|
28
25
|
|
26
|
+
# NOTE: This is a prototype version of this script. A cleaner version
|
27
|
+
# with better documentation is forthcoming.
|
28
|
+
|
29
|
+
|
29
30
|
require 'yaml'
|
30
31
|
require 'resolv'
|
31
32
|
|