rudy 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. data/CHANGES.txt +32 -17
  2. data/README.rdoc +74 -40
  3. data/bin/rudy +66 -10
  4. data/bin/rudy-ec2 +3 -1
  5. data/examples/authorize.rb +15 -0
  6. data/examples/gem-test.rb +11 -5
  7. data/examples/solaris.rb +35 -0
  8. data/examples/windows.rb +101 -0
  9. data/lib/rudy.rb +7 -1
  10. data/lib/rudy/aws.rb +2 -2
  11. data/lib/rudy/aws/ec2.rb +29 -22
  12. data/lib/rudy/aws/ec2/group.rb +1 -1
  13. data/lib/rudy/aws/ec2/image.rb +1 -29
  14. data/lib/rudy/aws/ec2/instance.rb +4 -32
  15. data/lib/rudy/aws/ec2/keypair.rb +1 -6
  16. data/lib/rudy/aws/ec2/snapshot.rb +2 -20
  17. data/lib/rudy/aws/ec2/volume.rb +11 -19
  18. data/lib/rudy/aws/ec2/zone.rb +1 -6
  19. data/lib/rudy/aws/sdb.rb +1 -1
  20. data/lib/rudy/cli/aws/ec2/addresses.rb +4 -10
  21. data/lib/rudy/cli/aws/ec2/groups.rb +0 -1
  22. data/lib/rudy/cli/aws/ec2/images.rb +1 -4
  23. data/lib/rudy/cli/aws/ec2/info.rb +63 -0
  24. data/lib/rudy/cli/aws/ec2/instances.rb +3 -5
  25. data/lib/rudy/cli/aws/ec2/keypairs.rb +3 -5
  26. data/lib/rudy/cli/aws/ec2/snapshots.rb +2 -6
  27. data/lib/rudy/cli/aws/ec2/zones.rb +2 -4
  28. data/lib/rudy/cli/backups.rb +20 -9
  29. data/lib/rudy/cli/base.rb +60 -3
  30. data/lib/rudy/cli/candy.rb +1 -1
  31. data/lib/rudy/cli/disks.rb +65 -7
  32. data/lib/rudy/cli/execbase.rb +0 -2
  33. data/lib/rudy/cli/images.rb +97 -0
  34. data/lib/rudy/cli/info.rb +48 -0
  35. data/lib/rudy/cli/keypairs.rb +43 -0
  36. data/lib/rudy/cli/machines.rb +41 -36
  37. data/lib/rudy/cli/networks.rb +68 -0
  38. data/lib/rudy/cli/routines.rb +3 -10
  39. data/lib/rudy/config/objects.rb +0 -1
  40. data/lib/rudy/disks.rb +4 -0
  41. data/lib/rudy/global.rb +1 -1
  42. data/lib/rudy/huxtable.rb +9 -3
  43. data/lib/rudy/machines.rb +1 -1
  44. data/lib/rudy/metadata.rb +4 -1
  45. data/lib/rudy/metadata/backup.rb +2 -2
  46. data/lib/rudy/metadata/disk.rb +7 -4
  47. data/lib/rudy/metadata/machine.rb +66 -2
  48. data/lib/rudy/routines.rb +2 -1
  49. data/lib/rudy/routines/base.rb +4 -157
  50. data/lib/rudy/routines/handlers/base.rb +6 -3
  51. data/lib/rudy/routines/handlers/disks.rb +127 -42
  52. data/lib/rudy/routines/handlers/group.rb +45 -10
  53. data/lib/rudy/routines/handlers/host.rb +16 -10
  54. data/lib/rudy/routines/handlers/keypair.rb +26 -10
  55. data/lib/rudy/routines/handlers/rye.rb +171 -0
  56. data/lib/rudy/routines/handlers/script.rb +2 -1
  57. data/lib/rudy/routines/passthrough.rb +2 -2
  58. data/lib/rudy/routines/reboot.rb +2 -2
  59. data/lib/rudy/routines/shutdown.rb +2 -2
  60. data/lib/rudy/routines/startup.rb +4 -2
  61. data/rudy.gemspec +17 -10
  62. data/tryouts/10_require_time/10_rudy_tryouts.rb +1 -1
  63. data/tryouts/12_config/20_defaults_tryouts.rb +1 -1
  64. data/tryouts/12_config/40_machines_tryouts.rb +1 -1
  65. data/tryouts/15_huxtable/20_user_tryouts.rb +1 -1
  66. data/tryouts/25_ec2/10_keypairs_tryouts.rb +1 -0
  67. data/tryouts/30_metadata/10_include_tryouts.rb +1 -1
  68. data/tryouts/30_metadata/13_object_tryouts.rb +4 -0
  69. data/tryouts/30_metadata/50_disk_tryouts.rb +4 -2
  70. data/tryouts/30_metadata/51_disk_digest_tryouts.rb +1 -1
  71. data/tryouts/30_metadata/53_disk_list_tryouts.rb +2 -1
  72. data/tryouts/30_metadata/56_disk_volume_tryouts.rb +1 -1
  73. data/tryouts/30_metadata/60_backup_tryouts.rb +4 -2
  74. data/tryouts/30_metadata/63_backup_list_tryouts.rb +1 -1
  75. data/tryouts/30_metadata/64_backup_disk_tryouts.rb +3 -1
  76. data/tryouts/30_metadata/66_backup_snapshot_tryouts.rb +1 -1
  77. data/tryouts/30_metadata/70_machine_tryouts.rb +5 -2
  78. data/tryouts/30_metadata/73_machine_list_tryouts.rb +1 -1
  79. data/tryouts/30_metadata/76_machine_instance_tryouts.rb +15 -3
  80. data/tryouts/30_metadata/77_machines_tryouts.rb +1 -1
  81. data/tryouts/40_routines/10_keypair_handler_tryouts.rb +6 -5
  82. data/tryouts/40_routines/11_group_handler_tryouts.rb +1 -1
  83. metadata +14 -7
  84. data/lib/rudy/cli/status.rb +0 -60
