rudy 0.6.7 → 0.6.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,6 +7,13 @@ RUDY, CHANGES
7
7
  * TODO: Support for product codes
8
8
  * TODO: HTTPS
9
9
 
10
+
11
+ #### 0.6.8 (2009-04-24) ###############################
12
+
13
+ * CHANGE: Renamed rudy config --rudy option to --project. This was important
14
+ to maintain consistency in documentation.
15
+ * CHANGE: Cleaned README. See: http://wiki.github.com/solutious/rudy
16
+
10
17
  #### 0.6.7 (2009-04-22) ###############################
11
18
 
12
19
  * ADDED: rudy-ec2 status can now display EU status
@@ -1,6 +1,8 @@
1
1
  = Rudy - v0.6 ALPHA
2
2
 
3
- Rudy is a command-line development and deployment tool for Amazon Web Services. It helps you build and manage machines in EC2 by organizing them into groups of _environments_ and _roles_. These are called _machine_ _groups_. <tt>stage</tt> is the default environment and <tt>app</tt> is the default role. You can run multiple machines with the same role. These are called _positions_. Rudy also supports running machine groups across availability _zones_.
3
+ *Rudy is a command-line development and deployment tool for Amazon Web Services.*
4
+
5
+ It helps you build and manage machines in EC2 by organizing them into groups of _environments_ and _roles_. These are called _machine_ _groups_. <tt>stage</tt> is the default environment and <tt>app</tt> is the default role. You can run multiple machines with the same role. These are called _positions_. Rudy also supports running machine groups across availability _zones_.
4
6
 
5
7
  When you put all this together, you have a unique name for every machine. The default machine is:
6
8
 
@@ -10,70 +12,41 @@ When you put all this together, you have a unique name for every machine. The de
10
12
  ^ ^
11
13
  "machine" position
12
14
 
13
- All configuration is organized into the zones, environments, and roles that you specify (Rudy assumes positions are identical which is important for backups and scaling). And as you'd expect, the defaults can be changed too (in <tt>~/.rudy/config</tt>). See below for usage examples.
15
+ All configuration is organized into the zones, environments, and roles that you specify (Rudy assumes positions are identical which is important for backups and scaling). And as you'd expect, the defaults can be changed too (in <tt>~/.rudy/config</tt>).
14
16
 
15
- <b>NOTE: This is an ALPHA release. That means Rudy's not ready for production use! See Alpha Warning.</b>
17
+ <b>NOTE: This is an ALPHA release. That means Rudy's not ready for production use! See Alpha Notice.</b>
16
18
 
17
19
  == Features
18
20
 
