rudy 0.8.5 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. data/CHANGES.txt +110 -18
  2. data/README.rdoc +40 -44
  3. data/Rudyfile +35 -50
  4. data/bin/rudy +88 -57
  5. data/bin/rudy-ec2 +2 -16
  6. data/bin/rudy-s3 +0 -10
  7. data/bin/rudy-sdb +11 -12
  8. data/lib/rudy.rb +59 -91
  9. data/lib/rudy/aws.rb +4 -45
  10. data/lib/rudy/aws/ec2.rb +57 -20
  11. data/lib/rudy/aws/ec2/address.rb +10 -11
  12. data/lib/rudy/aws/ec2/group.rb +10 -9
  13. data/lib/rudy/aws/ec2/image.rb +8 -8
  14. data/lib/rudy/aws/ec2/instance.rb +18 -19
  15. data/lib/rudy/aws/ec2/keypair.rb +14 -19
  16. data/lib/rudy/aws/ec2/snapshot.rb +16 -9
  17. data/lib/rudy/aws/ec2/volume.rb +39 -26
  18. data/lib/rudy/aws/ec2/zone.rb +5 -4
  19. data/lib/rudy/aws/s3.rb +2 -1
  20. data/lib/rudy/aws/sdb.rb +35 -86
  21. data/lib/rudy/backups.rb +24 -0
  22. data/lib/rudy/cli.rb +5 -131
  23. data/lib/rudy/cli/aws/ec2/addresses.rb +19 -27
  24. data/lib/rudy/cli/aws/ec2/candy.rb +45 -20
  25. data/lib/rudy/cli/aws/ec2/groups.rb +9 -13
  26. data/lib/rudy/cli/aws/ec2/images.rb +5 -133
  27. data/lib/rudy/cli/aws/ec2/instances.rb +25 -25
  28. data/lib/rudy/cli/aws/ec2/keypairs.rb +7 -11
  29. data/lib/rudy/cli/aws/ec2/snapshots.rb +5 -9
  30. data/lib/rudy/cli/aws/ec2/volumes.rb +22 -23
  31. data/lib/rudy/cli/aws/ec2/zones.rb +2 -3
  32. data/lib/rudy/cli/aws/sdb/domains.rb +5 -6
  33. data/lib/rudy/cli/aws/sdb/objects.rb +33 -0
  34. data/lib/rudy/cli/aws/sdb/select.rb +23 -0
  35. data/lib/rudy/cli/backups.rb +38 -0
  36. data/lib/rudy/cli/base.rb +104 -0
  37. data/lib/rudy/cli/candy.rb +1 -2
  38. data/lib/rudy/cli/config.rb +20 -7
  39. data/lib/rudy/cli/disks.rb +7 -9
  40. data/lib/rudy/cli/execbase.rb +56 -0
  41. data/lib/rudy/cli/machines.rb +242 -45
  42. data/lib/rudy/cli/metadata.rb +24 -10
  43. data/lib/rudy/cli/networks.rb +34 -0
  44. data/lib/rudy/cli/routines.rb +32 -6
  45. data/lib/rudy/cli/status.rb +60 -0
  46. data/lib/rudy/config.rb +55 -32
  47. data/lib/rudy/config/objects.rb +44 -30
  48. data/lib/rudy/disks.rb +25 -0
  49. data/lib/rudy/exceptions.rb +99 -0
  50. data/lib/rudy/global.rb +67 -28
  51. data/lib/rudy/guidelines.rb +3 -2
  52. data/lib/rudy/huxtable.rb +67 -58
  53. data/lib/rudy/machines.rb +41 -263
  54. data/lib/rudy/metadata.rb +212 -38
  55. data/lib/rudy/metadata/backup.rb +123 -78
  56. data/lib/rudy/metadata/disk.rb +153 -170
  57. data/lib/rudy/metadata/machine.rb +179 -0
  58. data/lib/rudy/mixins.rb +2 -1
  59. data/lib/rudy/mixins/hash.rb +3 -1
  60. data/lib/rudy/mixins/symbol.rb +8 -0
  61. data/lib/rudy/routines.rb +127 -344
  62. data/lib/rudy/routines/base.rb +229 -0
  63. data/lib/rudy/routines/handlers/base.rb +48 -0
  64. data/lib/rudy/routines/handlers/depends.rb +49 -0
  65. data/lib/rudy/routines/handlers/disks.rb +249 -0
  66. data/lib/rudy/routines/handlers/group.rb +44 -0
  67. data/lib/rudy/routines/handlers/host.rb +70 -0
  68. data/lib/rudy/routines/handlers/keypair.rb +70 -0
  69. data/lib/rudy/routines/handlers/machines.rb +15 -0
  70. data/lib/rudy/routines/handlers/script.rb +85 -0
  71. data/lib/rudy/routines/handlers/user.rb +45 -0
  72. data/lib/rudy/routines/passthrough.rb +19 -23
  73. data/lib/rudy/routines/reboot.rb +98 -50
  74. data/lib/rudy/routines/shutdown.rb +65 -14
  75. data/lib/rudy/routines/startup.rb +112 -17
  76. data/lib/rudy/utils.rb +35 -68
  77. data/rudy.gemspec +82 -25
  78. data/tryouts/01_mixins/01_hash_tryouts.rb +20 -0
  79. data/tryouts/10_require_time/10_rudy_tryouts.rb +33 -0
  80. data/tryouts/10_require_time/15_global_tryouts.rb +58 -0
  81. data/tryouts/12_config/10_load_config_tryouts.rb +43 -0
  82. data/tryouts/12_config/20_defaults_tryouts.rb +16 -0
  83. data/tryouts/12_config/30_accounts_tryouts.rb +17 -0
  84. data/tryouts/12_config/40_machines_tryouts.rb +53 -0
  85. data/tryouts/12_config/50_commands_tryouts.rb +17 -0
  86. data/tryouts/12_config/60_routines_tryouts.rb +16 -0
  87. data/tryouts/15_huxtable/10_huxtable_tryouts.rb +47 -0
  88. data/tryouts/15_huxtable/20_user_tryouts.rb +47 -0
  89. data/tryouts/20_simpledb/10_domains_tryouts.rb +36 -0
  90. data/tryouts/20_simpledb/20_objects_tryouts.rb +56 -0
  91. data/tryouts/25_ec2/10_keypairs_tryouts.rb +54 -0
  92. data/tryouts/25_ec2/20_groups_tryouts.rb +56 -0
  93. data/tryouts/25_ec2/21_groups_authorize_address_tryouts.rb +53 -0
  94. data/tryouts/25_ec2/22_groups_authorize_account_tryouts.rb +54 -0
  95. data/tryouts/25_ec2/30_addresses_tryouts.rb +42 -0
  96. data/tryouts/25_ec2/40_volumes_tryouts.rb +53 -0
  97. data/tryouts/25_ec2/50_snapshots_tryouts.rb +75 -0
  98. data/tryouts/26_ec2_instances/10_instance_tryouts.rb +107 -0
  99. data/tryouts/26_ec2_instances/50_images_tryouts.rb +7 -0
  100. data/tryouts/30_metadata/10_include_tryouts.rb +45 -0
  101. data/tryouts/30_metadata/13_object_tryouts.rb +19 -0
  102. data/tryouts/30_metadata/50_disk_tryouts.rb +115 -0
  103. data/tryouts/30_metadata/51_disk_digest_tryouts.rb +24 -0
  104. data/tryouts/30_metadata/53_disk_list_tryouts.rb +35 -0
  105. data/tryouts/30_metadata/56_disk_volume_tryouts.rb +68 -0
  106. data/tryouts/30_metadata/60_backup_tryouts.rb +101 -0
  107. data/tryouts/30_metadata/63_backup_list_tryouts.rb +38 -0
  108. data/tryouts/30_metadata/64_backup_disk_tryouts.rb +65 -0
  109. data/tryouts/30_metadata/66_backup_snapshot_tryouts.rb +76 -0
  110. data/tryouts/30_metadata/70_machine_tryouts.rb +85 -0
  111. data/tryouts/30_metadata/73_machine_list_tryouts.rb +58 -0
  112. data/tryouts/30_metadata/76_machine_instance_tryouts.rb +64 -0
  113. data/tryouts/30_metadata/77_machines_tryouts.rb +45 -0
  114. data/tryouts/40_routines/10_keypair_handler_tryouts.rb +52 -0
  115. data/tryouts/40_routines/11_group_handler_tryouts.rb +36 -0
  116. data/tryouts/80_cli/10_rudyec2_tryouts.rb +8 -0
  117. data/tryouts/80_cli/60_rudy_tryouts.rb +41 -0
  118. data/tryouts/exploration/console.rb +91 -0
  119. data/tryouts/exploration/machine.rb +23 -0
  120. data/tryouts/failer +6 -0
  121. metadata +116 -32
  122. data/bin/ird +0 -153
  123. data/lib/rudy/metadata/backups.rb +0 -67
  124. data/lib/rudy/metadata/debug.rb +0 -38
  125. data/lib/rudy/metadata/disks.rb +0 -67
  126. data/lib/rudy/metadata/objectbase.rb +0 -108
  127. data/lib/rudy/routines/helper.rb +0 -76
  128. data/lib/rudy/routines/helpers/dependshelper.rb +0 -34
  129. data/lib/rudy/routines/helpers/diskhelper.rb +0 -403
  130. data/lib/rudy/routines/helpers/scripthelper.rb +0 -197
  131. data/lib/rudy/routines/helpers/userhelper.rb +0 -37
  132. data/support/rudy-ec2-startup +0 -200