@@ -1,6 +1,37 @@
1
1
  RUDY, CHANGES
2
2
 
3
3
 
4
+ #### 0.9.2 (2009-08-25) ###########################
5
+
6
+ * FIXED: Threading error in Net::HTTP by forcing a mutex during AWS::EC2 requests
7
+ * FIXED: errors when washing backups
8
+ * FIXED: Host.is_available? now checks port 3389 (Remote Desktop) for Windows instances. Closes GH-16
9
+ * FIXED: "rudy machines -T" now checks port 3389 for Windows instances. Closes GH-21
10
+ * FIXED: "rudy disks -l" doesn't display disks from a different zone. Closes GH-24
11
+ * FIXED: Rudy::Machine#refresh! now correctly refreshes metadata
12
+ * FIXED: startup, shutdown, and reboot routines don't run correctly as dependencies. Closes GH-25
13
+ * FIXED: Rogue "No machines configuration" error when accessing current_machine_address
14
+ * CHANGE: Increased AWS timeout to 30 seconds. Closes GH-19
15
+ * CHANGE: Increased boot wait time for windows instances to 500 seconds.
16
+ * CHANGE: Module names have changed from EC2 to AWS::EC2 in amazon-ec2 0.5 [Dominic Cleal]
17
+ * CHANGE: Rudy::Routines::Handlers::Disks.attach now creates a volume if the disk doesn't already have one.
18
+ * CHANGE: Standardized CLI outut for rudy-ec2 (except groups b/c of weird YAML error)
19
+ * CHANGE: Windows "os" is now referred to by :windows rather than :win32 (SysInfo 0.7)
20
+ * CHANGE: Renamed "rudy status" to "rudy info"
21
+ * ADDED: Rudy::Machine#get_console, Rudy::Machine#get_password
22
+ * ADDED: Rudy::Machine#windows?, Rudy::Machine#linux?, Rudy::Machine#solaris?, Rudy::Machine#os?
23
+ * ADDED: "rudy m -console" and "rudy m --password"
24
+ * ADDED: "rudy keypairs"
25
+ * ADDED: "rudy networks --authorize"
26
+ * ADDED: "rudy networks --revoke"
27
+ * ADDED: "rudy disks --create"
28
+ * ADDED: "rudy disks --destroy"
29
+ * ADDED: "rudy backups --create"
30
+ * ADDED: Support for attaching and formating disks in Windows.
31
+ * ADDED: "rudy-ec2 info"
32
+ * ADDED: Re-enabled networks action to routines config (see examples/jira.rb)
33
+
34
+
4
35
  #### 0.9.1 (2009-08-05) ###########################
5
36
 
6
37
  * FIXED: "rudy init" now exits with 0
@@ -95,7 +126,7 @@ NOTE: This is a significant re-write from 0.8 (primarily the routines, metadata)
95
126
 
96
127
  #### 0.8.5 (2009-06-08) ###############################
97
128
 
98
- * FIXED: Bug in DiskHelper. mount method tried to attach when already attached.
129
+ * FIXED: Bug in DiskHandler. mount method tried to attach when already attached.
99
130
  * CHANGE: rudy config now displays account info (but keeps secret key hidden)
100
131
  * CHANGE: defaults configuration has been removed from the default ~/.rudy/config.
101
132
  It is now recommended to put it in the same place as machines, routines config.
@@ -326,20 +357,4 @@ NOTE: This is a complete re-write from 0.1
326
357
  * Initial public release
327
358
 
328
359
 
329
- #### TODO ###########################################
330
-
331
- * TODO: Supply dns values in machines config
332
- * TODO: Rudy::Routines::Arcade.
333
- * install/uninstall: uses package management for the specific os impl
334
- * compile: from source.
335
- * e.g. rudy -a experimental install git (for ruby-unix-osx)
336
- * How to handle multiple package managers?
337
- * How to handle multiple app versions?
338
- * TODO: http://opensoul.org/2009/6/24/capistrano-git-and-ssh-keys
339
- * TODO: look for config file in ./.rudy, then ../.rudy, etc... (git-like)
340
- * TODO: FIX: When shutting down, warns about disks even when they don't exist (CLI::Routines)
341
- * TODO: Investigate SSH daemon on Windows
342
- * TODO: Supply machines config to routines blocks with only the specific machine group context
343
-
344
-
345
360
 
@@ -1,63 +1,89 @@
1
- = Rudy - v0.9.0 BETA
1
+ = Rudy - v0.9 BETA
2
2
 
3
3
  <b>Not your grandparents' EC2 deployment tool.</b>
4
4
 
5
- Rudy is a development and deployment tool for Amazon Web Services. It helps you build and infrastructures in EC2 by organizing them into groups of _zones_, _environments_, and _roles_. You can run multiple machines with the same role. When you put all this together, you have a unique name for every machine. The default machine is called <tt>m-us-east-1b-stage-app-01</tt> but you can also give them custom names.
5
+ Rudy is a development and deployment tool for EC2. It helps you build and maintain infrastructures by organizing them into groups of _zones_, _environments_, and _roles_. By making it quick and easy to build infrastructures, Rudy makes it feasible to run environments only for the time that you need them.
6
6
 