19
- * Single command startup and shutdown
20
- * Automatic disk creation. Define disks with a DSL and Rudy does the dirty work (creates EBS volume, attach to instance, format, and mount).
21
- * Supports any Amazon machine image (AMI) (Windows images should work but need more testing)
22
- * Complete command-line interface for EC2 (a replacement for Amazon's API tools). See bin/rudy-ec2.
23
- * Basic command-line interface for SDB and S3 (create and delete buckets and volumes). See bin/rudy-sdb and bin/rudy-s3.
24
-
21
+ * Create complex environments with a single command
22
+ * Launch multiple instances
23
+ * Assign elastic IP addresses
24
+ * Create EBS volumes, attach to instances, format, and mount
25
+ * Run scripts locally and remotely automatically
26
+ * Supports any Amazon machine image (AMI)
27
+ * Complete command-line interface for EC2. See <tt>bin/rudy-ec2</tt>.
25
28
 
26
29
  == Installation
27
30
 
28
- === Step 1 of 2 (get Rudy on to your machine):
29
-
30
31
  Via Rubygems, one of:
31
32
 
32
33
  $ sudo gem install rudy
33
34
  $ sudo gem install solutious-rudy --source http://gems.github.com/
34
35
 
35
36
  or via download:
36
- * rudy-0.6.6.tar.gz[http://github.com/solutious/rudy/tarball/rudy-0.6.6]
37
- * rudy-0.6.6.zip[http://github.com/solutious/rudy/zipball/rudy-0.6.6]
37
+ * rudy-latest.tar.gz[http://github.com/solutious/rudy/tarball/rudy-latest]
38
+ * rudy-latest.zip[http://github.com/solutious/rudy/zipball/rudy-latest]
38
39
 
39
40
  NOTE: <em>If you are not installing via RubyGems, you need to make sure the dependencies are in your LOAD_PATH (<tt>$:</tt>). Ryan Tomayko wrote a gist[http://gist.github.com/54177] about it.</em>
40
41
 
41
- === Step 2 of 2 (initialize your configuration):
42
-
43
- $ rudy generate-config
44
- [edit ~/.rudy/config with your Amazon Web Services credentials]
45
- $ rudy init
46
-
47
- NOTE: <em>You need an Amazon[http://aws.amazon.com/] account to use Rudy. Sign up for EC2[http://aws.amazon.com/ec2/], SimpleDB[http://aws.amazon.com/simpledb/], and S3[http://aws.amazon.com/s3/]</em>
48
-
49
-
50
- == Example -- Launch a Machine Group
51
-
52
- Machine groups are named after the current environment and role. The default machine group is <tt>stage-app</tt>. In this example, Rudy will create the default machine group from scratch.
53
-
54
- <b>Note: Make sure your <tt>~/.rudy/config</tt> contains your AWS credentials</b>
55
-
56
- We need to tell Rudy what this machine group should look like. We can generate a default machine configuration with this command:
57
-
58
- $ rudy config --rudy > Rudyfile
59
-
60
- This will generate a config file called <tt>Rudyfile</tt> which contains a default machines and routines configuration. The machine configuration describes the "physical" characteristics of your machine groups. The routine configuration describes what happens when you startup and shutdown a machine group (Rudy refers to these as _routines_).
61
-
62
- We can launch the default machine group (stage-app) with this command:
42
+ See Getting-Started[http://wiki.github.com/solutious/rudy/getting-started] for more info.
63
43
 
64
- $ rudy startup
65
-
66
- You now have a new EC2 instance called <tt>m-us-east-1b-stage-app-01</tt> to work with. You can log into it with:
67
-
68
- $ rudy -u root ssh
69
-
70
- The <tt>-u root</tt> tells Rudy to open a connection as the root user. If you create an account on that instance, you can login as that user too. When you don't feel like paying for the instance you can run the following command to destroy it forever:
71
-
72
- $ rudy shutdown
73
-
74
-
75
- == Dependencies:
44
+ == Pre-Requisites
76
45
 
46
+ * Amazon AWS[http://aws.amazon.com/] Account
47
+ * EC2[http://aws.amazon.com/ec2/]
48
+ * SimpleDB[http://aws.amazon.com/simpledb/]
49
+ * S3[http://aws.amazon.com/s3/]
77
50
  * OpenSSH[http://www.openssh.com/]
78
51
  * Ruby 1.8.x, 1.9.x, or JRuby 1.2
79
52
  * Net::SSH[http://net-ssh.rubyforge.org/]
@@ -85,20 +58,9 @@ The <tt>-u root</tt> tells Rudy to open a connection as the root user. If you cr
85
58
  * Caesars[http://github.com/delano/caesars]
86
59
 
87
60
 
88
- == Common Errors
89
-
90
- * <tt>"fingerprint ... does not match for 'ec2-11-22-33-44.compute-1.amazonaws.com,11.22.33.44'"</tt>
91
- * This means the host SSH key for that machine does not match your +~/.ssh/known_hosts+ file. Most EC2 images generate new host SSH keys on the first boot so is the most likely cause for this error message (it's safe to continue). If this is not a new instance, you should tell Rudy not to continue and investigate manually.
92
- * <tt>"`require': no such file to load -- logger (LoadError)"</tt>
93
- * You're probably running a mix of Rubygem and non-Rubygem libraries. Ryan Tomayko has you covered: http://gist.github.com/54177
94
- * <tt>"The request signature we calculated does not match the signature you provided."</tt>
95
- * Check that your Amazon Web Service access key and secret key are correct
96
- * <tt>"AWS was not able to validate the provided access credentials"</tt>
97
- * If it's a new Amazon Account, you need to sign up for EC2, SDB, and S3.
61
+ == Alpha Notice
98
62
 
99
- == Alpha Warning
100
-
101
- Although Rudy has been well tested and is currently being used in production in a private beta, it's not ready for general production use. There are a few things to keep in mind while Rudy is in alpha status.
63
+ Rudy has been well tested and is currently being used in production in a private beta, but it's not ready for general production use. There are a few things to keep in mind while Rudy is in alpha status.
102
64
 
103
65
  * If you already have private SSH keys, back them up. Rudy is quite safe but hasn't been audited so backup your keys as a precaution.
104
66
  * If you're running EC2 instances in production, create a new set of AWS credentials (access key and secret key) to use with Rudy. This will ensure that Rudy has no access to your production instances.
@@ -107,30 +69,33 @@ Although Rudy has been well tested and is currently being used in production in
107
69
 
108
70
  == More Info
109
71
 
110
- * Rudy-Introduction[http://blog.solutious.com/2009/04/21/rudy-deployment-introduction/]
111
72
  * GitHub[http://github.com/solutious/rudy]
73
+ * Documentation[http://wiki.github.com/solutious/rudy]
112
74
  * Issues[http://github.com/solutious/rudy/issues]
113
- * RubyForge[http://rubyforge.org/projects/rudy]
114
75
  * Inspiration[http://www.youtube.com/watch?v=CgaiIW5Rzes]
115
76
 
116
-
117
77
  == Thanks
118
78
 
119
- * The Rilli.com[http://rilli.com] team -- for the initial use case, the ongoing feedback and support, and the good times!
79
+ * The Rilli.com[http://rilli.com] team
120
80
  * Adam Bognar
121
81
  * Andrew Simpson
122
82
  * Caleb Buxton
123
83
  * Colin Brumelle
84
+ * Sam Aaron
124
85
  * Everyone at Utrecht.rb[http://groups.google.com/group/utrecht-rb]
125
- * Jamis Buck for writing Net::SSH and friends.
86
+ * Jamis Buck for Net::SSH and friends
126
87
  * Keshia Knight Pulliam
127
88
 
89
+ == Contributions
90
+
91
+ I'm very open to contributions! For bigger features please fork the git repo and send me a pull request. For small or single file changes, send me an email with the details <tt>delano@solutious.com</tt>
92
+
128
93
 
129
94
  == Credits
130
95
 
96
+ * Delano Mandelbaum (delano@solutious.com)
131
97
  * Rudy::AWS::SDB adapted from aws_sdb by Tim Dysinger (http://dysinger.net)
132
98
  * Escape, Copyright (C) 2006,2007 Tanaka Akira <akr@fsij.org>
133
- * Delano Mandelbaum (delano@solutious.com)
134
99
 
135
100
 
136
101
  == License
data/Rudyfile CHANGED
@@ -50,26 +50,23 @@ machines do
50
50
  ami "ami-5394733a" # ec2onrails/ec2onrails-v0_9_9_1-i386.manifest.xml
51
51
  size 'm1.small'
52
52
 
53
-
54
53
  role :app do
55
54
  positions 1
56
55
  #addresses '11.22.33.44', '55.66.77.88'
57
56
 
58
- # We define two disks for the stage-app machines
57
+ # You can define disks for the stage-app machines. Rudy uses
58
+ # this configuration when it executes a routine (see below).
59
59
  disks do
60
60
  path "/rudy/disk1" do
61
61
  size 2
62
62
  device "/dev/sdr"
63
63
  end
64
- path "/rudy/disk2" do
65
- size 1
66
- device "/dev/sdm"
67
- end
68
64
  end
69
65
 
70
66
  end
71
67
 
72
- # Here are some examples of other roles. These can be anything.
68
+ # Here are some examples of other roles. You can use these or
69
+ # remove them and create your own.
73
70
  role :db do
74
71
  end
75
72
 
@@ -100,23 +97,23 @@ routines do
100
97
  env :stage do
101
98
  role :app do
102
99
 
103
- startup do
104
- before_local Rudy.sysinfo.user => :uname
105
-
100
+ # This routine will be executed when you run "rudy startup"
101
+ startup do
106
102
  disks do
103
+ # Rudy creates an EBS volume for each instance, attaches
104
+ # it, gives it a filesystem, and mounts it.
107
105
  create "/rudy/disk1"
108
106
  end
109
-
110
- after :root => [:uname, :a]
107
+ # You can execute a shell command on each instance after
108
+ # it's created. This touch command will run as root.
111
109
  after :root => [:touch, '/rudy/disk1/rudy-was-here']
112
- after_local Rudy.sysinfo.user => :date
113
110
  end
114
111
 
112
+ # This routine will be executed when you run "rudy shutdown"
115
113
  shutdown do
116
114
  before :root => '/a/nonexistent/script'
117
- before :root => :uptime
118
-
119
115
  disks do
116
+ # Rudy unounts the EBS volume and deletes it. Careful!
120
117
  destroy "/rudy/disk1"
121
118
  end
122
119
  end
data/bin/rudy CHANGED
@@ -83,9 +83,9 @@ class RudyCLI < Rudy::CLI::Base
83
83
  desc "Check Rudy configuration."
84
84
  option :l, :all, "Display configs for all machines"
85
85
  option :s, :script, "Output configuration identical to what is provided to scripts called in routines"
86
- option :r, :rudy, "Output a skeleton Rudyfile"
87
- option :d, :defaults, "Display the default value for the supplied parameter"
88
- option :g, :group, String, "Display configuration for a specific group"
86
+ option :p, :project, "Output a skeleton Rudyfile"
87
+ #option :d, :defaults, "Display the default value for the supplied parameter"
88
+ #option :g, :group, String, "Display configuration for a specific group"
89
89
  argv :name
90
90
  command :config => Rudy::CLI::Config
91
91
 
@@ -11,6 +11,9 @@ require 'highline'
11
11
  #
12
12
  # Like your annoying friend that asks you questions all the time.
13
13
  #
14
+ # Rudy uses Annoy to present the user with a simple question before
15
+ # continuing with a destructive action.
16
+ #
14
17
  class Annoy
15
18
 
16
19
  attr_accessor :factor
@@ -65,7 +65,7 @@ module Rudy
65
65
  unless defined?(MAJOR)
66
66
  MAJOR = 0.freeze
67
67
  MINOR = 6.freeze
68
- TINY = 7.freeze
68
+ TINY = 8.freeze
69
69
  end
70
70
  def self.to_s; [MAJOR, MINOR, TINY].join('.'); end
71
71
  def self.to_f; self.to_s.to_f; end
@@ -46,8 +46,8 @@ module Rudy
46
46
  else
47
47
  if @option.all
48
48
  puts "# ACCOUNTS: not displayed"
49
- puts "# MACHINES: "
50
49
  if @@config.machines?
50
+ puts "# MACHINES: "
51
51
  y @@config.machines.to_hash
52
52
  end
53
53
  if @@config.routines?
@@ -58,7 +58,7 @@ module Rudy
58
58
  y @@config.defaults.to_hash
59
59
  elsif @option.script
60
60
  y fetch_script_config.to_hash
61
- elsif @option.rudy
61
+ elsif @option.project
62
62
  rf = File.join(RUDY_HOME, 'Rudyfile')
63
63
  raise "Cannot find: #{rf}" unless File.exists?(rf)
64
64
  puts File.read(rf)
@@ -12,6 +12,7 @@ class SystemInfo < Storable
12
12
 
13
13
  # These are for JRuby, System.getproperty('os.name').
14
14
  # For a list of all values, see: http://lopica.sourceforge.net/os.html
15
+ #regexp matcher os implementation
15
16
  [/mac\s*os\s*x/i, :unix, :osx ],
16
17
  [/sunos/i, :unix, :solaris ],
17
18
  [/windows\s*ce/i, :win32, :windows ],
@@ -21,21 +22,21 @@ class SystemInfo < Storable
21
22
  # TODO: implement other windows matches: # /djgpp|(cyg|ms|bcc)win|mingw/ (from mongrel)
22
23
 
23
24
  # These are for RUBY_PLATFORM and JRuby
24
- [/java/i, :java, :java ],
25
- [/darwin/i, :unix, :osx ],
26
- [/linux/i, :unix, :linux ],
27
- [/freebsd/i, :unix, :freebsd ],
28
- [/netbsd/i, :unix, :netbsd ],
29
- [/solaris/i, :unix, :solaris ],
30
- [/irix/i, :unix, :irix ],
31
- [/cygwin/i, :unix, :cygwin ],
32
- [/mswin/i, :win32, :windows ],
33
- [/mingw/i, :win32, :mingw ],
34
- [/bccwin/i, :win32, :bccwin ],
35
- [/wince/i, :win32, :wince ],
36
- [/vms/i, :vms, :vms ],
37
- [/os2/i, :os2, :os2 ],
38
- [nil, :unknown, :unknown ],
25
+ [/java/i, :java, :java ],
26
+ [/darwin/i, :unix, :osx ],
27
+ [/linux/i, :unix, :linux ],
28
+ [/freebsd/i, :unix, :freebsd ],
29
+ [/netbsd/i, :unix, :netbsd ],
30
+ [/solaris/i, :unix, :solaris ],
31
+ [/irix/i, :unix, :irix ],
32
+ [/cygwin/i, :unix, :cygwin ],
33
+ [/mswin/i, :win32, :windows ],
34
+ [/mingw/i, :win32, :mingw ],
35
+ [/bccwin/i, :win32, :bccwin ],
36
+ [/wince/i, :win32, :wince ],
37
+ [/vms/i, :vms, :vms ],
38
+ [/os2/i, :os2, :os2 ],
39
+ [nil, :unknown, :unknown ],
39
40
  ].freeze
40
41
 
41
42
  ARCHITECTURES = [
@@ -1,7 +1,7 @@
1
1
  @spec = Gem::Specification.new do |s|
2
2
  s.name = "rudy"
3
3
  s.rubyforge_project = 'rudy'
4
- s.version = "0.6.7"
4
+ s.version = "0.6.8"
5
5
  s.summary = "Rudy: Not your grandparent's deployment tool."
6
6
  s.description = s.summary
7
7
  s.author = "Delano Mandelbaum"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rudy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.7
4
+ version: 0.6.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delano Mandelbaum
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-22 00:00:00 -04:00
12
+ date: 2009-04-24 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency