rudy 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,45 +0,0 @@
1
-
2
-
3
- module Rudy
4
- module Command
5
- class Stage < Rudy::Command::Base
6
-
7
-
8
- def push_to_stage
9
-
10
- if @user != "root"
11
- #puts "This command will be run as root"
12
- @user = "root" # We need to be root for this operation!
13
- end
14
-
15
- raise "No EC2 .pem keys provided" unless has_pem_keys?
16
- raise "No SSH key provided for #{keypairname}!" unless has_keypair?(keypairname)
17
- raise "SSH key provided but cannot be found! (#{keypairpath})" unless File.exists?(keypairpath)
18
-
19
- raise "The security group #{filter} does not exist" if machine_group && !@ec2.groups.exists?(machine_group)
20
- list = @ec2.instances.list(machine_group)
21
- raise "Please start an instance in #{machine_group} before releasing! (rudy -e stage instances --start)" if list.empty?
22
- puts "Creating release from: #{Dir.pwd}"
23
-
24
- tag = @scm.create_release_tag
25
-
26
- machine = list.values.first # NOTE: we're assuming there's only one machine
27
-
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}"
32
-
33
- @user = "rudy"
34
- basename = File.basename(@rscripts[keypairname])
35
-
36
- puts "Running #{basename}..."
37
- scp machine[:dns_name], keypairpath, user, @rscripts[keypairname], "~/"
38
- ssh machine[:dns_name], keypairpath, user, "chmod 755 ~/#{basename} && ~/#{basename} #{@access_key} #{@secret_key}"
39
-
40
- end
41
-
42
- end
43
- end
44
- end
45
-
@@ -1,8 +0,0 @@
1
-
2
-
3
-
4
- module Rudy
5
- module MetaData
6
-
7
- end
8
- end
File without changes