data/CHANGES.txt CHANGED
@@ -1,18 +1,92 @@
1
- RUDY, CHANGES
2
-
3
- #### 0.9.0 (TBD) ###############################
4
-
5
- NOTE: The following changes are planned for the 0.9.0 release.
6
-
7
- * group identifier will be changed to 'grp' from 'g'
8
- * machine identifier will be changes to 'mach' from 'm'
9
- * private keys are stored in ~/.ssh/
10
- * zone is now a single letter: a, b, c, etc... The long form (us-east-1b) will set the region too.
11
- * Disk syntax in the routines DSL will change. The DSL no longer accepts arguments, just the action (create, destroy, ...).
12
- * Disk backups will be removed (temporarily -- probably until on of the early 1.x releases).
13
-
14
-
15
- #### 0.8.5 (2009-06-??) ###############################
1
+ RUDY, CHANGES
2
+
3
+
4
+ #### 0.9.0 (2009-08-04) ###########################
5
+
6
+ * FIXED: Better Windows support
7
+ * FIXED: Added rescue for disk handler in reboot routine
8
+ * FIXED: Another fix for resolving region/zone ambiguity
9
+ * FIXED: No Routines config error during shutdown routine
10
+ * CHANGE: Renamed "rudy machines -S" to "rudy machines -A"
11
+ * CHANGE: Renamed "rudy machines -A" to "rudy machines -T"
12
+ * ADDED: Print friendly error, rather then an angry exception when running on win32 with ruby 1.9
13
+ * ADDED: "rudy machines --disassociate" command
14
+ * ADDED: Allow colons in place of dashes (rudy publish:gem -> publish_gem do; ...; end)
15
+
16
+
17
+ #### 0.9.0-RC3 (2009-08-03) ###########################
18
+
19
+ * FIXED: GH-18 (Error when running startup, reboot, shutdown routines in parallel mode)
20
+ * FIXED: Routine::Handler::User.adduser was specifying invalid home directory with multiple machines
21
+ * FIXED: Socket.connect error in JRuby when checking if SSH is available
22
+ * FIXED: Rudy::AWS::EC2.connect now correctly reconnects when run for the second time
23
+ * FIXED: Global CLI option -R (region) was being ignored in lieu of -z (zone)
24
+ * FIXED: Rudy::Disk#archive wasn't storing size, fstype
25
+ * FIXED: Disk restore was balking when no FS type supplied
26
+ * FIXED: Reboot routine now automatically umounts volumes if the routine is configured to mount after the reboot
27
+ * CHANGE: "rudy myaddress" is now "rudy networks -L"
28
+ * CHANGE: Renamed Volume attributes: create_time, attach_time -> created, attached
29
+ * CHANGE: Renamed Instance attribute: launch_time -> created
30
+ * CHANGE: Global CLI option -C (config) can now accept multiple paths
31
+ * ADDED: "rudy machines -A" to display available machines
32
+ * ADDED: "rudy status" to display all EC2 objects
33
+ * ADDED: "rudy machines -U" to update hostnames
34
+ * ADDED: "rudy machines -S" to create static IP addresses
35
+ * ADDED: Rudy::Routines::Handlers::Disks.mount? etc... methods
36
+
37
+
38
+ #### 0.9.0-RC2 (2009-08-02) ###########################
39
+
40
+ * FIXED: Some status lines were printing on the same line during routines
41
+ * FIXED: user value in defaults wasn't being used for remote commands
42
+ * FIXED: Double printing SSH commands in parallel mode
43
+ * FIXED: Startup routine was creating only one machine
44
+ * FIXED: Reboot now executes commands in correct order
45
+ * CHANGE: Renamed config parameter 'yes' to 'auto'
46
+ * CHANGE: Global config parameter processed differently (see Rudy::Config#look_and_load)
47
+ * ADDED: "rudy ssh" can now run commands in parallel
48
+ * ADDED: rudy networks command
49
+
50
+
51
+ #### 0.9.0-RC1 (2009-08-01) ###########################
52
+
53
+ NOTE: This is a significant re-write from 0.8 (primarily the routines, metadata)
54
+
55
+ * FIXED: Routine blocks now process directives in the order their given (in Ruby 1.8 and 1.9).
56
+ * FIXED: Region is now based on the zone. Corrects ambiguity when specifying zone and region.
57
+ * FIXED: Reboot routines are now fully supported
58
+ * FIXED: Unless position (-p) is specified, it's assumed that a command applies to the entire machine group.
59
+ * CHANGE: Rudy::Machine#inspect now prints in a standard Ruby inspect format
60
+ * CHANGE: Routines have been completely rebuilt
61
+ * CHANGE: Now requires Rye 0.8
62
+ * CHANGE: before / after routine actions are now used for dependencies only.
63
+ * CHANGE: Removed script_local, after_local, before_local from passthrough routines
64
+ * CHANGE: Support before_local for startup routines
65
+ * CHANGE: Support before_local and before_remote for reboot routines
66
+ * CHANGE: Support after_local for shutdown routines
67
+ * CHANGE: Removed machines config (now recommend uploading local files)
68
+ * CHANGE: Group names now take the form: grp-us-east-1b-stage-app
69
+ * CHANGE: private keys are now stored in ~/.ssh/
70
+ * CHANGE: Removed create_image and prepare_image actions from rudy-ec2
71
+ * CHANGE: local routine blocks now share a single Rye::Box instance
72
+ * CHANGE: remote routine blocks now share a single Rye::Set instance
73
+ * CHANGE: "privatekey" in accounts config is renamed to "pkey"
74
+ * CHANGE: Reduced Rudy::AWS#execute_request timeout to 15 seconds.
75
+ * CHANGE: Rudy:Disks, Rudy::Machines, and Rudy::Backups now use class methods
76
+ * CHANGE: Rudy::AWS::EC2 now uses class methods
77
+ * CHANGE: Renamed disk action 'snapshot' to 'archive'
78
+ * ADDED: routines command for displaying available routines
79
+ * ADDED: "rudy init" now authorizes public keys for user@localhost
80
+ * ADDED: Parallel processing for remote machines
81
+ * ADDED: Routines now have access to $global and $option (which are frozen)
82
+ * ADDED: xremote and xlocal routine actions for quick skipping
83
+ * ADDED: Dependency Attic 0.4
84
+ * ADDED: New 'objects' and 'query' commands for rudy-sdb
85
+ * ADDED: Execute routines on individual machines in a group
86
+ * ADDED: rudy backups command
87
+
88
+
89
+ #### 0.8.5 (2009-06-08) ###############################
16
90
 
17
91
  * FIXED: Bug in DiskHelper. mount method tried to attach when already attached.
18
92
  * CHANGE: rudy config now displays account info (but keeps secret key hidden)
@@ -78,7 +152,7 @@ NOTE: The following changes are planned for the 0.9.0 release.
78
152
  * CHANGE: Moved non-rudy specific modules to separate projects (storable, sysinfo, annoy,
79
153
  console -> Drydock, escape -> Rye, tryouts -> tryouts/).
80
154
  * CHANGE: Renamed restart routine to reboot to make it clear it's about the machine
81
- * CHANGE: Renamed Rudy::Disk to Rudy::MetaData::Disk
155
+ * CHANGE: Renamed Rudy::Disk to Rudy::Metadata::Disk
82
156
  * CHANGE: Short alias for rudy-ec2 snapshot is now 's' (instead of 't')
83
157
  * CHANGE: Removed highline-1.5.1 from vendor (it's now available as a gem)
84
158
  * FIXED: Bug in Huxtable when loading global. Wasn't reloaded after config was updated.
@@ -132,7 +206,7 @@ NOTE: The following changes are planned for the 0.9.0 release.
132
206
  #### 0.6.8 (2009-04-24) ###############################
133
207
 
134
208
  * CHANGE: Renamed rudy config --rudy option to --project. This was important
135
- to maintain consistency in documentation.
209
+ to maintain consistency in documentation.
136
210
  * CHANGE: Cleaned README. See: http://wiki.github.com/solutious/rudy
137
211
 
138
212
  #### 0.6.7 (2009-04-22) ###############################
@@ -240,7 +314,25 @@ NOTE: This is a complete re-write from 0.1
240
314
  * ADDED: "rudy groups" overhaul. Display, creates, destroys groups.
241
315
 
242
316
 
243
-
244
317
  #### 0.1 (2009-02-06) ###############################
245
318
 
246
319
  * Initial public release
320
+
321
+
322
+ #### TODO ###########################################
323
+
324
+ * TODO: Supply dns values in machines config
325
+ * TODO: Rudy::Routines::Arcade.
326
+ * install/uninstall: uses package management for the specific os impl
327
+ * compile: from source.
328
+ * e.g. rudy -a experimental install git (for ruby-unix-osx)
329
+ * How to handle multiple package managers?
330
+ * How to handle multiple app versions?
331
+ * TODO: http://opensoul.org/2009/6/24/capistrano-git-and-ssh-keys
332
+ * TODO: look for config file in ./.rudy, then ../.rudy, etc... (git-like)
333
+ * TODO: FIX: When shutting down, warns about disks even when they don't exist (CLI::Routines)
334
+ * TODO: Investigate SSH daemon on Windows
335
+ * TODO: Supply machines config to routines blocks with only the specific machine group context
336
+
337
+
338
+
data/README.rdoc CHANGED
@@ -1,27 +1,19 @@
1
- = Rudy - v0.8 BETA
1
+ = Rudy - v0.9.0 BETA
2
2
 
3
3
  <b>Not your grandparents' EC2 deployment tool.</b>
4
4
 
5
- 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_.
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.
6
6
 
7
- When you put all this together, you have a unique name for every machine. The default machine is:
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
8
 
9
- zone env role
10
- v v v
11
- m-us-east-1b-stage-app-01
12
- ^ ^
13
- "machine" position
14
-
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>).
16
-
17
- <b>See Getting-Started[http://solutious.com/products/rudy/getting-started.html] for more info.</b>
9
+ <b>See Getting-Started[http://solutious.com/projects/rudy/getting-started/] for more info.</b>
18
10
 
19
11
 
20
12
  == Project Status
21
13
 
22
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>
23
15
 
24
- I'm currently rebuilding[http://github.com/solutious/rudy/tree/metadata-refactor] the metadata implementation. This is the part of Rudy that stores your machine, disk, and backup infoz in SimpleDB so it's pretty important! The implementation in the 0.8.4 release (and this master branch) are functional but frail so I want to re-emphasize not to use Rudy for production right now.
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!
25
17
 
26
18
 
27
19
  == Configuration
@@ -30,13 +22,13 @@ I'm currently rebuilding[http://github.com/solutious/rudy/tree/metadata-refactor
30
22
 
31
23
  The machines configuration describes the "physical" characteristics of your infrastructure.
32
24
 
33
- env :stage do # Define an environment
25
+ env :stage do # Define an environment
34
26
  ami 'ami-e348af8a'
35
27
 
36
- role :app do # Define a role
37
- addresses '11.22.33.44' # Use elastic IPs
28
+ role :app do # Define a role
29
+ addresses '11.22.33.44' # Use elastic IPs
38
30
 
39
- disks do # Create EBS volumes
31
+ disks do # Define EBS volumes
40
32
  path "/rudy/disk1" do
41
33
  size 100
42
34
  device "/dev/sdr"
@@ -49,18 +41,18 @@ The machines configuration describes the "physical" characteristics of your infr
49
41
 
50
42
  The routines configuration describes repeatable processes that you can execute on your machines.
51
43
 
52
- startup do # $ rudy startup
44
+ startup do # $ rudy startup
53
45
  adduser :rudy
54
- authorize :rudy # Enable passwordless login
46
+ authorize :rudy # Enable passwordless login
55
47
 
56
- disks do # Create a disk
57
- restore "/rudy/disk1" # from a backup
48
+ disks do
49
+ create "/rudy/disk1" # Create a disk
58
50
  end
59
51
 
60
- after :rudy do # Run remote SSH commands
61
- mkdir :p, "great" # $ mkdir -p great
62
- touch "great/scott" # $ touch great/scott
63
- ls :l, :a # $ ls -l -a
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
64
56
  end
65
57
  end
66
58
 
@@ -68,32 +60,35 @@ The routines configuration describes repeatable processes that you can execute o
68
60
 
69
61
  == Features
70
62
 
71
- * Create complex environments with a single command
63
+ * Create complex IT infrastructures from a simple configuration
72
64
  * Launch multiple instances
73
65
  * Assign elastic IP addresses
74
66
  * Create EBS volumes, attach to instances, format, and mount
75
- * Run scripts locally and remotely automatically
67
+ * Run SSH commands on machine groups in parallel
76
68
  * Organize instances into environments and roles
77
69
  * Powerful command-line tools
78
70
  * <tt>$ rudy -u root ssh</tt>
79
- * <tt>$ rudy -e testing -r database startup</tt>
71
+ * <tt>$ rudy -e testing -r database backup-mysql</tt>
80
72
  * Use _any Linux_ Amazon machine image (AMI) (partial Solaris support)
81
73
  * Complete command-line interface for EC2. See <tt>bin/rudy-ec2</tt>.
82
74
 
83
75
  == Installation
84
76
 
85
- Via Rubygems, one of:
77
+ Via Rubygems:
86
78
 
87
79
  $ sudo gem install rudy
88
- $ sudo gem install solutious-rudy --source http://gems.github.com/
89
80
 
90
81
  or via download:
91
82
  * rudy-latest.tar.gz[http://github.com/solutious/rudy/tarball/latest]
92
83
  * rudy-latest.zip[http://github.com/solutious/rudy/zipball/latest]
93
84
 
85
+ or via git:
86
+
87
+ $ git clone git://github.com/solutious/rudy.git
88
+
94
89
  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>
95
90
 
96
- <b>See Getting-Started[http://solutious.com/products/rudy/getting-started.html] for more info.</b>
91
+ <b>See Getting-Started[http://solutious.com/projects/rudy/getting-started/] for more info.</b>
97
92
 
98
93
 
99
94
  == Pre-Requisites
@@ -102,8 +97,9 @@ NOTE: <em>If you are not installing via RubyGems, you need to make sure the depe
102
97
  * EC2[http://aws.amazon.com/ec2/]
103
98
  * SimpleDB[http://aws.amazon.com/simpledb/]
104
99
  * S3[http://aws.amazon.com/s3/]
100
+ * OpenSSL[http://www.openssl.org/]
105
101
  * OpenSSH[http://www.openssh.com/]
106
- * Ruby[http://ruby-lang.org] 1.8.x, 1.9.x, or JRuby[http://jruby.codehaus.org] 1.2
102
+ * Ruby[http://ruby-lang.org] 1.8.x, 1.9.x, or JRuby[http://jruby.codehaus.org] 1.3
107
103
  * Net::SSH[http://net-ssh.rubyforge.org/]
108
104
  * Net::SCP[http://net-ssh.rubyforge.org/]
109
105
  * amazon-ec2[http://github.com/grempe/amazon-ec2]
@@ -111,20 +107,26 @@ NOTE: <em>If you are not installing via RubyGems, you need to make sure the depe
111
107
  * Rye[http://github.com/delano/rye]
112
108
  * Drydock[http://github.com/delano/drydock]
113
109
  * Caesars[http://github.com/delano/caesars]
110
+ * Gibbler[http://github.com/delano/gibbler]
114
111
 
115
-
112
+ * Supported Platforms
113
+ * Linux: Ruby 1.8, 1.9, and JRuby 1.3+
114
+ * Windows: Ruby 1.8 and JRuby 1.3+ (Net::SSH does not run under Ruby 1.9)
115
+ * BSD: <i>Needs testing (any takers?)</i>
116
+
116
117
  == More Info
117
118
 
118
119
  * Fork at GitHub[http://github.com/solutious/rudy]
119
- * Read the Documentation[http://wiki.github.com/solutious/rudy]
120
+ * Read the Documentation[http://solutious.com/projects/rudy]
120
121
  * Submit issues to the IssueTracker[http://github.com/solutious/rudy/issues]
121
122
  * Start a discussion on the GoogleGroup[http://groups.google.com/group/rudy-deployment]
122
123
  * Find some Inspiration[http://www.youtube.com/watch?v=CgaiIW5Rzes]
123
- * For all other inquires, email me directly: delano@solutious.com
124
+ * For all other inquires, email me directly: delano (@solutious.com)
124
125
 
125
126
 
126
127
  == Thanks
127
128
 
129
+ * Kalin Harvey for all the feedback
128
130
  * The Rilli.com[http://rilli.com] team
129
131
  * Adam Bognar
130
132
  * Andrew Simpson
@@ -142,10 +144,8 @@ NOTE: <em>If you are not installing via RubyGems, you need to make sure the depe
142
144
 
143
145
  == Contributions
144
146
 
145
- I'm very open to contributions!
146
-
147
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: <tt>delano@solutious.com</tt>
148
+ * For small or single file changes, send me an email with the details: Delano (@solutious.com)
149
149
 
150
150
 
151
151
  == Credits
@@ -156,16 +156,12 @@ I'm very open to contributions!
156
156
 
157
157
  == Related Projects
158
158
 
159
- * Sprinkle -- http://github.com/crafterm/sprinkle/
160
- * Wakame -- http://wakame.rubyforge.org/
161
- * Pool Party -- http://www.poolpartyrb.com/
162
- * Rubber -- http://github.com/wr0ngway/rubber/wikis
163
- * Moonshine -- http://github.com/railsmachine/moonshine/tree
159
+ * Rake -- http://rake.rubyforge.org/
160
+ * Moonshine -- http://github.com/railsmachine/moonshine/tree/
164
161
  * Boto -- http://code.google.com/p/boto/
165
162
  * Fabric -- http://www.nongnu.org/fab/
166
163
 
167
164
 
168
-
169
165
  == License
170
166
 
171
167
  See: LICENSE.txt
data/Rudyfile CHANGED
@@ -25,27 +25,28 @@
25
25
  #
26
26
 
27
27
  # --------------------------------------------------------- MACHINES --------
28
- # The machines block describes the "physical" characteristics of your machines.
28
+ # The machines block describes the 'physical' characteristics of your machines.
29
29
  machines do
30
30
 
31
- zone :"us-east-1b" do
31
+ region :'us-east-1' do
32
32
  ami 'ami-e348af8a' # Alestic Debian 5.0, 32-bit (US)
33
33
  end
34
- zone :"eu-west-1b" do
34
+ region :'eu-west-1' do
35
35
  ami 'ami-6ecde51a' # Alestic Debian 5.0, 32-bit (EU)
36
36
  end
37
37
 
38
- hostname :rudy # One of: :default, :rudy, "your-name"
38
+ hostname :rudy # One of: :default, :rudy, 'your-name'
39
39
 
40
- # We've defined an environment called "stage" with one role: "app".
40
+ # We've defined an environment called 'stage' with one role: 'app'.
41
41
  # The configuration inside the env block is available to all its
42
42
  # roles. The configuration inside the role blocks is available only
43
43
  # to machines in that specific role.
44
44
  env :stage, :prod do
45
+ user :root # User to connect as
45
46
  size 'm1.small' # EC2 machine type for all machines
46
- # in the "stage" environment
47
+ # in the 'stage' environment
47
48
  role :app do
48
- positions 1 # Only 1 machine in stage-app
49
+ positions 2 # 2 machines in stage-app
49
50
  #addresses '11.22.33.44' # Define an elastic IP to reuse
50
51
 
51
52
  disks do # Define EBS volumes
@@ -62,21 +63,13 @@ machines do
62
63
  end
63
64
 
64
65
  users do # Specify existing private keys per user
65
- rudy do
66
- keypair "/path/2/private-key"
67
- end
66
+ #rudy do
67
+ # keypair '/path/2/private-key'
68
+ #end
68
69
  end
69
70
 
70
71
  end
71
72
 
72
- # The routines section below contains calls to local and remote
73
- # scripts. The config contained in this block is made available
74
- # those scripts in the form of a yaml file. The file is called
75
- # rudy-config.yml.
76
- config do
77
- dbmaster 'localhost'
78
- newparam 573114
79
- end
80
73
  end
81
74
 
82
75
 
@@ -94,7 +87,8 @@ end
94
87
  commands do
95
88
  allow :gem_install, '/usr/bin/gem', 'install', :V, '--no-rdoc', '--no-ri'
96
89
  allow :apt_get, 'apt-get', :y, :q
97
- allow :floo, :time, 1 do
90
+ allow :rubycode do
91
+ puts "Some ruby code running in #{self}"
98
92
  end
99
93
  end
100
94
 
@@ -104,17 +98,18 @@ end
104
98
  routines do
105
99
 
106
100
  env :stage, :prod do # We'll define routines for the stage-app
107
- role :app do # and prod-app machine groups
101
+ role :app do # and prod-app machine groups.
102
+
103
+ user :root # The default remote user
108
104
 
109
105
  startup do # $ rudy startup
110
106
  adduser :rudy # Create a user called 'rudy'
111
- authorize :rudy # Enable passwordless logins as rudy
112
107
  #
113
108
  disks do # Define EBS volume routines
114
109
  create '/rudy/disk1' # Create an EBS volume, attach it, give
115
110
  end # it a filesystem, and mount it.
116
111
  #
117
- after :rudy do # Run remote SSH commands after startup
112
+ remote :root do # Run remote SSH commands after startup
118
113
  mkdir :p, 'great' # $ mkdir -p great
119
114
  touch 'great/scott' # $ touch great/scott
120
115
  ls :l, :a # $ ls -l -a *
@@ -122,7 +117,7 @@ routines do
122
117
  end
123
118
 
124
119
  shutdown do # $ rudy shutdown
125
- before :root do # Run remote SSH commands before shutdown
120
+ remote :root do # Run remote SSH commands before shutdown
126
121
  uptime
127
122
  end
128
123
  disks do
@@ -131,27 +126,17 @@ routines do
131
126
  end
132
127
 
133
128
  reboot do # $ rudy reboot
134
- before :root do # Run any pre-reboot tasks like stopping
129
+ before_remote do # Run any pre-reboot tasks like stopping
135
130
  uptime # web servers and databases.
136
131
  end #
137
- after :root do # Run any startup tasks like starting
138
- uptime # processes or initializing the filesystem
132
+ remote do # Run any startup tasks like starting
133
+ uname # processes or initializing the filesystem
139
134
  end
140
- end
141
-
142
- backup do # $ rudy backup
143
- disks do # A simple routine that creates an EBS
144
- snapshot '/rudy/disk1' # snapshot of the specified volume.
135
+ disks do
136
+ mount "/rudy/disk1"
145
137
  end
146
138
  end
147
139
 
148
- restore do # $ rudy restore
149
- disks do # A contrived example of restoring a
150
- destroy '/rudy/disk1' # disk from a backup. NOTE: You'll need
151
- restore '/rudy/disk1' # to run 'rudy backup' at least once
152
- end # before otherise there are no backups
153
- end # to restore from.
154
-
155
140
  end
156
141
  end
157
142
 
@@ -160,7 +145,7 @@ routines do
160
145
  # install essential libraries.
161
146
  # See http://github.com/rudy/arcade
162
147
  sysupdate do # $ rudy sysupdate
163
- before :root do
148
+ remote :root do
164
149
  apt_get 'update' # Update debian / ubuntu
165
150
  apt_get 'install', 'build-essential', 'sqlite3', 'libsqlite3-dev'
166
151
  apt_get 'install', 'apache2-prefork-dev', 'libapr1-dev'
@@ -170,30 +155,30 @@ routines do
170
155
 
171
156
  anything do # $ rudy anything
172
157
  before :uptime # Specify a dependency
173
- script_local do # This is Ruby, so any valid syntax
158
+ local do # This is Ruby, so any valid syntax
174
159
  ls :l # can be used in the definitions.
175
160
  end # See: SysInfo gem for more info.
176
161
  end
177
162
 
178
163
  uptime do # $ rudy uptime
179
- script_local do
180
- uptime
181
- end
164
+ local { uptime } # Short block syntax
182
165
  end
166
+
183
167
  end
184
168
 
185
169
 
186
170
  # ----------------------------------------------------------- DEFAULTS --------
187
- # These values are used as defaults for their respective global settings. All
188
- # non-boolean values are expected to be Symbols.
171
+ # These values are used as defaults for their respective global settings. They
172
+ # can be overridden by the command-line global options.
189
173
  #
190
174
  defaults do
191
- region :"us-east-1"
192
- zone :"us-east-1b"
175
+ zone :'us-east-1d'
193
176
  environment :stage
194
177
  role :app
195
- user Rudy.sysinfo.user.to_sym # This will be the user running Rudy
196
- color false # Terminal colors? true/false
197
- yes false # Auto-confirm? true/false
178
+ color true # Terminal colors? true/false
179
+ #user 'someuser' # The default remote user
180
+ #localhost 'hostname' # A local hostname instead of localhost
181
+ #auto true # Skip interactive confirmation?
182
+ #keydir 'path/2/keys/' # The path to store SSH keys
198
183
  end
199
184