solutious-rudy 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/CHANGES.txt +61 -4
  2. data/README.rdoc +91 -53
  3. data/Rakefile +0 -92
  4. data/Rudyfile +15 -25
  5. data/bin/rudy +52 -41
  6. data/examples/gem-test.rb +92 -0
  7. data/lib/rudy.rb +15 -7
  8. data/lib/rudy/aws.rb +2 -2
  9. data/lib/rudy/aws/ec2.rb +2 -2
  10. data/lib/rudy/aws/ec2/instance.rb +3 -3
  11. data/lib/rudy/aws/ec2/volume.rb +4 -4
  12. data/lib/rudy/cli/aws/ec2/candy.rb +13 -13
  13. data/lib/rudy/cli/base.rb +10 -4
  14. data/lib/rudy/cli/config.rb +13 -3
  15. data/lib/rudy/cli/disks.rb +1 -1
  16. data/lib/rudy/cli/execbase.rb +5 -2
  17. data/lib/rudy/cli/machines.rb +231 -30
  18. data/lib/rudy/cli/networks.rb +34 -0
  19. data/lib/rudy/cli/routines.rb +1 -1
  20. data/lib/rudy/cli/status.rb +60 -0
  21. data/lib/rudy/config.rb +42 -14
  22. data/lib/rudy/exceptions.rb +5 -1
  23. data/lib/rudy/global.rb +29 -13
  24. data/lib/rudy/huxtable.rb +2 -2
  25. data/lib/rudy/machines.rb +2 -2
  26. data/lib/rudy/metadata/disk.rb +2 -1
  27. data/lib/rudy/routines.rb +3 -3
  28. data/lib/rudy/routines/base.rb +7 -4
  29. data/lib/rudy/routines/handlers/disks.rb +16 -6
  30. data/lib/rudy/routines/handlers/group.rb +5 -3
  31. data/lib/rudy/routines/handlers/host.rb +14 -16
  32. data/lib/rudy/routines/handlers/script.rb +2 -2
  33. data/lib/rudy/routines/handlers/user.rb +4 -0
  34. data/lib/rudy/routines/reboot.rb +26 -9
  35. data/lib/rudy/routines/shutdown.rb +4 -0
  36. data/lib/rudy/routines/startup.rb +3 -2
  37. data/lib/rudy/utils.rb +23 -9
  38. data/rudy.gemspec +10 -29
  39. data/tryouts/10_require_time/10_rudy_tryouts.rb +1 -1
  40. data/tryouts/{misc/console_tryout.rb → exploration/console.rb} +0 -0
  41. data/tryouts/{misc/usage_tryout.rb → exploration/machine.rb} +0 -0
  42. data/tryouts/failer +1 -1
  43. metadata +8 -70
  44. data/tryouts/misc/disks_tryout.rb +0 -48
  45. data/tryouts/misc/drydock_tryout.rb +0 -48
  46. data/tryouts/misc/nested_methods.rb +0 -103
  47. data/tryouts/misc/session_tryout.rb +0 -46
  48. data/tryouts/misc/tryouts.rb +0 -33