7
- 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.
8
-
9
- <b>See Getting-Started[http://solutious.com/projects/rudy/getting-started/] for more info.</b>
7
+ All configuration is organized into this hierarchy so you can define properties (machine image, machine type, IP address, etc...) by role, by environment, or by zone. You can also define routines for running shell commands and scripts, uploading files, creating disks and backups, etc... Routines are organized by hierarchy too so a "startup" routine can run one thing for your database machines and another thing for your application machines.
10
8
 
9
+ Rudy helps with other stuff too. Every machine can be given a hostname based on its zone, environment, role, and position (you can run multiple machines with the same role). These names look like this: <tt>m-us-east-1b-stage-app-01</tt>, but you can also assign your own names. Rudy also automatically creates a private keypair and security for each machine group (e.g. <tt>key-us-east-1b-stage-app</tt> and <tt>grp-us-east-1b-stage-app</tt>).
11
10
 
12
- == Project Status
11
+ <b>Get-Started[http://solutious.com/projects/rudy/getting-started/] with Rudy now.</b>
13
12
 
14
- <em>This is a BETA release. That means Rudy's not ready for production use! See Project-Status[http://wiki.github.com/solutious/rudy/project-status].</em>
15
13
 
16
- The 0.9 release is a major re-write and has many changes from previous releases. 0.9-RC1 is the first public release from the 0.9 branch and much of the code has not been tested. DO NOT USE IN PRODUCTION. Try it out have some fun and if you have the time send a patch or pull request!
14
+ == Configuration
17
15
 
16
+ Rudy is configured via several Ruby-based domain specific languages.
18
17
 
19
- == Configuration
20
18
 
21
19
  === Machines
22
20
 
23
21
  The machines configuration describes the "physical" characteristics of your infrastructure.
24
22
 
25
- env :stage do # Define an environment
26
- ami 'ami-e348af8a'
23
+ machines do
24
+ env :stage do # Define an environment
25
+ ami 'ami-e348af8a' # Specify a machine image
26
+
27
+ role :app do # Define a role
28
+ addresses '11.22.33.44' # Use elastic IPs
27
29
 
28
- role :app do # Define a role
29
- addresses '11.22.33.44' # Use elastic IPs
30
-
31
- disks do # Define EBS volumes
32
- path "/rudy/disk1" do
33
- size 100
34
- device "/dev/sdr"
35
- end
30
+ disks do # Define EBS volumes
31
+ path "/rudy/disk1" do
32
+ size 100
33
+ device "/dev/sdr"
34
+ end
35
+ end
36
36
  end
37
+
37
38
  end
38
39
  end
39
-
40
+
40
41
  === Routines
41
42
 
42
43
  The routines configuration describes repeatable processes that you can execute on your machines.
43
44
 
44
- startup do # $ rudy startup
45
- adduser :rudy
46
- authorize :rudy # Enable passwordless login
45
+ routines do
46
+
47
+ startup do # $ rudy startup
48
+ adduser :rudy
49
+ authorize :rudy # Enable passwordless login
47
50
 
48
- disks do
49
- create "/rudy/disk1" # Create a disk
50
- end
51
+ disks do
52
+ create "/rudy/disk1" # Create, format, and mount a volume
53
+ end
51
54
 
52
- remote :rudy do # Run remote commands via SSH
53
- mkdir :p, "great" # $ mkdir -p great
54
- touch "great/scott" # $ touch great/scott
55
- mysql_init :start
56
- end
55
+ remote :rudy do # Run remote commands via SSH
56
+ mkdir :p, "great" # $ mkdir -p great
57
+ mysql_init :start
58
+ your_script 'arg1', 'arg2' # Call your own scripts
59
+ end
60
+ end
61
+
57
62
  end
63
+
64
+ See Rudyfile[http://github.com/solutious/rudy/raw/master/Rudyfile] for a complete configuration example.
58
65
 
59
66
 
67
+ == Running Commands
60
68
 
69
+ Rudy comes with a command-line tool called <tt>rudy</tt>. It provides commands for describing the infrastructures you've built with Rudy.
70
+
71
+ $ rudy machines
72
+ m-us-east-1d-stage-app-01: ec2-67-202-0-112.compute-1.amazonaws.com
73
+ m-us-east-1d-stage-app-02: ec2-174-129-117-30.compute-1.amazonaws.com
74
+
75
+ $ rudy disks
76
+ disk-us-east-1d-stage-app-01-rudy-disk1
77
+ disk-us-east-1d-stage-app-02-rudy-disk1
78
+
79
+ $ rudy backups
80
+ back-us-east-1d-stage-app-01-rudy-disk1-20090803-1857-49
81
+ back-us-east-1d-stage-app-01-rudy-disk1-20090803-1858-36
82
+ back-us-east-1d-stage-app-02-rudy-disk1-20090803-1911-05
83
+
84
+ See <tt>rudy -h</tt> for more info.
85
+
86
+
61
87
  == Features
62
88
 
63
89
  * Create complex IT infrastructures from a simple configuration
@@ -69,9 +95,15 @@ The routines configuration describes repeatable processes that you can execute o
69
95
  * Powerful command-line tools
70
96
  * <tt>$ rudy -u root ssh</tt>
71
97
  * <tt>$ rudy -e testing -r database backup-mysql</tt>
72
- * Use _any Linux_ Amazon machine image (AMI) (partial Solaris support)
98
+ * Use _any Linux_ Amazon machine image (AMI) (partial Windows and Solaris support)
73
99
  * Complete command-line interface for EC2. See <tt>bin/rudy-ec2</tt>.
74
100
 
101
+
102
+ == Project Status
103
+
104
+ <em>This is a BETA release. That means Rudy is not ready for production use! See Project-Status[http://wiki.github.com/solutious/rudy/project-status].</em>
105
+
106
+
75
107
  == Installation
76
108
 
77
109
  Via Rubygems:
@@ -113,6 +145,7 @@ NOTE: <em>If you are not installing via RubyGems, you need to make sure the depe
113
145
  * Linux: Ruby 1.8, 1.9, and JRuby 1.3+
114
146
  * Windows: Ruby 1.8 and JRuby 1.3+ (Net::SSH does not run under Ruby 1.9)
115
147
  * BSD: <i>Needs testing (any takers?)</i>
148
+
116
149
 
117
150
  == More Info
118
151
 
@@ -124,6 +157,14 @@ NOTE: <em>If you are not installing via RubyGems, you need to make sure the depe
124
157
  * For all other inquires, email me directly: delano (@solutious.com)
125
158
 
126
159
 
160
+ == Contributions
161
+
162
+ We encourage people to find unique and interesting ways to break and extend rudy.
163
+
164
+ * For bigger features please fork the git repo and send me a pull request.
165
+ * For small or single file changes, send an email with details to: delano (@solutious.com)
166
+
167
+
127
168
  == Thanks
128
169
 
129
170
  * Kalin Harvey for all the feedback
@@ -141,16 +182,9 @@ NOTE: <em>If you are not installing via RubyGems, you need to make sure the depe
141
182
  * Marcel Molina Jr. for aws-s3
142
183
  * Keshia Knight Pulliam
143
184
 
144
-
145
- == Contributions
146
-
147
- * For bigger features please fork the git repo and send me a pull request.
148
- * For small or single file changes, send me an email with the details: Delano (@solutious.com)
149
-
150
-
151
185
  == Credits
152
186
 
153
- * Delano Mandelbaum (delano@solutious.com)
187
+ * Delano Mandelbaum ( http://solutious.com/ )
154
188
  * Rudy::AWS::SDB adapted from aws_sdb by Tim Dysinger (http://dysinger.net)
155
189
 
156
190
 
data/bin/rudy CHANGED
@@ -20,6 +20,8 @@ require 'rudy/cli'
20
20
  # Command-line interface for /bin/rudy
21
21
  class RudyCLI < Rudy::CLI::Base
22
22
 
23
+ debug :off
24
+
23
25
  default :machines # when no command is provided
24
26
  trawler :passthrough # unknown command names will forward here.
25
27
 
@@ -43,32 +45,53 @@ class RudyCLI < Rudy::CLI::Base
43
45
  usage "rudy machines"
44
46
  usage "rudy machines -l"
45
47
  usage "rudy machines -U"
46
- usage "rudy machines -A"
47
- usage "rudy machines -S [static ip address]"
48
- usage "rudy machines -D"
49
- option :l, :all, "Display machines for all environments and roles"
48
+ usage "rudy machines -A [static ip address]"
49
+ usage "rudy machines -N"
50
+ usage "rudy machines -T"
51
+ usage "rudy machines -P"
52
+ usage "rudy machines -O"
50
53
  action :W, :wash, "Wash machine metadata"
51
54
  action :T, :available, "Test availablity"
52
55
  action :U, :update, "Update machines based on configuration"
53
56
  action :A, :associate, "Associate static IP addresses or display existing ones"
54
57
  action :N, :disassociate, "Disassociate static IP addresses"
58
+ action :P, :password, "Display admin password (Windows only)"
59
+ action :O, :console, "Display console output"
60
+ option :l, :all, "Display machines for all environments and roles"
55
61
  command :machines => Rudy::CLI::Machines
56
62
  command_alias :machines, :m
57
63
 
64
+ about "View Keypairs"
65
+ usage "rudy keypairs"
66
+ #usage "rudy keypairs -A"
67
+ usage "rudy keypairs -S"
68
+ action :A, :add, "Add a keypair"
69
+ action :S, :show, "Show a private key"
70
+ command :keypairs => Rudy::CLI::Keypairs
71
+ command_alias :keypairs, :k
72
+
58
73
  about "View Disks"
59
74
  usage "rudy disks"
60
75
  usage "rudy disks -l"
61
- action :W, :wash, "Wash disk metadata"
76
+ usage "rudy disks -C -s 1 /path/2/mount"
77
+ option :s, :size, Integer, "Volume size (GB)"
78
+ option :d, :device, String, "Device ID"
79
+ option :f, :fstype, String, "Filesystem type"
62
80
  option :b, :backups, "Display backups"
63
81
  option :l, :all, "Display all disks"
82
+ action :C, :create, "Create disk"
83
+ action :D, :destroy, "Destroy disk"
84
+ action :W, :wash, "Wash disk metadata"
64
85
  command :disks => Rudy::CLI::Disks
65
86
  command_alias :disks, :d
66
87
 
67
88
  about "View Backups"
68
89
  usage "rudy backups"
69
90
  usage "rudy backups -l"
70
- action :W, :wash, "Wash backup metadata"
91
+ usage "rudy backups -C /disk/mount/point"
71
92
  option :l, :all, "Display all backups"
93
+ action :W, :wash, "Wash backup metadata"
94
+ action :C, :create, "Create backup"
72
95
  command :backups => Rudy::CLI::Backups
73
96
  command_alias :backups, :b
74
97
 
@@ -82,16 +105,27 @@ class RudyCLI < Rudy::CLI::Base
82
105
  argv :oid
83
106
  command :metadata => Rudy::CLI::Metadata
84
107
 
85
- about "View Network configuration (local network only)"
108
+ about "View Network configuration"
86
109
  usage "rudy networks"
87
110
  usage "rudy networks -L"
88
111
  usage "rudy networks -L -i"
89
112
  usage "rudy networks -L -e"
90
113
  usage "rudy networks -U"
114
+ usage "rudy networks -A [-p ports] [-a addresses] [-r protocols] "
115
+ usage "rudy networks -A -p 81,8000-9000 -a 127.0.0.1,127.0.0.2"
116
+ usage "rudy networks -A -g default -o 123456789012"
117
+ usage "rudy networks -R -g default"
91
118
  option :e, :external, "Display only external IP address"
92
119
  option :i, :internal, "Display only internal IP address"
120
+ option :r, :protocols, Array, "List of protocols. One of: tcp (default), udp, icmp"
121
+ option :p, :ports, Array, "List of port ranges (default: 22,80,443)"
122
+ option :a, :addresses, Array, "List of IP addresses (default: your current external IP)"
123
+ option :g, :group, String, "Other group to authorize or revoke. Use with -o!"
124
+ option :o, :owner, String, "Other group owner ID (account number). Use with -g!"
93
125
  action :U, :update, "Update networks based on configuration"
94
126
  action :L, :local, "Show local network configuration"
127
+ action :A, :authorize, "Authorize a rule for a network security group"
128
+ action :R, :revoke, "Revoke a rule for a network security group"
95
129
  command :networks => Rudy::CLI::Networks
96
130
  command_alias :networks, :n
97
131
 
@@ -134,7 +168,7 @@ class RudyCLI < Rudy::CLI::Base
134
168
 
135
169
  about "Display existing environment objects"
136
170
  option :l, :all, "Include all regions"
137
- command :status => Rudy::CLI::Status
171
+ command :info => Rudy::CLI::Info
138
172
 
139
173
  about "Log in to a machine"
140
174
  command :ssh => Rudy::CLI::Machines
@@ -144,8 +178,8 @@ class RudyCLI < Rudy::CLI::Base
144
178
  #option :p, :port, Integer, "Port"
145
179
  #command :open => Rudy::CLI::Candy
146
180
 
147
- usage "rudy [-f config-file] config [param-name]"
148
181
  about "Check Rudy configuration."
182
+ usage "rudy [-f config-file] config [param-name]"
149
183
  option :l, :all, "Display all configs for all machines"
150
184
  option :commands, "Display commands configuration"
151
185
  option :defaults, "Display defaults configuration"
@@ -163,7 +197,29 @@ class RudyCLI < Rudy::CLI::Base
163
197
  command :print_global => Rudy::CLI::Config
164
198
  command_alias :print_global, :globals
165
199
  command_alias :print_global, :global
166
-
200
+
201
+ about "Create a machine image from a running instance (Windows only)"
202
+ usage "rudy -b BUCKET-NAME bundle IMAGE-NAME"
203
+ argv :name
204
+ command :bundle => Rudy::CLI::Images
205
+
206
+ about "Check status of bundling process (Windows only)"
207
+ usage "rudy -b BUCKET-NAME bundle-status IMAGE-NAME"
208
+ argv :name
209
+ command :bundle_status => Rudy::CLI::Images
210
+
211
+ about "Display machine images"
212
+ usage "rudy images"
213
+ usage "rudy images -o amazon"
214
+ usage "rudy -b BUCKET-NAME images -R IMAGE-NAME"
215
+ usage "rudy images -D AMI"
216
+ option :o, :owner, String, "Owner ID (default: self)"
217
+ action :R, :register, "Register a machine image"
218
+ action :D, :deregister, "De-register a machine image (does not delete from S3)"
219
+ argv :name
220
+ command :images => Rudy::CLI::Images
221
+ command_alias :images, :im
222
+
167
223
  about "Initialize Rudy configuration"
168
224
  command :init do |obj|
169
225
 
@@ -201,7 +201,9 @@ module RudyCLI_EC2
201
201
  command_alias :zones, :zone
202
202
  command_alias :zones, :z
203
203
 
204
-
204
+ about "Display existing environment objects"
205
+ option :l, :all, "Include all regions"
206
+ command :info => Rudy::CLI::AWS::EC2::Info
205
207
 
206
208
  end
207
209
 
@@ -0,0 +1,15 @@
1
+
2
+ machines do
3
+ env :stage do
4
+ user :jira
5
+ ami 'ami-e348af8a' # Alestic Debian 5.0, 32-bit (US)
6
+ end
7
+ end
8
+
9
+ routines do
10
+ setup do
11
+ # NOTE: This fails b/c it's trying to login as jira rather than root.
12
+ adduser :jira
13
+ authorize :jira
14
+ end
15
+ end
@@ -10,9 +10,11 @@ defaults do
10
10
  end
11
11
 
12
12
  machines do
13
+ region :'us-east-1' do
14
+ ami 'ami-e348af8a' # Alestic Debian 5.0, 32-bit (US)
15
+ end
13
16
  env :test do
14
17
  role :rudy do
15
- ami 'ami-e348af8a' # Alestic Debian 5.0, 32-bit (US)
16
18
  user :root
17
19
  end
18
20
  end
@@ -22,15 +24,14 @@ commands do
22
24
  allow :apt_get, "apt-get", :y, :q
23
25
  allow :gem_install, "/usr/bin/gem", "install", :n, '/usr/bin', :y, :V, "--no-rdoc", "--no-ri"
24
26
  allow :gem_sources, "/usr/bin/gem", "sources"
25
- allow :gem_uninstall, "/usr/bin/gem", "uninstall", :V, :y
27
+ allow :gem_uninstall, "/usr/bin/gem", "uninstall", :V
26
28
  allow :update_rubygems
27
29
  allow :rake
28
30
  allow :rm
29
31
  end
30
32
 
31
33
  routines do
32
-
33
-
34
+
34
35
  install_rubyforge do
35
36
  remote :root do
36
37
  gem_install 'rudy', :V
@@ -67,13 +68,14 @@ routines do
67
68
  end
68
69
 
69
70
  init_rudy do
71
+ before :install_gem
70
72
  remote do
71
73
  disable_safe_mode
72
74
  rudy :v, :v, 'init' # create home directory
73
75
  file_upload File.expand_path('~/.rudy/config'), '.rudy/'
74
76
  ls :l, '.rudy/config'
75
77
  rudy :v, :v, 'init'
76
- rudy 'status', :l
78
+ rudy 'info', :l
77
79
  end
78
80
  end
79
81
 
@@ -88,5 +90,9 @@ routines do
88
90
  update_rubygems
89
91
  end
90
92
  end
93
+
94
+ startup do
95
+ after :sysupdate
96
+ end
91
97
  end
92
98