ironfan 3.1.0.rc1 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/.yardopts +5 -0
  2. data/CHANGELOG.md +18 -5
  3. data/README.md +34 -115
  4. data/TODO.md +36 -8
  5. data/VERSION +1 -1
  6. data/cluster_chef-knife.gemspec +2 -3
  7. data/ironfan.gemspec +29 -4
  8. data/lib/chef/knife/cluster_bootstrap.rb +1 -1
  9. data/lib/chef/knife/cluster_kick.rb +3 -3
  10. data/lib/chef/knife/cluster_kill.rb +1 -1
  11. data/lib/chef/knife/cluster_launch.rb +3 -3
  12. data/lib/chef/knife/cluster_list.rb +1 -1
  13. data/lib/chef/knife/cluster_proxy.rb +5 -5
  14. data/lib/chef/knife/cluster_show.rb +3 -2
  15. data/lib/chef/knife/cluster_ssh.rb +2 -2
  16. data/lib/chef/knife/cluster_start.rb +1 -2
  17. data/lib/chef/knife/cluster_stop.rb +2 -1
  18. data/lib/chef/knife/cluster_sync.rb +2 -2
  19. data/lib/chef/knife/cluster_vagrant.rb +144 -0
  20. data/lib/chef/knife/{knife_common.rb → ironfan_knife_common.rb} +8 -4
  21. data/lib/chef/knife/{generic_command.rb → ironfan_script.rb} +1 -1
  22. data/lib/chef/knife/vagrant/ironfan_environment.rb +18 -0
  23. data/lib/chef/knife/vagrant/ironfan_provisioners.rb +27 -0
  24. data/lib/chef/knife/vagrant/skeleton_vagrantfile.rb +116 -0
  25. data/lib/ironfan/chef_layer.rb +2 -2
  26. data/lib/ironfan/fog_layer.rb +16 -13
  27. data/lib/ironfan/private_key.rb +3 -3
  28. data/lib/ironfan/server.rb +9 -6
  29. data/lib/ironfan/server_slice.rb +11 -0
  30. data/notes/Home.md +30 -0
  31. data/notes/INSTALL-cloud_setup.md +100 -0
  32. data/notes/INSTALL.md +135 -0
  33. data/notes/Knife-Cluster-Commands.md +8 -0
  34. data/notes/Silverware.md +5 -0
  35. data/notes/aws_console_screenshot.jpg +0 -0
  36. data/notes/cookbook-versioning.md +11 -0
  37. data/notes/declaring_volumes.md +3 -0
  38. data/notes/design_notes-ci_testing.md +169 -0
  39. data/notes/design_notes-cookbook_event_ordering.md +212 -0
  40. data/notes/design_notes-dsl_object.md +55 -0
  41. data/notes/design_notes-meta_discovery.md +59 -0
  42. data/notes/ec2-pricing_and_capacity.md +63 -0
  43. data/notes/ironfan_homebase_layout.md +94 -0
  44. data/notes/named-cloud-objects.md +11 -0
  45. data/notes/rake_tasks.md +25 -0
  46. data/notes/renamed-recipes.txt +142 -0
  47. data/notes/style_guide.md +251 -0
  48. data/notes/tips_and_troubleshooting.md +83 -0
  49. metadata +50 -26