@@ -1,9 +1,63 @@
1
- RUDY, CHANGES
1
+ RUDY, CHANGES
2
+
3
+
4
+ #### 0.9.1 (2009-08-05) ###########################
5
+
6
+ * FIXED: "rudy init" now exits with 0
7
+ * FIXED: Removed unnecessary gem dependencies from gemspec
8
+ * ADDED: Configuration examples
9
+
10
+
11
+ #### 0.9.0 (2009-08-04) ###########################
12
+
13
+ * FIXED: Better Windows support
14
+ * FIXED: Added rescue for disk handler in reboot routine
15
+ * FIXED: Another fix for resolving region/zone ambiguity
16
+ * FIXED: No Routines config error during shutdown routine
17
+ * CHANGE: Renamed "rudy machines -S" to "rudy machines -A"
18
+ * CHANGE: Renamed "rudy machines -A" to "rudy machines -T"
19
+ * ADDED: Print friendly error, rather then an angry exception when running on win32 with ruby 1.9
20
+ * ADDED: "rudy machines --disassociate" command
21
+ * ADDED: Allow colons in place of dashes (rudy publish:gem -> publish_gem do; ...; end)
22
+
23
+
24
+ #### 0.9.0-RC3 (2009-08-03) ###########################
25
+
26
+ * FIXED: GH-18 (Error when running startup, reboot, shutdown routines in parallel mode)
27
+ * FIXED: Routine::Handler::User.adduser was specifying invalid home directory with multiple machines
28
+ * FIXED: Socket.connect error in JRuby when checking if SSH is available
29
+ * FIXED: Rudy::AWS::EC2.connect now correctly reconnects when run for the second time
30
+ * FIXED: Global CLI option -R (region) was being ignored in lieu of -z (zone)
31
+ * FIXED: Rudy::Disk#archive wasn't storing size, fstype
32
+ * FIXED: Disk restore was balking when no FS type supplied
33
+ * FIXED: Reboot routine now automatically umounts volumes if the routine is configured to mount after the reboot
34
+ * CHANGE: "rudy myaddress" is now "rudy networks -L"
35
+ * CHANGE: Renamed Volume attributes: create_time, attach_time -> created, attached
36
+ * CHANGE: Renamed Instance attribute: launch_time -> created
37
+ * CHANGE: Global CLI option -C (config) can now accept multiple paths
38
+ * ADDED: "rudy machines -A" to display available machines
39
+ * ADDED: "rudy status" to display all EC2 objects
40
+ * ADDED: "rudy machines -U" to update hostnames
41
+ * ADDED: "rudy machines -S" to create static IP addresses
42
+ * ADDED: Rudy::Routines::Handlers::Disks.mount? etc... methods
43
+
44
+
45
+ #### 0.9.0-RC2 (2009-08-02) ###########################
46
+
47
+ * FIXED: Some status lines were printing on the same line during routines
48
+ * FIXED: user value in defaults wasn't being used for remote commands
49
+ * FIXED: Double printing SSH commands in parallel mode
50
+ * FIXED: Startup routine was creating only one machine
51
+ * FIXED: Reboot now executes commands in correct order
52
+ * CHANGE: Renamed config parameter 'yes' to 'auto'
53
+ * CHANGE: Global config parameter processed differently (see Rudy::Config#look_and_load)
54
+ * ADDED: "rudy ssh" can now run commands in parallel
55
+ * ADDED: rudy networks command
2
56
 
3
57
 
4
58
  #### 0.9.0-RC1 (2009-08-01) ###########################
5
59
 
6
- NOTE: This is a significant re-write from 0.8 (routines, metadata)
60
+ NOTE: This is a significant re-write from 0.8 (primarily the routines, metadata)
7
61
 
8
62
  * FIXED: Routine blocks now process directives in the order their given (in Ruby 1.8 and 1.9).
9
63
  * FIXED: Region is now based on the zone. Corrects ambiguity when specifying zone and region.
@@ -159,7 +213,7 @@ NOTE: This is a significant re-write from 0.8 (routines, metadata)
159
213
  #### 0.6.8 (2009-04-24) ###############################
160
214
 
161
215
  * CHANGE: Renamed rudy config --rudy option to --project. This was important
162
- to maintain consistency in documentation.
216
+ to maintain consistency in documentation.
163
217
  * CHANGE: Cleaned README. See: http://wiki.github.com/solutious/rudy
164
218
 
165
219
  #### 0.6.7 (2009-04-22) ###############################
@@ -272,6 +326,8 @@ NOTE: This is a complete re-write from 0.1
272
326
  * Initial public release
273
327
 
274
328
 
329
+ #### TODO ###########################################
330
+
275
331
  * TODO: Supply dns values in machines config
276
332
  * TODO: Rudy::Routines::Arcade.
277
333
  * install/uninstall: uses package management for the specific os impl
@@ -283,5 +339,6 @@ NOTE: This is a complete re-write from 0.1
283
339
  * TODO: look for config file in ./.rudy, then ../.rudy, etc... (git-like)
284
340
  * TODO: FIX: When shutting down, warns about disks even when they don't exist (CLI::Routines)
285
341
  * TODO: Investigate SSH daemon on Windows
286
- * TODO: Allow colons in place of dashes (rudy publish:gem)
287
342
  * TODO: Supply machines config to routines blocks with only the specific machine group context
343
+ * TODO: The output for rudy -v should become the default verbose level. -v should print the command output without the header. -vv should print the header. -vvv stays the same but also print full stack traces.
344
+
@@ -1,63 +1,90 @@
1
- = Rudy - v0.9-RC1
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 Amazon Web Services. It helps you build and maintain infrastructures in EC2 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 today to see what all the fuss is about.</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'
27
-
28
- role :app do # Define a role
29
- addresses '11.22.33.44' # Use elastic IPs
23
+ machines do
24
+
25
+ env :stage do # Define an environment
26
+ ami 'ami-e348af8a' # Specify a machine image
27
+
28
+ role :app do # Define a role
29
+ addresses '11.22.33.44' # Use elastic IPs
30
30
 
31
- disks do # Define EBS volumes
32
- path "/rudy/disk1" do
33
- size 100
34
- device "/dev/sdr"
35
- end
31
+ disks do # Define EBS volumes
32
+ path "/rudy/disk1" do
33
+ size 100
34
+ device "/dev/sdr"
35
+ end
36
+ end
36
37
  end
37
38
  end
38
- end
39
39
 
40
+ end
41
+
40
42
  === Routines
41
43
 
42
44
  The routines configuration describes repeatable processes that you can execute on your machines.
43
45
 
44
- startup do # $ rudy startup
45
- adduser :rudy
46
- authorize :rudy # Enable passwordless login
46
+ routines do
47
+
48
+ startup do # $ rudy startup
49
+ adduser :rudy
50
+ authorize :rudy # Enable passwordless login
47
51
 
48
- disks do
49
- create "/rudy/disk1" # Create a disk
50
- end
52
+ disks do
53
+ create "/rudy/disk1" # Create, format, and mount a volume
54
+ end
51
55
 
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
56
+ remote :rudy do # Run remote commands via SSH
57
+ mkdir :p, "great" # $ mkdir -p great
58
+ mysql_init :start
59
+ your_script 'arg1', 'arg2' # Call your own scripts
60
+ end
61
+ end
62
+
57
63
  end
58
-
59
-
60
-
64
+
65
+ See Rudyfile[http://github.com/solutious/rudy/raw/master/Rudyfile] for a complete configuration example.
66
+
67
+
68
+ == Running Commands
69
+
70
+ Rudy comes with a command-line tool called <tt>rudy</tt>. It provides commands for describing the infrastructures you've built with Rudy.
71
+
72
+ $ rudy machines
73
+ m-us-east-1d-stage-app-01: ec2-67-202-0-112.compute-1.amazonaws.com
74
+ m-us-east-1d-stage-app-02: ec2-174-129-117-30.compute-1.amazonaws.com
75
+
76
+ $ rudy disks
77
+ disk-us-east-1d-stage-app-01-rudy-disk1
78
+ disk-us-east-1d-stage-app-02-rudy-disk1
79
+
80
+ $ rudy backups
81
+ back-us-east-1d-stage-app-01-rudy-disk1-20090803-1857-49
82
+ back-us-east-1d-stage-app-01-rudy-disk1-20090803-1858-36
83
+ back-us-east-1d-stage-app-02-rudy-disk1-20090803-1911-05
84
+
85
+ See <tt>rudy -h</tt> for more info.
86
+
87
+
61
88
  == Features
62
89
 
63
90
  * Create complex IT infrastructures from a simple configuration
@@ -69,20 +96,29 @@ The routines configuration describes repeatable processes that you can execute o
69
96
  * Powerful command-line tools
70
97
  * <tt>$ rudy -u root ssh</tt>
71
98
  * <tt>$ rudy -e testing -r database backup-mysql</tt>
72
- * Use _any Linux_ Amazon machine image (AMI) (partial Solaris support)
99
+ * Use _any Linux_ Amazon machine image (AMI) (partial Windows and Solaris support)
73
100
  * Complete command-line interface for EC2. See <tt>bin/rudy-ec2</tt>.
74
101
 
102
+
103
+ == Project Status
104
+
105
+ <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>
106
+
107
+
75
108
  == Installation
76
109
 
77
- Via Rubygems, one of:
110
+ Via Rubygems:
78
111
 
79
112
  $ sudo gem install rudy
80
- $ sudo gem install solutious-rudy --source http://gems.github.com/
81
113
 
82
114
  or via download:
83
115
  * rudy-latest.tar.gz[http://github.com/solutious/rudy/tarball/latest]
84
116
  * rudy-latest.zip[http://github.com/solutious/rudy/zipball/latest]
85
117
 
118
+ or via git:
119
+
120
+ $ git clone git://github.com/solutious/rudy.git
121
+
86
122
  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>
87
123
 
88
124
  <b>See Getting-Started[http://solutious.com/projects/rudy/getting-started/] for more info.</b>
@@ -106,19 +142,32 @@ NOTE: <em>If you are not installing via RubyGems, you need to make sure the depe
106
142
  * Caesars[http://github.com/delano/caesars]
107
143
  * Gibbler[http://github.com/delano/gibbler]
108
144
 
109
-
145
+ * Supported Platforms
146
+ * Linux: Ruby 1.8, 1.9, and JRuby 1.3+
147
+ * Windows: Ruby 1.8 and JRuby 1.3+ (Net::SSH does not run under Ruby 1.9)
148
+ * BSD: <i>Needs testing (any takers?)</i>
149
+
110
150
  == More Info
111
151
 
112
152
  * Fork at GitHub[http://github.com/solutious/rudy]
113
- * Read the Documentation[http://wiki.github.com/solutious/rudy]
153
+ * Read the Documentation[http://solutious.com/projects/rudy]
114
154
  * Submit issues to the IssueTracker[http://github.com/solutious/rudy/issues]
115
155
  * Start a discussion on the GoogleGroup[http://groups.google.com/group/rudy-deployment]
116
156
  * Find some Inspiration[http://www.youtube.com/watch?v=CgaiIW5Rzes]
117
157
  * For all other inquires, email me directly: delano (@solutious.com)
118
158
 
119
159
 
160
+ == Contributions
161
+
162
+ This is a BETA release. We encourage people to find unique and interesting ways to break rudy. If you find an issue, let us know!
163
+
164
+ * For bigger features please fork the git repo and send me a pull request.
165
+ * For small or single file changes, send me an email with the details: delano (@solutious.com)
166
+
167
+
120
168
  == Thanks
121
169
 
170
+ * Kalin Harvey for all the feedback
122
171
  * The Rilli.com[http://rilli.com] team
123
172
  * Adam Bognar
124
173
  * Andrew Simpson
@@ -133,31 +182,20 @@ NOTE: <em>If you are not installing via RubyGems, you need to make sure the depe
133
182
  * Marcel Molina Jr. for aws-s3
134
183
  * Keshia Knight Pulliam
135
184
 
136
-
137
- == Contributions
138
-
139
- * For bigger features please fork the git repo and send me a pull request.
140
- * For small or single file changes, send me an email with the details: Delano (@solutious.com)
141
-
142
-
143
185
  == Credits
144
186
 
145
- * Delano Mandelbaum (delano@solutious.com)
187
+ * Delano Mandelbaum ( http://solutious.com/ )
146
188
  * Rudy::AWS::SDB adapted from aws_sdb by Tim Dysinger (http://dysinger.net)
147
189
 
148
190
 
149
191
  == Related Projects
150
192
 
151
- * Sprinkle -- http://github.com/crafterm/sprinkle/
152
- * Wakame -- http://wakame.rubyforge.org/
153
- * Pool Party -- http://www.poolpartyrb.com/
154
- * Rubber -- http://github.com/wr0ngway/rubber/wikis
155
- * Moonshine -- http://github.com/railsmachine/moonshine/tree
193
+ * Rake -- http://rake.rubyforge.org/
194
+ * Moonshine -- http://github.com/railsmachine/moonshine/tree/
156
195
  * Boto -- http://code.google.com/p/boto/
157
196
  * Fabric -- http://www.nongnu.org/fab/
158
197
 
159
198
 
160
-
161
199
  == License
162
200
 
163
201
  See: LICENSE.txt
data/Rakefile CHANGED
@@ -10,98 +10,6 @@ require 'fileutils'
10
10
  include FileUtils
11
11
 
12
12
  task :default => :test
13
-
14
-
15
-
16
- # TESTS ===============================================================
17
-
18
- Rake::TestTask.new(:test_old) do |t|
19
- require 'monkeyspecdoc'
20
- test_files = FileList['test/**/*_test.rb'] || []
21
- t.test_files = test_files
22
- t.ruby_opts = ['-rubygems'] if defined? Gem
23
- t.verbose = true
24
- # t.warning = true
25
-
26
- end
27
-
28
-
29
- namespace :test do
30
- #about 'Measures test coverage'
31
- task :coverage do
32
- rm_f "coverage"
33
- rm_f "coverage.data"
34
- rcov = "rcov -Itest --aggregate coverage.data -T -x ' rubygems/*,/Library/Ruby/Site/*,gems/*,rcov*'"
35
- system("#{rcov} --html test/**/*_test.rb")
36
- system("open coverage/index.html") if RUBY_PLATFORM['darwin']
37
- end
38
- task :list do
39
- puts Dir.glob(File.join('test', '**', '*_test.rb'))
40
- end
41
-
42
- # Run individual test groups with:
43
- # rake test:05
44
- # rake test:60
45
- # etc...
46
- ('00'..'99').each do |group|
47
- task group.to_sym do
48
- Rake.run_tests "test/#{group}*/*_test.rb"
49
- end
50
-
51
- # And also individual test files
52
- # rake test:50:10
53
- # etc...
54
- ('00'..'99').each do |test|
55
- namespace group.to_sym do
56
- task test.to_sym do
57
- Rake.run_tests "test/#{group}*/{00,#{test}}*_test.rb"
58
- end
59
- end
60
- end
61
- end
62
- end
63
-
64
- task :test do
65
-
66
- #all_tests = Dir.glob(File.join('test', '{05,20,50}*', '*_test.rb')) || []
67
- #all_tests.sort.each do |file|
68
- # load file
69
- #end
70
- Rake.run_tests 'test/**/*_test.rb'
71
- end
72
-
73
-
74
- # From: shoulda/tasks/list_tests.rake
75
- namespace :shoulda do
76
- #about "List the names of the test methods in a specification like format"
77
- task :list_fixed do
78
- $LOAD_PATH.unshift("test")
79
-
80
- require 'test/unit'
81
- require 'active_support'
82
-
83
- # bug in test unit. Set to true to stop from running.
84
- Test::Unit.run = true
85
-
86
- test_files = Dir.glob(File.join('test', '**', '*_test.rb'))
87
-
88
- test_files.each do |file|
89
- load file
90
- klass = File.basename(file, '.rb').classify
91
- #unless Object.const_defined?(klass.to_s) # => raises: wrong constant name 00SetupTest
92
- unless Object.constants.member?(klass.to_s) # fixed
93
- puts "Skipping #{klass} because it doesn't map to a Class"
94
- next
95
- end
96
- klass = klass.constantize
97
-
98
- puts klass.name.gsub('Test', '')
99
-
100
- test_methods = klass.instance_methods.grep(/^test/).map {|s| s.gsub(/^test: /, '')}.sort
101
- test_methods.each {|m| puts " " + m }
102
- end
103
- end
104
- end
105
13
 
106
14
 
107
15
  # PACKAGE =============================================================
data/Rudyfile CHANGED
@@ -46,7 +46,7 @@ machines do
46
46
  size 'm1.small' # EC2 machine type for all machines
47
47
  # in the 'stage' environment
48
48
  role :app do
49
- positions 1 # Only 1 machine in stage-app
49
+ positions 2 # 2 machines in stage-app
50
50
  #addresses '11.22.33.44' # Define an elastic IP to reuse
51
51
 
52
52
  disks do # Define EBS volumes
@@ -63,9 +63,9 @@ machines do
63
63
  end
64
64
 
65
65
  users do # Specify existing private keys per user
66
- rudy do
67
- keypair '/path/2/private-key'
68
- end
66
+ #rudy do
67
+ # keypair '/path/2/private-key'
68
+ #end
69
69
  end
70
70
 
71
71
  end
@@ -109,7 +109,7 @@ routines do
109
109
  create '/rudy/disk1' # Create an EBS volume, attach it, give
110
110
  end # it a filesystem, and mount it.
111
111
  #
112
- remote :rudy do # Run remote SSH commands after startup
112
+ remote :root do # Run remote SSH commands after startup
113
113
  mkdir :p, 'great' # $ mkdir -p great
114
114
  touch 'great/scott' # $ touch great/scott
115
115
  ls :l, :a # $ ls -l -a *
@@ -130,23 +130,13 @@ routines do
130
130
  uptime # web servers and databases.
131
131
  end #
132
132
  remote do # Run any startup tasks like starting
133
- uptime # processes or initializing the filesystem
133
+ uname # processes or initializing the filesystem
134
134
  end
135
- end
136
-
137
- backup do # $ rudy backup
138
- disks do # A simple routine that creates an EBS
139
- snapshot '/rudy/disk1' # snapshot of the specified volume.
135
+ disks do
136
+ mount "/rudy/disk1"
140
137
  end
141
138
  end
142
139
 
143
- restore do # $ rudy restore
144
- disks do # A contrived example of restoring a
145
- destroy '/rudy/disk1' # disk from a backup. NOTE: You'll need
146
- restore '/rudy/disk1' # to run 'rudy backup' at least once
147
- end # before otherise there are no backups
148
- end # to restore from.
149
-
150
140
  end
151
141
  end
152
142
 
@@ -171,24 +161,24 @@ routines do
171
161
  end
172
162
 
173
163
  uptime do # $ rudy uptime
174
- remote { uptime } # Short block syntax
164
+ local { uptime } # Short block syntax
175
165
  end
176
166
 
177
167
  end
178
168
 
179
169
 
180
170
  # ----------------------------------------------------------- DEFAULTS --------
181
- # These values are used as defaults for their respective global settings. All
182
- # 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.
183
173
  #
184
174
  defaults do
185
175
  zone :'us-east-1d'
186
176
  environment :stage
187
177
  role :app
188
- #user ENV['USER'] # The default remote user
178
+ color true # Terminal colors? true/false
179
+ #user 'someuser' # The default remote user
189
180
  #localhost 'hostname' # A local hostname instead of localhost
190
- #color true # Terminal colors? true/false
191
- #yes false # Auto-confirm? true/false
192
- #keydir '~/.ssh/' # The path to store SSH keys
181
+ #auto true # Skip interactive confirmation?
182
+ #keydir 'path/2/keys/' # The path to store SSH keys
193
183
  end
194
184