data/.yardopts ADDED
@@ -0,0 +1,5 @@
1
+ VERSION
2
+ CHANGELOG.md
3
+ LICENSE.md
4
+ README.md
5
+ notes/*
data/CHANGELOG.md CHANGED
@@ -1,15 +1,28 @@
1
- # v3.1.0-rc1
1
+ # v3.1.1: I am Ironfan danananananabumbumbum
2
2
 
3
3
  * 'ClusterChef has been renamed 'Ironfan'
4
4
  * The 'Metachef' cookbook has been renamed 'Silverware'
5
5
  * The 'Minidash' cookbook has been renamed 'Minidash'
6
6
 
7
- Please be sure you do a
7
+ You should reload your chef server:
8
8
 
9
- knife cookbook delete metachef minidash
9
+ knife cookbook delete metachef dashpot
10
10
  knife cookbook upload --all
11
+ rake roles
12
+
13
+ * You can now launch a cluster locally with vagrant!
14
+ - follow the instructions in [ironfan-ci](https://github.com/infochimps-labs/ironfan-ci/blob/master/README-install.md)
15
+ - set up a credentials set for your local machine (`cp -rp knife/example-credentials knife/local-credentials ; ln -nfs local-credentials knife/credentials`)
16
+ - customize its `knife-org.rb` for your chef server
17
+ - `knife cluster vagrant up sandbox-simple`
18
+
19
+ * Deprecated 'knife cluster foo nikko web 0' (many args) in favor of 'knife cluster foo nikko-web-0' (single arg).
20
+ - the latter still works, it just yells a lot.
21
+
22
+ * Am changing `--no-cloud` and `--no-chef` to `--cloud=false` and `--chef=false`, opening up room for a later `--cloud=rackspace` etc.
23
+
24
+ * many doc fixes, thanks @sya!
11
25
 
12
- These renames unfortunately hit every cookbook that depends on (what is now) silverware.
13
26
 
14
27
  __________________________________________________________________________
15
28
  __________________________________________________________________________
@@ -18,7 +31,7 @@ __________________________________________________________________________
18
31
 
19
32
  Big important change:
20
33
 
21
- # Ironfan is now Ironfan
34
+ # ClusterChef is now Ironfan
22
35
 
23
36
  Due to a polite request from outside, we are changing this project's name to not include the word 'Chef'.
24
37
 
data/README.md CHANGED
@@ -1,4 +1,32 @@
1
- # ironfan
1
+ # Ironfan Core: knife tools and core models
2
+
3
+ The ironfan project is an expressive toolset for constructing scalable, resilient architectures. It works in the cloud, in the data center, and on your laptop, and makes your system diagram visible and inevitable.
4
+
5
+ This repo implements
6
+
7
+ * core models to describe your system diagram with a clean, expressive domain-specific language
8
+ * knife plugins to orchestrate clusters of machines using simple commands like `knife cluster launch`
9
+ * logic to coordinate truth among chef server and cloud providers.
10
+
11
+ To get started with ironfan, clone the [homebase repo](https://github.com/infochimps-labs/ironfan-homebase) and follow the [installation instructions](https://github.com/infochimps-labs/ironfan/wiki/install). Please file all issues on [ironfan issues](https://github.com/infochimps-labs/ironfan/issues).
12
+
13
+ ## Index
14
+
15
+ ironfan core works together with the full ironfan toolset:
16
+
17
+ * [ironfan-homebase](https://github.com/infochimps-labs/ironfan-homebase): centralizes the cookbooks, roles and clusters. A solid foundation for any chef user.
18
+ * [ironfan gem](https://github.com/infochimps-labs/ironfan): core ironfan models, and knife plugins to orchestrate machines and coordinate truth among you homebase, cloud and chef server.
19
+ * [ironfan-pantry](https://github.com/infochimps-labs/ironfan-pantry): Our collection of industrial-strength, cloud-ready recipes for Hadoop, HBase, Cassandra, Elasticsearch, Zabbix and more.
20
+ * [silverware cookbook](https://github.com/infochimps-labs/ironfan-homebase/tree/master/cookbooks/silverware): coordinate discovery of services ("list all the machines for `awesome_webapp`, that I might load balance them") and aspects ("list all components that write logs, that I might logrotate them, or that I might monitor the free space on their volumes".
21
+ * [ironfan-ci](https://github.com/infochimps-labs/ironfan-ci): Continuous integration testing of not just your cookbooks but your *architecture*.
22
+
23
+ * [ironfan wiki](https://github.com/infochimps-labs/ironfan/wiki): high-level documentation and install instructions
24
+ * [ironfan issues](https://github.com/infochimps-labs/ironfan/issues): bugs, questions and feature requests for *any* part of the ironfan toolset.
25
+ * [ironfan gem docs](http://rdoc.info/gems/ironfan): rdoc docs for ironfan
26
+
27
+ __________________________________________________________________________
28
+
29
+ # Ironfan
2
30
 
3
31
  Infrastructure as code: describe and orchestrate whole clusters of cloud or virtual machines.
4
32
 
@@ -174,41 +202,7 @@ With these simple settings, if you have already [set up chef's knife to launch c
174
202
 
175
203
  ## Getting Started
176
204
 
177
- This assumes you have installed chef, have a working chef server, and have an AWS account. If you can run knife and use the web browser to see your EC2 console, you can start here. If not, see the instructions below.
178
-
179
- ### Setup
180
-
181
- ```ruby
182
- bundle install
183
- ```
184
-
185
- ### Your first cluster
186
-
187
- Let's create a cluster called 'demosimple'. It's, well, a simple demo cluster.
188
-
189
- #### Create a simple demo cluster
190
-
191
- Create a directory for your clusters; copy the demosimple cluster and its associated roles from ironfan:
192
-
193
- ```ruby
194
- mkdir -p $CHEF_REPO_DIR/clusters
195
- cp ironfan/clusters/{defaults,demosimple}.rb ./clusters/
196
- cp ironfan/roles/{big_package,nfs_*,ssh,base_role,chef_client}.rb ./roles/
197
- ```
198
-
199
- Lastly, add the `cookbooks`, `site-cookbooks`, and `meta-cookbooks` directories
200
- from ironfan to the `cookbooks_path` in your knife.rb, and push everything
201
- to the chef server. (see below for details).
202
-
203
- #### knife cluster launch
204
-
205
- Hooray! You're ready to launch a cluster:
206
-
207
- ```ruby
208
- knife cluster launch demosimple homebase --bootstrap
209
- ```
210
-
211
- It will kick off a node and then bootstrap it. You'll see it install a whole bunch of things. Yay.
205
+ @sya add the contents of https://github.com/infochimps-labs/ironfan/wiki/INSTALL here
212
206
 
213
207
  __________________________________________________________________________
214
208
 
@@ -235,19 +229,6 @@ __________________________________________________________________________
235
229
 
236
230
  ## Advanced Superpowers
237
231
 
238
- #### Auto-vivifying machines (no bootstrap required!)
239
-
240
- On EC2, you can make a machine that auto-vivifies -- no bootstrap necessary. Burn an AMI that has the `config/client.rb` file in /etc/chef/client.rb. It will use the ec2 userdata (passed in by knife) to realize its purpose in life, its identity, and the chef server to connect to; everything happens automagically from there. No parallel ssh required!
241
-
242
- #### EBS Volumes
243
-
244
- Define a `snapshot_id` for your volumes, and set `create_at_launch` true.
245
-
246
- __________________________________________________________________________
247
-
248
-
249
- ## Extended Installation Notes
250
-
251
232
  #### Set up Knife on your local machine, and a Chef Server in the cloud
252
233
 
253
234
  If you already have a working chef installation you can skip this section.
@@ -257,72 +238,10 @@ To get started with knife and chef, follow the "Chef Quickstart,":http://wiki.op
257
238
  * [Launch Cloud Instances with Knife](http://wiki.opscode.com/display/chef/Launch+Cloud+Instances+with+Knife)
258
239
  * [EC2 Bootstrap Fast Start Guide](http://wiki.opscode.com/display/chef/EC2+Bootstrap+Fast+Start+Guide)
259
240
 
260
- #### Cloud setup
261
-
262
- Next,
263
-
264
- * sign up for an AWS account
265
- * Follow the "Knife with AWS quickstart": on the opscode wiki.
266
-
267
- Right now cluster chef works well with AWS. If you're interested in modifying it to work with other cloud providers, "see here":https://github.com/infochimps-labs/ironfan/issues/28 or get in touch.
268
-
269
- #### Knife setup
270
-
271
- In your `.chef/knife.rb`, modify the cookbook path to include ironfan's `cookbooks`, `meta-cookbooks` and `site-cookbooks`, and to add settings for `ironfan_path`, `cluster_path` and `keypair_path`. Here's mine:
272
-
273
- ```
274
- current_dir = File.dirname(__FILE__)
275
- organization = 'CHEF_ORGANIZATION'
276
- username = 'CHEF_USERNAME'
277
-
278
- # The full path to your ironfan installation
279
- ironfan_path File.expand_path("#{current_dir}/../ironfan")
280
- # The list of paths holding clusters
281
- cluster_path [ File.expand_path("#{current_dir}/../clusters") ]
282
- # The directory holding your cloud keypairs
283
- keypair_path File.expand_path(current_dir)
284
-
285
- log_level :info
286
- log_location STDOUT
287
- node_name username
288
- client_key "#{keypair_path}/#{username}.pem"
289
- validation_client_name "#{organization}-validator"
290
- validation_key "#{keypair_path}/#{organization}-validator.pem"
291
- chef_server_url "https://api.opscode.com/organizations/#{organization}"
292
- cache_type 'BasicFile'
293
- cache_options( :path => "#{ENV['HOME']}/.chef/checksums" )
294
-
295
- # The first things have lowest priority (so, site-cookbooks gets to win)
296
- cookbook_path [
297
- "#{ironfan_path}/cookbooks", # std cookbooks from opscode/cookbooks
298
- "#{ironfan_path}/meta-cookbooks", # coordinate services among cookbooks
299
- "#{ironfan_path}/site-cookbooks", # infochimps' collection of cookbooks
300
- "#{current_dir}/../cookbooks",
301
- "#{current_dir}/../site-cookbooks", # your internal cookbooks
302
- ]
303
-
304
- # If you primarily use AWS cloud services:
305
- knife[:ssh_address_attribute] = 'cloud.public_hostname'
306
- knife[:ssh_user] = 'ubuntu'
307
-
308
- # Configure bootstrapping
309
- knife[:bootstrap_runs_chef_client] = true
310
- bootstrap_chef_version "~> 0.10.0"
311
-
312
- # AWS access credentials
313
- knife[:aws_access_key_id] = "XXXXXXXXXXX"
314
- knife[:aws_secret_access_key] = "XXXXXXXXXXXXX"
315
- ```
316
-
317
- #### Push to chef server
241
+ #### Auto-vivifying machines (no bootstrap required!)
318
242
 
319
- To send all the cookbooks and role to the chef server, visit your ironfan directory and run:
243
+ On EC2, you can make a machine that auto-vivifies -- no bootstrap necessary. Burn an AMI that has the `config/client.rb` file in /etc/chef/client.rb. It will use the ec2 userdata (passed in by knife) to realize its purpose in life, its identity, and the chef server to connect to; everything happens automagically from there. No parallel ssh required!
320
244
 
321
- ```ruby
322
- cd $CHEF_REPO_DIR
323
- mkdir -p $CHEF_REPO_DIR/site-cookbooks
324
- knife cookbook upload --all
325
- for foo in roles/*.rb ; do knife role from file $foo & sleep 1 ; done
326
- ```
245
+ #### EBS Volumes
327
246
 
328
- You should see all the cookbooks defined in ironfan/cookbooks (ant, apt, ...) listed among those it uploads.
247
+ Define a `snapshot_id` for your volumes, and set `create_at_launch` true.
data/TODO.md CHANGED
@@ -1,16 +1,44 @@
1
- ### From Nathan
2
- - syntactic sugar for ```server(0).fullname('blah')```
3
-
4
1
  ### Knife commands
5
2
 
6
- * knife cluster kick fails if service isn't running
7
- * make clear directions for installing `ironfan` and its initial use.
8
3
  * knife cluster launch should fail differently if you give it a facet that doesn't exist
9
4
 
10
5
 
6
+ * reify notion of 'homebase'; cluster commands work off it
7
+ * move away from referring to Chef::Config everywhere;
8
+
9
+
10
+ __________________________________________________________________________
11
+
12
+ Rename completed,
13
+
14
+ New homes:
15
+
16
+ * **http://github.com/infochimps-labs/ironfan** -- the primary destination, and the home of the knife tools (pretty much what's here in `infochimps/cluster_chef`)
17
+ * **http://github.com/infochimps-labs/ironfan-pantry** -- collection of public cookbooks, roles and demo clusters
18
+ * **http://github.com/infochimps-labs/ironfan-homebase** -- skeleton homebase (looks a lot like the current cluster_chef-homebase)
19
+ * **http://github.com/infochimps-labs/ironfan-ci** -- continuous integration stuff (homebase/vagrants)
20
+ * **http://github.com/infochimps-labs/ironfan-scrubby** -- de-linter/simulator (`cluster_chef/lib/cluster_chef/cookbook_munger*`)
21
+ * **http://github.com/infochimps-labs/opscode-cookbooks** -- our fork of the opscode cookbooks repo
22
+
23
+ ## Phase 1: Regex Replace
24
+
25
+ 0. DONE warn about the name change. Since the `version_3` branch is left pre-namechange, decision was made to do a pull request when things are pull-able, not spam people before.
26
+ 1. DONE Make a branch in each repo (`cluster_chef` and `*-homebase`) called `before_rename`, holding the current state of the code. Make another branch `ironfan`, where the renames will occur. That branch will be deleted as soon as the merge lands, hopefully before anyone even notices.
27
+ 2. DONE Make sure `el_ridiculoso` is up to date and that it fully converges in the vagrant and cloud environments.
28
+ 3. DONE Ensure all infochimps devs have push-pulled to various repos. make a tarball of the repos (.git and everything) and put them somewhere safe.
29
+ 4. DONE rename the `vendor/infochimps/metachef` cookbook as vendor/infochimps/silverware.
30
+ 5. DONE Bump the *minor* version number on all cookbooks (so 3.0.x => 3.1.x). Commit.
31
+ 6. DONE regex-replace `ClusterChef` => `Ironfan`, `cluster_chef` to `ironfan` and `[Mm]etachef` => `[Ss]ilverware`. Do this in `cluster_chef` and `infochimps-labs/ironfan-homebase` only. Get chef-client to complete on el_ridiculoso using an emptied-and-reloaded local chef server. Run knife cluster sync on all clusters in all homebases against local chef server.
32
+ 7. ...
33
+ 12. DONE once the name is updated in the gemspec, release the `ironfan` gem. @temujin9 and I agree that it should be a single combined gem now that we won't have the stupid `_chef` gem name conflict.
11
34
 
12
- ### ssh_user, ssh_identity_file, keypair, template should be set by cluster except when they shouldn't
35
+ ## Phase 2: Repo migration
13
36
 
14
- ### Organization-specific homebase files
37
+ 1. DONE back up the repo and put it somewhere safe.
38
+ 2. DONE Transfer ownership of `infochimps/cluster_chef` to `infochimps-labs/cluster_chef`. Do whatever is necessary/possible to migrate issues over.
39
+ 3. DONE Change name of `infochimps-labs/cluster_chef` to `infochimps-labs/ironfan`. Created new repo `infochimps-labs/ironfan-homebase`. 4. DONE Create new repo `infochimps/cluster_chef` with helpful link to new repo. I don't think we need a placeholder at `infochimps-labs/cluster_chef-homebase`.
40
+ 5. DONE Rename master branch of old cluster chef to be `version_2`, and freeze the `version_3`. Both now carry a deprecation warning pointing you to ironfan.
41
+ 6. IN PROGRESS Update any remaining documentation links, etc to point to new home.
42
+ 7. IN PROGRESS Have all devs edit their .git/config to point at right place.
15
43
 
16
- The current organization of the homebase needs to better scope organization-specific customizations
44
+ so here is the dev-level worksforme -- @temujin9 will close once he's given it the sysadmin-level worksforme
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.0.rc1
1
+ 3.1.1
@@ -46,8 +46,8 @@ Gem::Specification.new do |s|
46
46
  "lib/chef/knife/cluster_start.rb",
47
47
  "lib/chef/knife/cluster_stop.rb",
48
48
  "lib/chef/knife/cluster_sync.rb",
49
- "lib/chef/knife/generic_command.rb",
50
- "lib/chef/knife/knife_common.rb",
49
+ "lib/chef/knife/ironfan_script.rb",
50
+ "lib/chef/knife/ironfan_knife_common.rb",
51
51
  "lib/ironfan.rb",
52
52
  "lib/ironfan/chef_layer.rb",
53
53
  "lib/ironfan/cloud.rb",
@@ -120,4 +120,3 @@ Gem::Specification.new do |s|
120
120
  s.add_dependency(%q<configliere>, ["~> 0.4.8"])
121
121
  end
122
122
  end
123
-
data/ironfan.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "ironfan"
8
- s.version = "3.1.0.rc1"
8
+ s.version = "3.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Infochimps"]
12
- s.date = "2012-02-18"
12
+ s.date = "2012-02-20"
13
13
  s.description = "ironfan allows you to orchestrate not just systems but clusters of machines. It includes a powerful layer on top of knife and a collection of cloud cookbooks."
14
14
  s.email = "coders@infochimps.com"
15
15
  s.extra_rdoc_files = [
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.files = [
20
20
  ".gitignore",
21
21
  ".rspec",
22
+ ".yardopts",
22
23
  "CHANGELOG.md",
23
24
  "Gemfile",
24
25
  "LICENSE.md",
@@ -47,8 +48,12 @@ Gem::Specification.new do |s|
47
48
  "lib/chef/knife/cluster_start.rb",
48
49
  "lib/chef/knife/cluster_stop.rb",
49
50
  "lib/chef/knife/cluster_sync.rb",
50
- "lib/chef/knife/generic_command.rb",
51
- "lib/chef/knife/knife_common.rb",
51
+ "lib/chef/knife/cluster_vagrant.rb",
52
+ "lib/chef/knife/ironfan_knife_common.rb",
53
+ "lib/chef/knife/ironfan_script.rb",
54
+ "lib/chef/knife/vagrant/ironfan_environment.rb",
55
+ "lib/chef/knife/vagrant/ironfan_provisioners.rb",
56
+ "lib/chef/knife/vagrant/skeleton_vagrantfile.rb",
52
57
  "lib/ironfan.rb",
53
58
  "lib/ironfan/chef_layer.rb",
54
59
  "lib/ironfan/cloud.rb",
@@ -65,6 +70,25 @@ Gem::Specification.new do |s|
65
70
  "lib/ironfan/server.rb",
66
71
  "lib/ironfan/server_slice.rb",
67
72
  "lib/ironfan/volume.rb",
73
+ "notes/Home.md",
74
+ "notes/INSTALL-cloud_setup.md",
75
+ "notes/INSTALL.md",
76
+ "notes/Knife-Cluster-Commands.md",
77
+ "notes/Silverware.md",
78
+ "notes/aws_console_screenshot.jpg",
79
+ "notes/cookbook-versioning.md",
80
+ "notes/declaring_volumes.md",
81
+ "notes/design_notes-ci_testing.md",
82
+ "notes/design_notes-cookbook_event_ordering.md",
83
+ "notes/design_notes-dsl_object.md",
84
+ "notes/design_notes-meta_discovery.md",
85
+ "notes/ec2-pricing_and_capacity.md",
86
+ "notes/ironfan_homebase_layout.md",
87
+ "notes/named-cloud-objects.md",
88
+ "notes/rake_tasks.md",
89
+ "notes/renamed-recipes.txt",
90
+ "notes/style_guide.md",
91
+ "notes/tips_and_troubleshooting.md",
68
92
  "spec/ironfan/cluster_spec.rb",
69
93
  "spec/ironfan/facet_spec.rb",
70
94
  "spec/ironfan/server_slice_spec.rb",
@@ -119,3 +143,4 @@ Gem::Specification.new do |s|
119
143
  s.add_dependency(%q<configliere>, ["~> 0.4.8"])
120
144
  end
121
145
  end
146
+
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require File.expand_path(File.dirname(__FILE__)+"/generic_command.rb")
19
+ require File.expand_path('ironfan_script', File.dirname(File.realdirpath(__FILE__)))
20
20
  require 'chef/knife/bootstrap'
21
21
 
22
22
  class Chef
@@ -16,8 +16,8 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require File.expand_path(File.dirname(__FILE__)+"/knife_common.rb")
20
- require File.expand_path(File.dirname(__FILE__)+"/cluster_ssh.rb")
19
+ require File.expand_path('ironfan_knife_common', File.dirname(File.realdirpath(__FILE__)))
20
+ require File.expand_path('cluster_ssh', File.dirname(File.realdirpath(__FILE__)))
21
21
 
22
22
  class Chef
23
23
  class Knife
@@ -35,7 +35,7 @@ class Chef
35
35
  class ClusterKick < Chef::Knife::ClusterSsh
36
36
 
37
37
  import_banner_and_options(Chef::Knife::ClusterSsh)
38
- banner 'knife cluster kick "CLUSTER [FACET [INDEXES]]" (options) - start a run of chef-client on each server, tailing the logs and exiting when the run completes.'
38
+ banner 'knife cluster kick CLUSTER-[FACET-[INDEXES]] (options) - start a run of chef-client on each server, tailing the logs and exiting when the run completes.'
39
39
 
40
40
  option :pid_file,
41
41
  :long => "--pid_file",
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require File.expand_path(File.dirname(__FILE__)+"/generic_command.rb")
19
+ require File.expand_path('ironfan_script', File.dirname(File.realdirpath(__FILE__)))
20
20
 
21
21
  class Chef
22
22
  class Knife
@@ -16,8 +16,8 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require File.expand_path(File.dirname(__FILE__)+"/knife_common.rb")
20
- require File.expand_path(File.dirname(__FILE__)+"/cluster_bootstrap.rb")
19
+ require File.expand_path('ironfan_knife_common', File.dirname(File.realdirpath(__FILE__)))
20
+ require File.expand_path('cluster_bootstrap', File.dirname(File.realdirpath(__FILE__)))
21
21
 
22
22
  class Chef
23
23
  class Knife
@@ -30,7 +30,7 @@ class Chef
30
30
  Chef::Knife::ClusterBootstrap.load_deps
31
31
  end
32
32
 
33
- banner "knife cluster launch CLUSTER_NAME [FACET_NAME [INDEXES]] (options)"
33
+ banner "knife cluster launch CLUSTER-[FACET-[INDEXES]] (options) - Creates chef node and chef apiclient, pre-populates chef node, and instantiates in parallel their cloud machines. With --bootstrap flag, will ssh in to machines as they become ready and launch the bootstrap process"
34
34
  [ :ssh_port, :ssh_password, :identity_file, :use_sudo,
35
35
  :prerelease, :bootstrap_version, :template_file, :distro,
36
36
  :bootstrap_runs_chef_client, :host_key_verify
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require File.expand_path(File.dirname(__FILE__)+"/knife_common.rb")
19
+ require File.expand_path('ironfan_knife_common', File.dirname(File.realdirpath(__FILE__)))
20
20
 
21
21
  class Chef
22
22
  class Knife
@@ -16,9 +16,8 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require File.expand_path(File.dirname(__FILE__)+"/knife_common.rb")
20
- require File.expand_path(File.dirname(__FILE__)+"/cluster_ssh.rb")
21
- require File.expand_path(File.dirname(__FILE__)+"/generic_command.rb")
19
+ require File.expand_path('ironfan_script', File.dirname(File.realdirpath(__FILE__)))
20
+ require File.expand_path('cluster_ssh', File.dirname(File.realdirpath(__FILE__)))
22
21
 
23
22
  class Chef
24
23
  class Knife
@@ -34,7 +33,7 @@ class Chef
34
33
  class ClusterProxy < Ironfan::Script
35
34
 
36
35
  import_banner_and_options(Chef::Knife::ClusterSsh, :except => [:concurrency, ])
37
- banner 'knife cluster proxy "CLUSTER [FACET [INDEXES]]" (options) - Runs the ssh command to open a SOCKS proxy to the given host, and writes a PAC (automatic proxy config) file to /tmp/ironfan_proxy-YOURNAME.pac. Only the first host is used, even if multiple match.'
36
+ banner 'knife cluster proxy CLUSTER-[FACET-[INDEXES]] (options) - Runs the ssh command to open a SOCKS proxy to the given host, and writes a PAC (automatic proxy config) file to /tmp/ironfan_proxy-YOURNAME.pac. Only the first host is used, even if multiple match.'
38
37
 
39
38
  option :background,
40
39
  :long => "--[no-]background",
@@ -103,7 +102,8 @@ class Chef
103
102
  end
104
103
  end
105
104
 
106
- EC2_PROXY_PATTERNS = [ "*ec2*.amazonaws.com", "*ec2.internal*", "*compute-*.amazonaws.com", "*compute-*.internal*", "*domu*.internal*", "10.*",]
105
+ EC2_PROXY_PATTERNS = [] unless defined?(EC2_PROXY_PATTERNS)
106
+ EC2_PROXY_PATTERNS.unshift("*ec2*.amazonaws.com", "*ec2.internal*", "*compute-*.amazonaws.com", "*compute-*.internal*", "*domu*.internal*", "10.*",)
107
107
 
108
108
  def proxy_pac_contents
109
109
  proxy_patterns = EC2_PROXY_PATTERNS
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require File.expand_path(File.dirname(__FILE__)+"/knife_common.rb")
19
+ require File.expand_path('ironfan_knife_common', File.dirname(File.realdirpath(__FILE__)))
20
20
 
21
21
  class Chef
22
22
  class Knife
@@ -26,7 +26,8 @@ class Chef
26
26
  Ironfan::KnifeCommon.load_deps
27
27
  end
28
28
 
29
- banner "knife cluster show CLUSTER_NAME [FACET_NAME [INDEXES]] (options)"
29
+ banner "knife cluster show CLUSTER-[FACET-[INDEXES]] (options) - a helpful display of cluster's cloud and chef state"
30
+
30
31
  option :cloud,
31
32
  :long => "--[no-]cloud",
32
33
  :description => "Look up machines on AWS cloud (default is yes, look up machines; use --no-cloud to skip)",
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require File.expand_path(File.dirname(__FILE__)+"/knife_common.rb")
19
+ require File.expand_path('ironfan_knife_common', File.dirname(File.realdirpath(__FILE__)))
20
20
  require 'chef/knife/ssh'
21
21
 
22
22
  class Chef
@@ -29,7 +29,7 @@ class Chef
29
29
  Ironfan::KnifeCommon.load_deps
30
30
  end
31
31
 
32
- banner 'knife cluster ssh "CLUSTER [FACET [INDEXES]]" COMMAND (options)'
32
+ banner 'knife cluster ssh CLUSTER-[FACET-[INDEXES]] COMMAND (options)'
33
33
  Chef::Knife::Ssh.options.each do |name, hsh|
34
34
  next if name == :attribute
35
35
  option name, hsh
@@ -16,8 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require File.expand_path(File.dirname(__FILE__)+"/knife_common.rb")
20
- require File.expand_path(File.dirname(__FILE__)+"/generic_command.rb")
19
+ require File.expand_path('ironfan_script', File.dirname(File.realdirpath(__FILE__)))
21
20
 
22
21
  class Chef
23
22
  class Knife
@@ -15,7 +15,8 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
- require File.expand_path(File.dirname(__FILE__)+"/generic_command.rb")
18
+
19
+ require File.expand_path('ironfan_script', File.dirname(File.realdirpath(__FILE__)))
19
20
 
20
21
  class Chef
21
22
  class Knife
@@ -16,12 +16,12 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require File.expand_path(File.dirname(__FILE__)+"/generic_command.rb")
19
+ require File.expand_path('ironfan_script', File.dirname(File.realdirpath(__FILE__)))
20
20
 
21
21
  class Chef
22
22
  class Knife
23
23
  class ClusterSync < Ironfan::Script
24
- import_banner_and_options(Ironfan::Script)
24
+ import_banner_and_options(Ironfan::Script, :description => "Update chef server and cloud machines with current cluster definition")
25
25
 
26
26
  option :cloud,
27
27
  :long => "--[no-]cloud",