Permalink
Browse files

Renamed cluster_chef => ironfan, ClusterChef => Ironfan, metachef => …

…silverware, dashpot => minidash
  • Loading branch information...
1 parent 43c93b7 commit 2d4217bcc442d301a55544b7973a8b733b751a0a Philip (flip) Kromer committed Feb 18, 2012
Showing with 333 additions and 321 deletions.
  1. +28 −12 CHANGELOG.md
  2. +19 −19 README.md
  3. +1 −1 Rakefile
  4. +1 −1 TODO.md
  5. +15 −16 cluster_chef-knife.gemspec
  6. +32 −33 cluster_chef.gemspec
  7. +0 −1 config/ubuntu10.04-cluster_chef.erb
  8. +1 −0 config/ubuntu10.04-ironfan.erb
  9. +0 −1 config/ubuntu11.10-cluster_chef.erb
  10. +1 −0 config/ubuntu11.10-ironfan.erb
  11. +28 −29 ironfan.gemspec
  12. +1 −1 lib/chef/knife/bootstrap/{ubuntu10.04-cluster_chef.erb → ubuntu10.04-ironfan.erb}
  13. +1 −1 lib/chef/knife/bootstrap/{ubuntu11.10-cluster_chef.erb → ubuntu11.10-ironfan.erb}
  14. +3 −3 lib/chef/knife/cluster_bootstrap.rb
  15. +2 −2 lib/chef/knife/cluster_kill.rb
  16. +3 −3 lib/chef/knife/cluster_launch.rb
  17. +4 −4 lib/chef/knife/cluster_list.rb
  18. +5 −5 lib/chef/knife/cluster_proxy.rb
  19. +3 −3 lib/chef/knife/cluster_show.rb
  20. +3 −3 lib/chef/knife/cluster_ssh.rb
  21. +2 −2 lib/chef/knife/cluster_start.rb
  22. +2 −2 lib/chef/knife/cluster_stop.rb
  23. +2 −2 lib/chef/knife/cluster_sync.rb
  24. +4 −4 lib/chef/knife/generic_command.rb
  25. +9 −9 lib/chef/knife/knife_common.rb
  26. +22 −22 lib/{cluster_chef.rb → ironfan.rb}
  27. +6 −6 lib/{cluster_chef → ironfan}/chef_layer.rb
  28. +4 −4 lib/{cluster_chef → ironfan}/cloud.rb
  29. +8 −8 lib/{cluster_chef → ironfan}/cluster.rb
  30. +8 −8 lib/{cluster_chef → ironfan}/compute.rb
  31. +2 −2 lib/{cluster_chef → ironfan}/deprecated.rb
  32. +15 −15 lib/{cluster_chef → ironfan}/discovery.rb
  33. +7 −7 lib/{cluster_chef → ironfan}/dsl_object.rb
  34. +8 −8 lib/{cluster_chef → ironfan}/facet.rb
  35. +12 −12 lib/{cluster_chef → ironfan}/fog_layer.rb
  36. +5 −5 lib/{cluster_chef → ironfan}/private_key.rb
  37. +1 −1 lib/{cluster_chef → ironfan}/role_implications.rb
  38. +7 −7 lib/{cluster_chef → ironfan}/security_group.rb
  39. +7 −7 lib/{cluster_chef → ironfan}/server.rb
  40. +4 −4 lib/{cluster_chef → ironfan}/server_slice.rb
  41. +6 −6 lib/{cluster_chef → ironfan}/volume.rb
  42. +3 −3 rspec.watchr
  43. +2 −2 spec/{cluster_chef → ironfan}/cluster_spec.rb
  44. +3 −4 spec/{cluster_chef → ironfan}/facet_spec.rb
  45. +3 −3 spec/{cluster_chef → ironfan}/server_slice_spec.rb
  46. +6 −6 spec/{cluster_chef → ironfan}/server_spec.rb
  47. +8 −8 spec/{cluster_chef_spec.rb → ironfan_spec.rb}
  48. +8 −8 spec/spec_helper.rb
  49. +5 −5 spec/spec_helper/dummy_chef.rb
  50. +3 −3 spec/test_config.rb
View
40 CHANGELOG.md
@@ -1,14 +1,30 @@
+# v3.1.0-rc1
+
+* 'ClusterChef has been renamed 'Ironfan'
+* The 'Metachef' cookbook has been renamed 'Silverware'
+* The 'Minidash' cookbook has been renamed 'Minidash'
+
+Please be sure you do a
+
+ knife cookbook delete metachef minidash
+ knife cookbook upload --all
+
+These renames unfortunately hit every cookbook that depends on (what is now) silverware.
+
+__________________________________________________________________________
+__________________________________________________________________________
+
## v3.0.14:
Big important change:
-# ClusterChef is now Ironfan
+# Ironfan is now Ironfan
Due to a polite request from outside, we are changing this project's name to not include the word 'Chef'.
It's now 'Ironfan', after Princess Iron Fan from the legend of Sun Wukong (Voyage to the West). The monkey hero Sun Wukong could not reach his destination without the help of the Princess's Iron Fan. The project helps you fan out across big iron in the sky -- and "You Can't Do B.I. without a Big Ironfan".
-This weekend (2/18) everything in the cluster_chef family of everything will get regex-replaced as ironfan. We'll track both gems for the next push or so, but new versions of the gem will not be released after Feb 2012.
+This weekend (2/18) everything in the ironfan family of everything will get regex-replaced as ironfan. We'll track both gems for the next push or so, but new versions of the gem will not be released after Feb 2012.
Other improvements/fixes:
@@ -39,7 +55,7 @@ Other improvements/fixes:
## v3.0.10: Cloud fixes
* security groups are now created/updated in knife cluster sync. This can't help you apply then to a node afer launch though -- nothing can, the API doesn't allow it.
-* clusters now all refer to an AMI named `cluster_chef-natty` by default, and to customizable roles `org_base`, `org_final` and `org_users` (where `org_base` has a role_implication for membership in the systemwide `org_base` security group)
+* clusters now all refer to an AMI named `ironfan-natty` by default, and to customizable roles `org_base`, `org_final` and `org_users` (where `org_base` has a role_implication for membership in the systemwide `org_base` security group)
* default facet instances is now 1 who knows why it wasn't always 1.
* minor linting of cluster before launching it
* bump to latest versions of oneiric AMIs thx @redbeard
@@ -48,8 +64,8 @@ Other improvements/fixes:
## v3.0.6: schism of cookbooks and tools
-* cookbooks all now live in [their own repo](https://github.com/infochimps-labs/cluster_chef-homebase), organized according to opscode standard.
-* gem is now split into `cluster_chef` (the libraries) and `cluster_chef-knife` (the chef plugins)
+* cookbooks all now live in [their own repo](https://github.com/infochimps-labs/ironfan-homebase), organized according to opscode standard.
+* gem is now split into `ironfan` (the libraries) and `ironfan-knife` (the chef plugins)
* private_key was passing its block to super, with bad results
## Changes from v2 => v3 [2011 October]
@@ -58,15 +74,15 @@ Other improvements/fixes:
_________
-ClusterChef underwent a major upgrade with the last several commits.
+Ironfan underwent a major upgrade with the last several commits.
-* the `cluster_chef` tools -- the DSL, knife plugins, and bootstrap scripts -- have been split out of the [cluster_chef repo](http://github.com/infochimps/cluster_chef) into a [separate repo](http://github.com/infochimps/cluster_chef-tools).
-* The tools are now available as a gem -- `gem install cluster_chef`
+* the `ironfan` tools -- the DSL, knife plugins, and bootstrap scripts -- have been split out of the [ironfan repo](http://github.com/infochimps-labs/ironfan) into a [separate repo](http://github.com/infochimps-labs/ironfan-tools).
+* The tools are now available as a gem -- `gem install ironfan`
* Cleaned up the code
* Standardized clusters & roles
* Standardized cookbooks
-### ClusterChef DSL Changes
+### Ironfan DSL Changes
The following behaviors have been removed:
@@ -95,8 +111,8 @@ Several knife scripts saw name changes to their params. If you have external scr
### Cookbook-affecting changes
-* Standardized on `node[:cluster_name]`, `node[:facet_name]` and `node[:facet_index]` as the way to refer to the cluster, facet and server parts of a node's name. This replaces the way-too-many names for these: `node[:cluster_chef][:facet]` and `node[:cluster_role]` (use `node[:facet_name]`), `node[:cluster_chef][:index]` and `node[:cluster_role_index]` (use `node[:facet_index]`) .
-* ClusterChef family of cookbooks were updated accordingly.
+* Standardized on `node[:cluster_name]`, `node[:facet_name]` and `node[:facet_index]` as the way to refer to the cluster, facet and server parts of a node's name. This replaces the way-too-many names for these: `node[:ironfan][:facet]` and `node[:cluster_role]` (use `node[:facet_name]`), `node[:ironfan][:index]` and `node[:cluster_role_index]` (use `node[:facet_index]`) .
+* Ironfan family of cookbooks were updated accordingly.
#### hadoop_cluster cookbook
@@ -108,7 +124,7 @@ Several knife scripts saw name changes to their params. If you have external scr
#### Deprecated cookbooks
-You must add `"#{cluster_chef_path}/deprecated-cookbooks"` to your cookbook_path in knife.rb if you would like to keep using
+You must add `"#{ironfan_path}/deprecated-cookbooks"` to your cookbook_path in knife.rb if you would like to keep using
* `cluster_ebs_volumes` -- use `mountable_volumes` instead.
View
38 README.md
@@ -1,4 +1,4 @@
-# cluster_chef
+# ironfan
Infrastructure as code: describe and orchestrate whole clusters of cloud or virtual machines.
@@ -7,7 +7,7 @@ Infrastructure as code: describe and orchestrate whole clusters of cloud or virt
Here's a very simple cluster:
```ruby
-ClusterChef.cluster 'webapp_demo' do
+Ironfan.cluster 'webapp_demo' do
cloud(:ec2) do
flavor 't1.micro'
end
@@ -80,7 +80,7 @@ The commands available are
Let's say that app is truly awesome, and the features and demand increases. This cluster adds an [ElasticSearch server](http://elasticsearch.org) for searching, a haproxy loadbalancer, and spreads the webnodes across two availability zones.
```ruby
-ClusterChef.cluster 'webserver_demo_2' do
+Ironfan.cluster 'webserver_demo_2' do
cloud(:ec2) do
image_name "maverick"
flavor "t1.micro"
@@ -147,7 +147,7 @@ end
The facets are described and scale independently. If you'd like to add more webnodes, just increase the instance count. If a machine misbehaves, just terminate it. Running `knife cluster launch webapp_demo webnode` will note which machines are missing, and launch and configure them appropriately.
-ClusterChef speaks naturally to both Chef and your cloud provider. The esnode's `cluster_role.override_attributes` statement will be synchronized to the chef server, pinning the elasticsearch version across the clients and server.. Your chef roles should focus system-specific information; the cluster file lets you see the architecture as a whole.
+Ironfan speaks naturally to both Chef and your cloud provider. The esnode's `cluster_role.override_attributes` statement will be synchronized to the chef server, pinning the elasticsearch version across the clients and server.. Your chef roles should focus system-specific information; the cluster file lets you see the architecture as a whole.
With these simple settings, if you have already [set up chef's knife to launch cloud servers](http://wiki.opscode.com/display/chef/Launch+Cloud+Instances+with+Knife), typing `knife cluster launch demosimple --bootstrap` will (using Amazon EC2 as an example):
@@ -160,12 +160,12 @@ With these simple settings, if you have already [set up chef's knife to launch c
- uses a keypair (login ssh key) isolated to that cluster
- Recognizes the `ssh` role, and add a security group `ssh` that by default opens port 22.
- Recognize the `nfs_server` role, and adds security groups `nfs_server` and `nfs_client`
- - Authorizes the `nfs_server` to accept connections from all `nfs_client`s. Machines in other clusters that you mark as `nfs_client`s can connect to the NFS server, but are not automatically granted any other access to the machines in this cluster. ClusterChef's opinionated behavior is about more than saving you effort -- tying this behavior to the chef role means you can't screw it up.
+ - Authorizes the `nfs_server` to accept connections from all `nfs_client`s. Machines in other clusters that you mark as `nfs_client`s can connect to the NFS server, but are not automatically granted any other access to the machines in this cluster. Ironfan's opinionated behavior is about more than saving you effort -- tying this behavior to the chef role means you can't screw it up.
* Launches the machines in parallel:
- using the image name and the availability zone, it determines the appropriate region, image ID, and other implied behavior.
- passes a JSON-encoded user_data hash specifying the machine's chef `node_name` and client key. An appropriately-configured machine image will need no further bootstrapping -- it will connect to the chef server with the appropriate identity and proceed completely unattended.
* Syncronizes to the cloud provider:
- - Applies EC2 tags to the machine, making your console intelligible: ![AWS Console screenshot](https://github.com/infochimps/cluster_chef/raw/version_3/notes/aws_console_screenshot.jpg)
+ - Applies EC2 tags to the machine, making your console intelligible: ![AWS Console screenshot](https://github.com/infochimps-labs/ironfan/raw/version_3/notes/aws_console_screenshot.jpg)
- Connects external (EBS) volumes, if any, to the correct mount point -- it uses (and applies) tags to the volumes, so they know which machine to adhere to. If you've manually added volumes, just make sure they're defined correctly in your cluster file and run `knife cluster sync {cluster_name}`; it will paint them with the correct tags.
- Associates an elastic IP, if any, to the machine
* Bootstraps the machine using knife bootstrap
@@ -188,16 +188,16 @@ Let's create a cluster called 'demosimple'. It's, well, a simple demo cluster.
#### Create a simple demo cluster
-Create a directory for your clusters; copy the demosimple cluster and its associated roles from cluster_chef:
+Create a directory for your clusters; copy the demosimple cluster and its associated roles from ironfan:
```ruby
mkdir -p $CHEF_REPO_DIR/clusters
- cp cluster_chef/clusters/{defaults,demosimple}.rb ./clusters/
- cp cluster_chef/roles/{big_package,nfs_*,ssh,base_role,chef_client}.rb ./roles/
+ cp ironfan/clusters/{defaults,demosimple}.rb ./clusters/
+ cp ironfan/roles/{big_package,nfs_*,ssh,base_role,chef_client}.rb ./roles/
```
Lastly, add the `cookbooks`, `site-cookbooks`, and `meta-cookbooks` directories
-from cluster_chef to the `cookbooks_path` in your knife.rb, and push everything
+from ironfan to the `cookbooks_path` in your knife.rb, and push everything
to the chef server. (see below for details).
#### knife cluster launch
@@ -264,19 +264,19 @@ Next,
* sign up for an AWS account
* Follow the "Knife with AWS quickstart": on the opscode wiki.
-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/cluster_chef/issues/28 or get in touch.
+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.
#### Knife setup
-In your `.chef/knife.rb`, modify the cookbook path to include cluster_chef's `cookbooks`, `meta-cookbooks` and `site-cookbooks`, and to add settings for `cluster_chef_path`, `cluster_path` and `keypair_path`. Here's mine:
+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:
```
current_dir = File.dirname(__FILE__)
organization = 'CHEF_ORGANIZATION'
username = 'CHEF_USERNAME'
- # The full path to your cluster_chef installation
- cluster_chef_path File.expand_path("#{current_dir}/../cluster_chef")
+ # The full path to your ironfan installation
+ ironfan_path File.expand_path("#{current_dir}/../ironfan")
# The list of paths holding clusters
cluster_path [ File.expand_path("#{current_dir}/../clusters") ]
# The directory holding your cloud keypairs
@@ -294,9 +294,9 @@ In your `.chef/knife.rb`, modify the cookbook path to include cluster_chef's `co
# The first things have lowest priority (so, site-cookbooks gets to win)
cookbook_path [
- "#{cluster_chef_path}/cookbooks", # std cookbooks from opscode/cookbooks
- "#{cluster_chef_path}/meta-cookbooks", # coordinate services among cookbooks
- "#{cluster_chef_path}/site-cookbooks", # infochimps' collection of cookbooks
+ "#{ironfan_path}/cookbooks", # std cookbooks from opscode/cookbooks
+ "#{ironfan_path}/meta-cookbooks", # coordinate services among cookbooks
+ "#{ironfan_path}/site-cookbooks", # infochimps' collection of cookbooks
"#{current_dir}/../cookbooks",
"#{current_dir}/../site-cookbooks", # your internal cookbooks
]
@@ -316,7 +316,7 @@ In your `.chef/knife.rb`, modify the cookbook path to include cluster_chef's `co
#### Push to chef server
-To send all the cookbooks and role to the chef server, visit your cluster_chef directory and run:
+To send all the cookbooks and role to the chef server, visit your ironfan directory and run:
```ruby
cd $CHEF_REPO_DIR
@@ -325,4 +325,4 @@ To send all the cookbooks and role to the chef server, visit your cluster_chef d
for foo in roles/*.rb ; do knife role from file $foo & sleep 1 ; done
```
-You should see all the cookbooks defined in cluster_chef/cookbooks (ant, apt, ...) listed among those it uploads.
+You should see all the cookbooks defined in ironfan/cookbooks (ant, apt, ...) listed among those it uploads.
View
2 Rakefile
@@ -40,7 +40,7 @@ Dir[File.join('tasks', '*.rake')].sort.each{|f| load(f) }
# ---------------------------------------------------------------------------
#
-# Jeweler -- release cluster_chef as a gem
+# Jeweler -- release ironfan as a gem
#
gems_to_release = ENV['GEMS_TO_RELEASE'] ? ENV['GEMS_TO_RELEASE'].split : %w[ cluster_chef cluster_chef-knife ]
View
2 TODO.md
@@ -4,7 +4,7 @@
### Knife commands
* knife cluster kick fails if service isn't running
-* make clear directions for installing `cluster_chef` and its initial use.
+* make clear directions for installing `ironfan` and its initial use.
* knife cluster launch should fail differently if you give it a facet that doesn't exist
View
31 cluster_chef-knife.gemspec
@@ -4,13 +4,13 @@
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
- s.name = "cluster_chef-knife"
+ s.name = "ironfan-knife"
s.version = "3.0.14"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Infochimps"]
s.date = "2012-02-15"
- s.description = "cluster_chef-knife 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."
+ s.description = "ironfan-knife 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."
s.email = "coders@infochimps.com"
s.extra_rdoc_files = [
"LICENSE",
@@ -27,14 +27,14 @@ Gem::Specification.new do |s|
"TODO.md",
"VERSION",
"chefignore",
- "cluster_chef-knife.gemspec",
+ "ironfan-knife.gemspec",
"config/client.rb",
"config/proxy.pac",
- "config/ubuntu10.04-cluster_chef.erb",
- "config/ubuntu11.10-cluster_chef.erb",
+ "config/ubuntu10.04-ironfan.erb",
+ "config/ubuntu11.10-ironfan.erb",
"ironfan.gemspec",
- "lib/chef/knife/bootstrap/ubuntu10.04-cluster_chef.erb",
- "lib/chef/knife/bootstrap/ubuntu11.10-cluster_chef.erb",
+ "lib/chef/knife/bootstrap/ubuntu10.04-ironfan.erb",
+ "lib/chef/knife/bootstrap/ubuntu11.10-ironfan.erb",
"lib/chef/knife/cluster_bootstrap.rb",
"lib/chef/knife/cluster_kick.rb",
"lib/chef/knife/cluster_kill.rb",
@@ -50,11 +50,11 @@ Gem::Specification.new do |s|
"lib/chef/knife/knife_common.rb",
"notes/aws_console_screenshot.jpg",
"rspec.watchr",
- "spec/cluster_chef/cluster_spec.rb",
- "spec/cluster_chef/facet_spec.rb",
- "spec/cluster_chef/server_slice_spec.rb",
- "spec/cluster_chef/server_spec.rb",
- "spec/cluster_chef_spec.rb",
+ "spec/ironfan/cluster_spec.rb",
+ "spec/ironfan/facet_spec.rb",
+ "spec/ironfan/server_slice_spec.rb",
+ "spec/ironfan/server_spec.rb",
+ "spec/ironfan_spec.rb",
"spec/spec_helper.rb",
"spec/spec_helper/dummy_chef.rb",
"spec/test_config.rb",
@@ -63,11 +63,11 @@ Gem::Specification.new do |s|
]
s.homepage = "http://infochimps.com/labs"
s.licenses = ["apachev2"]
- s.post_install_message = "!! This gem has been renamed 'ironfan' (from cluster_chef). \n It will not be updated after Feb. 2012. \n Sorry for the inconvenience."
+ s.post_install_message = "!! This gem has been renamed 'ironfan' (from ironfan). \n It will not be updated after Feb. 2012. \n Sorry for the inconvenience."
s.require_paths = ["lib"]
s.rubygems_version = "1.8.15"
- s.summary = "cluster_chef-knife 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."
- s.test_files = ["spec/cluster_chef/cluster_spec.rb", "spec/cluster_chef/facet_spec.rb", "spec/cluster_chef/server_slice_spec.rb", "spec/cluster_chef/server_spec.rb", "spec/cluster_chef_spec.rb", "spec/spec_helper/dummy_chef.rb", "spec/spec_helper.rb", "spec/test_config.rb"]
+ s.summary = "ironfan-knife 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."
+ s.test_files = ["spec/ironfan/cluster_spec.rb", "spec/ironfan/facet_spec.rb", "spec/ironfan/server_slice_spec.rb", "spec/ironfan/server_spec.rb", "spec/ironfan_spec.rb", "spec/spec_helper/dummy_chef.rb", "spec/spec_helper.rb", "spec/test_config.rb"]
if s.respond_to? :specification_version then
s.specification_version = 3
@@ -105,4 +105,3 @@ Gem::Specification.new do |s|
s.add_dependency(%q<configliere>, ["~> 0.4.8"])
end
end
-
View
65 cluster_chef.gemspec
@@ -4,13 +4,13 @@
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
- s.name = "cluster_chef"
+ s.name = "ironfan"
s.version = "3.0.14"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Infochimps"]
s.date = "2012-02-15"
- s.description = "cluster_chef 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."
+ 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."
s.email = "coders@infochimps.com"
s.extra_rdoc_files = [
"LICENSE",
@@ -27,35 +27,35 @@ Gem::Specification.new do |s|
"TODO.md",
"VERSION",
"chefignore",
- "cluster_chef.gemspec",
+ "ironfan.gemspec",
"config/client.rb",
"config/proxy.pac",
- "config/ubuntu10.04-cluster_chef.erb",
- "config/ubuntu11.10-cluster_chef.erb",
+ "config/ubuntu10.04-ironfan.erb",
+ "config/ubuntu11.10-ironfan.erb",
"ironfan.gemspec",
- "lib/cluster_chef.rb",
- "lib/cluster_chef/chef_layer.rb",
- "lib/cluster_chef/cloud.rb",
- "lib/cluster_chef/cluster.rb",
- "lib/cluster_chef/compute.rb",
- "lib/cluster_chef/deprecated.rb",
- "lib/cluster_chef/discovery.rb",
- "lib/cluster_chef/dsl_object.rb",
- "lib/cluster_chef/facet.rb",
- "lib/cluster_chef/fog_layer.rb",
- "lib/cluster_chef/private_key.rb",
- "lib/cluster_chef/role_implications.rb",
- "lib/cluster_chef/security_group.rb",
- "lib/cluster_chef/server.rb",
- "lib/cluster_chef/server_slice.rb",
- "lib/cluster_chef/volume.rb",
+ "lib/ironfan.rb",
+ "lib/ironfan/chef_layer.rb",
+ "lib/ironfan/cloud.rb",
+ "lib/ironfan/cluster.rb",
+ "lib/ironfan/compute.rb",
+ "lib/ironfan/deprecated.rb",
+ "lib/ironfan/discovery.rb",
+ "lib/ironfan/dsl_object.rb",
+ "lib/ironfan/facet.rb",
+ "lib/ironfan/fog_layer.rb",
+ "lib/ironfan/private_key.rb",
+ "lib/ironfan/role_implications.rb",
+ "lib/ironfan/security_group.rb",
+ "lib/ironfan/server.rb",
+ "lib/ironfan/server_slice.rb",
+ "lib/ironfan/volume.rb",
"notes/aws_console_screenshot.jpg",
"rspec.watchr",
- "spec/cluster_chef/cluster_spec.rb",
- "spec/cluster_chef/facet_spec.rb",
- "spec/cluster_chef/server_slice_spec.rb",
- "spec/cluster_chef/server_spec.rb",
- "spec/cluster_chef_spec.rb",
+ "spec/ironfan/cluster_spec.rb",
+ "spec/ironfan/facet_spec.rb",
+ "spec/ironfan/server_slice_spec.rb",
+ "spec/ironfan/server_spec.rb",
+ "spec/ironfan_spec.rb",
"spec/spec_helper.rb",
"spec/spec_helper/dummy_chef.rb",
"spec/test_config.rb",
@@ -64,11 +64,11 @@ Gem::Specification.new do |s|
]
s.homepage = "http://infochimps.com/labs"
s.licenses = ["apachev2"]
- s.post_install_message = "!! This gem has been renamed 'ironfan' (from cluster_chef). \n It will not be updated after Feb. 2012. \n Sorry for the inconvenience."
+ s.post_install_message = "!! This gem has been renamed 'ironfan' (from ironfan). \n It will not be updated after Feb. 2012. \n Sorry for the inconvenience."
s.require_paths = ["lib"]
s.rubygems_version = "1.8.15"
- s.summary = "cluster_chef 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."
- s.test_files = ["spec/cluster_chef/cluster_spec.rb", "spec/cluster_chef/facet_spec.rb", "spec/cluster_chef/server_slice_spec.rb", "spec/cluster_chef/server_spec.rb", "spec/cluster_chef_spec.rb", "spec/spec_helper/dummy_chef.rb", "spec/spec_helper.rb", "spec/test_config.rb"]
+ s.summary = "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."
+ s.test_files = ["spec/ironfan/cluster_spec.rb", "spec/ironfan/facet_spec.rb", "spec/ironfan/server_slice_spec.rb", "spec/ironfan/server_spec.rb", "spec/ironfan_spec.rb", "spec/spec_helper/dummy_chef.rb", "spec/spec_helper.rb", "spec/test_config.rb"]
if s.respond_to? :specification_version then
s.specification_version = 3
@@ -83,7 +83,7 @@ Gem::Specification.new do |s|
s.add_development_dependency(%q<rspec>, ["~> 2.5"])
s.add_development_dependency(%q<yard>, ["~> 0.6"])
s.add_development_dependency(%q<configliere>, ["~> 0.4.8"])
- s.add_runtime_dependency(%q<cluster_chef-knife>, ["= 3.0.14"])
+ s.add_runtime_dependency(%q<ironfan-knife>, ["= 3.0.14"])
else
s.add_dependency(%q<chef>, ["~> 0.10.4"])
s.add_dependency(%q<fog>, ["~> 1.1.1"])
@@ -94,7 +94,7 @@ Gem::Specification.new do |s|
s.add_dependency(%q<rspec>, ["~> 2.5"])
s.add_dependency(%q<yard>, ["~> 0.6"])
s.add_dependency(%q<configliere>, ["~> 0.4.8"])
- s.add_dependency(%q<cluster_chef-knife>, ["= 3.0.14"])
+ s.add_dependency(%q<ironfan-knife>, ["= 3.0.14"])
end
else
s.add_dependency(%q<chef>, ["~> 0.10.4"])
@@ -106,7 +106,6 @@ Gem::Specification.new do |s|
s.add_dependency(%q<rspec>, ["~> 2.5"])
s.add_dependency(%q<yard>, ["~> 0.6"])
s.add_dependency(%q<configliere>, ["~> 0.4.8"])
- s.add_dependency(%q<cluster_chef-knife>, ["= 3.0.14"])
+ s.add_dependency(%q<ironfan-knife>, ["= 3.0.14"])
end
end
-
View
1 config/ubuntu10.04-cluster_chef.erb
View
1 config/ubuntu10.04-ironfan.erb
View
1 config/ubuntu11.10-cluster_chef.erb
View
1 config/ubuntu11.10-ironfan.erb
View
57 ironfan.gemspec
@@ -27,14 +27,14 @@ Gem::Specification.new do |s|
"TODO.md",
"VERSION",
"chefignore",
- "cluster_chef-knife.gemspec",
- "cluster_chef.gemspec",
+ "ironfan-knife.gemspec",
+ "ironfan.gemspec",
"config/client.rb",
"config/proxy.pac",
- "config/ubuntu10.04-cluster_chef.erb",
- "config/ubuntu11.10-cluster_chef.erb",
- "lib/chef/knife/bootstrap/ubuntu10.04-cluster_chef.erb",
- "lib/chef/knife/bootstrap/ubuntu11.10-cluster_chef.erb",
+ "config/ubuntu10.04-ironfan.erb",
+ "config/ubuntu11.10-ironfan.erb",
+ "lib/chef/knife/bootstrap/ubuntu10.04-ironfan.erb",
+ "lib/chef/knife/bootstrap/ubuntu11.10-ironfan.erb",
"lib/chef/knife/cluster_bootstrap.rb",
"lib/chef/knife/cluster_kick.rb",
"lib/chef/knife/cluster_kill.rb",
@@ -48,29 +48,29 @@ Gem::Specification.new do |s|
"lib/chef/knife/cluster_sync.rb",
"lib/chef/knife/generic_command.rb",
"lib/chef/knife/knife_common.rb",
- "lib/cluster_chef.rb",
- "lib/cluster_chef/chef_layer.rb",
- "lib/cluster_chef/cloud.rb",
- "lib/cluster_chef/cluster.rb",
- "lib/cluster_chef/compute.rb",
- "lib/cluster_chef/deprecated.rb",
- "lib/cluster_chef/discovery.rb",
- "lib/cluster_chef/dsl_object.rb",
- "lib/cluster_chef/facet.rb",
- "lib/cluster_chef/fog_layer.rb",
- "lib/cluster_chef/private_key.rb",
- "lib/cluster_chef/role_implications.rb",
- "lib/cluster_chef/security_group.rb",
- "lib/cluster_chef/server.rb",
- "lib/cluster_chef/server_slice.rb",
- "lib/cluster_chef/volume.rb",
+ "lib/ironfan.rb",
+ "lib/ironfan/chef_layer.rb",
+ "lib/ironfan/cloud.rb",
+ "lib/ironfan/cluster.rb",
+ "lib/ironfan/compute.rb",
+ "lib/ironfan/deprecated.rb",
+ "lib/ironfan/discovery.rb",
+ "lib/ironfan/dsl_object.rb",
+ "lib/ironfan/facet.rb",
+ "lib/ironfan/fog_layer.rb",
+ "lib/ironfan/private_key.rb",
+ "lib/ironfan/role_implications.rb",
+ "lib/ironfan/security_group.rb",
+ "lib/ironfan/server.rb",
+ "lib/ironfan/server_slice.rb",
+ "lib/ironfan/volume.rb",
"notes/aws_console_screenshot.jpg",
"rspec.watchr",
- "spec/cluster_chef/cluster_spec.rb",
- "spec/cluster_chef/facet_spec.rb",
- "spec/cluster_chef/server_slice_spec.rb",
- "spec/cluster_chef/server_spec.rb",
- "spec/cluster_chef_spec.rb",
+ "spec/ironfan/cluster_spec.rb",
+ "spec/ironfan/facet_spec.rb",
+ "spec/ironfan/server_slice_spec.rb",
+ "spec/ironfan/server_spec.rb",
+ "spec/ironfan_spec.rb",
"spec/spec_helper.rb",
"spec/spec_helper/dummy_chef.rb",
"spec/test_config.rb",
@@ -82,7 +82,7 @@ Gem::Specification.new do |s|
s.require_paths = ["lib"]
s.rubygems_version = "1.8.15"
s.summary = "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."
- s.test_files = ["spec/cluster_chef/cluster_spec.rb", "spec/cluster_chef/facet_spec.rb", "spec/cluster_chef/server_slice_spec.rb", "spec/cluster_chef/server_spec.rb", "spec/cluster_chef_spec.rb", "spec/spec_helper/dummy_chef.rb", "spec/spec_helper.rb", "spec/test_config.rb"]
+ s.test_files = ["spec/ironfan/cluster_spec.rb", "spec/ironfan/facet_spec.rb", "spec/ironfan/server_slice_spec.rb", "spec/ironfan/server_spec.rb", "spec/ironfan_spec.rb", "spec/spec_helper/dummy_chef.rb", "spec/spec_helper.rb", "spec/test_config.rb"]
if s.respond_to? :specification_version then
s.specification_version = 3
@@ -120,4 +120,3 @@ Gem::Specification.new do |s|
s.add_dependency(%q<configliere>, ["~> 0.4.8"])
end
end
-
View
2 ...fe/bootstrap/ubuntu10.04-cluster_chef.erb → ...f/knife/bootstrap/ubuntu10.04-ironfan.erb
@@ -1,6 +1,6 @@
bash <<EOF || echo "Chef bootstrap failed!"
-# This is the ubuntu natty bootstrap script from infochimps' cluster_chef. It is
+# This is the ubuntu natty bootstrap script from infochimps' ironfan. It is
# based on opscode's bootstrap script, with the following important differences:
#
# * installs ruby 1.9.2 (not 1.8.7) from source
View
2 ...fe/bootstrap/ubuntu11.10-cluster_chef.erb → ...f/knife/bootstrap/ubuntu11.10-ironfan.erb
@@ -1,6 +1,6 @@
bash <<EOF || echo "Chef bootstrap failed!"
-# This is the ubuntu oneiric bootstrap script from infochimps' cluster_chef. It is
+# This is the ubuntu oneiric bootstrap script from infochimps' ironfan. It is
# based on the opscode bootstrap script, with the important differences being it:
#
# * installs ruby 1.9.2 (not 1.8.7) using the system ruby
View
6 lib/chef/knife/cluster_bootstrap.rb
@@ -21,7 +21,7 @@
class Chef
class Knife
- class ClusterBootstrap < ClusterChef::Script
+ class ClusterBootstrap < Ironfan::Script
option :ssh_user,
:long => "--ssh-user USERNAME",
@@ -51,11 +51,11 @@ class ClusterBootstrap < ClusterChef::Script
import_banner_and_options(Chef::Knife::Bootstrap,
:except => [:chef_node_name, :run_list, :ssh_user, :distro, :template_file, :no_host_key_verify, :host_key_verify])
- import_banner_and_options(ClusterChef::Script)
+ import_banner_and_options(Ironfan::Script)
deps do
Chef::Knife::Bootstrap.load_deps
- ClusterChef::Script.load_deps
+ Ironfan::Script.load_deps
end
def perform_execution(target)
View
4 lib/chef/knife/cluster_kill.rb
@@ -20,8 +20,8 @@
class Chef
class Knife
- class ClusterKill < ClusterChef::Script
- import_banner_and_options(ClusterChef::Script)
+ class ClusterKill < Ironfan::Script
+ import_banner_and_options(Ironfan::Script)
option :kill_bogus,
:long => "--kill-bogus",
View
6 lib/chef/knife/cluster_launch.rb
@@ -22,7 +22,7 @@
class Chef
class Knife
class ClusterLaunch < Knife
- include ClusterChef::KnifeCommon
+ include Ironfan::KnifeCommon
deps do
require 'time'
@@ -56,7 +56,7 @@ class ClusterLaunch < Knife
:default => false
def run
- load_cluster_chef
+ load_ironfan
die(banner) if @name_args.empty?
configure_dry_run
@@ -109,7 +109,7 @@ def perform_after_launch_tasks(server)
end
# Make sure our list of volumes is accurate
- ClusterChef.fetch_fog_volumes
+ Ironfan.fetch_fog_volumes
server.discover_volumes!
# Attach volumes, etc
View
8 lib/chef/knife/cluster_list.rb
@@ -21,7 +21,7 @@
class Chef
class Knife
class ClusterList < Knife
- include ClusterChef::KnifeCommon
+ include Ironfan::KnifeCommon
deps do
require 'formatador'
@@ -30,17 +30,17 @@ class ClusterList < Knife
banner "knife cluster list (options)"
def run
- load_cluster_chef
+ load_ironfan
configure_dry_run
- hash = ClusterChef.cluster_filenames
+ hash = Ironfan.cluster_filenames
table = []
hash.keys.sort.each do |key|
table.push( { :cluster => key, :path => hash[key] } )
end
- ui.info "Cluster Path: #{ ClusterChef.cluster_path.join ", " }"
+ ui.info "Cluster Path: #{ Ironfan.cluster_path.join ", " }"
Formatador.display_compact_table(table, [:cluster,:path])
View
10 lib/chef/knife/cluster_proxy.rb
@@ -25,16 +25,16 @@ class Knife
#
# Runs the ssh command to open a SOCKS proxy to the given host, and writes a
# PAC (automatic proxy config) file to
- # /tmp/cluster_chef_proxy-YOURNAME.pac. Only the first host is used, even if
+ # /tmp/ironfan_proxy-YOURNAME.pac. Only the first host is used, even if
# multiple match.
#
# Why not use Net::Ssh directly? The SOCKS proxy support was pretty
# bad. Though ugly, exec'ing the command works.
#
- class ClusterProxy < ClusterChef::Script
+ class ClusterProxy < Ironfan::Script
import_banner_and_options(Chef::Knife::ClusterSsh, :except => [:concurrency, ])
- 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/cluster_chef_proxy-YOURNAME.pac. Only the first host is used, even if multiple match.'
+ 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.'
option :background,
:long => "--[no-]background",
@@ -93,10 +93,10 @@ def command_for_target(svr)
#
# Write a .pac (automatic proxy configuration) file
- # to /etc/cluster_chef_proxy-YOURNAME.pac
+ # to /etc/ironfan_proxy-YOURNAME.pac
#
def dump_proxy_pac
- pac_filename = File.expand_path(File.join('/tmp', "cluster_chef_proxy-#{ENV['USER']}.pac"))
+ pac_filename = File.expand_path(File.join('/tmp', "ironfan_proxy-#{ENV['USER']}.pac"))
ui.info("point your browser at PAC (automatic proxy config file) file://#{pac_filename}")
File.open(pac_filename, 'w') do |f|
f.print proxy_pac_contents
View
6 lib/chef/knife/cluster_show.rb
@@ -21,9 +21,9 @@
class Chef
class Knife
class ClusterShow < Knife
- include ClusterChef::KnifeCommon
+ include Ironfan::KnifeCommon
deps do
- ClusterChef::KnifeCommon.load_deps
+ Ironfan::KnifeCommon.load_deps
end
banner "knife cluster show CLUSTER_NAME [FACET_NAME [INDEXES]] (options)"
@@ -34,7 +34,7 @@ class ClusterShow < Knife
:boolean => true
def run
- load_cluster_chef
+ load_ironfan
die(banner) if @name_args.empty?
configure_dry_run
View
6 lib/chef/knife/cluster_ssh.rb
@@ -22,11 +22,11 @@
class Chef
class Knife
class ClusterSsh < Chef::Knife::Ssh
- include ClusterChef::KnifeCommon
+ include Ironfan::KnifeCommon
deps do
Chef::Knife::Ssh.load_deps
- ClusterChef::KnifeCommon.load_deps
+ Ironfan::KnifeCommon.load_deps
end
banner 'knife cluster ssh "CLUSTER [FACET [INDEXES]]" COMMAND (options)'
@@ -116,7 +116,7 @@ def cssh
end
def run
- load_cluster_chef
+ load_ironfan
die(banner) if @name_args.empty?
extend Chef::Mixin::Command
View
4 lib/chef/knife/cluster_start.rb
@@ -21,8 +21,8 @@
class Chef
class Knife
- class ClusterStart < ClusterChef::Script
- import_banner_and_options(ClusterChef::Script)
+ class ClusterStart < Ironfan::Script
+ import_banner_and_options(Ironfan::Script)
def relevant?(server)
server.startable?
View
4 lib/chef/knife/cluster_stop.rb
@@ -19,8 +19,8 @@
class Chef
class Knife
- class ClusterStop < ClusterChef::Script
- import_banner_and_options(ClusterChef::Script)
+ class ClusterStop < Ironfan::Script
+ import_banner_and_options(Ironfan::Script)
def relevant?(server)
server.running?
View
4 lib/chef/knife/cluster_sync.rb
@@ -20,8 +20,8 @@
class Chef
class Knife
- class ClusterSync < ClusterChef::Script
- import_banner_and_options(ClusterChef::Script)
+ class ClusterSync < Ironfan::Script
+ import_banner_and_options(Ironfan::Script)
option :cloud,
:long => "--[no-]cloud",
View
8 lib/chef/knife/generic_command.rb
@@ -18,12 +18,12 @@
require File.expand_path(File.dirname(__FILE__)+"/knife_common.rb")
-module ClusterChef
+module Ironfan
class Script < Chef::Knife
- include ClusterChef::KnifeCommon
+ include Ironfan::KnifeCommon
deps do
- ClusterChef::KnifeCommon.load_deps
+ Ironfan::KnifeCommon.load_deps
end
option :dry_run,
@@ -37,7 +37,7 @@ class Script < Chef::Knife
:boolean => true
def run
- load_cluster_chef
+ load_ironfan
die(banner) if @name_args.empty?
configure_dry_run
View
18 lib/chef/knife/knife_common.rb
@@ -1,6 +1,6 @@
require 'chef/knife'
-module ClusterChef
+module Ironfan
module KnifeCommon
def self.load_deps
@@ -10,12 +10,12 @@ def self.load_deps
require 'fog'
end
- def load_cluster_chef
- $LOAD_PATH << File.join(Chef::Config[:cluster_chef_path], '/lib') if Chef::Config[:cluster_chef_path]
- require 'cluster_chef'
+ def load_ironfan
+ $LOAD_PATH << File.join(Chef::Config[:ironfan_path], '/lib') if Chef::Config[:ironfan_path]
+ require 'ironfan'
$stdout.sync = true
- ClusterChef.ui = self.ui
- ClusterChef.chef_config = self.config
+ Ironfan.ui = self.ui
+ Ironfan.chef_config = self.config
end
#
@@ -26,13 +26,13 @@ def load_cluster_chef
# @param [Array, String] slice_indexes -- servers in that facet (or nil for all in facet).
# You must specify a facet if you use slice_indexes.
#
- # @return [ClusterChef::ServerSlice] the requested slice
+ # @return [Ironfan::ServerSlice] the requested slice
def get_slice(cluster_name, facet_name=nil, slice_indexes=nil)
if facet_name.nil? && slice_indexes.nil?
cluster_name, facet_name, slice_indexes = cluster_name.split(/[\s\-]/, 3)
end
ui.info("Inventorying servers in #{predicate_str(cluster_name, facet_name, slice_indexes)}")
- cluster = ClusterChef.load_cluster(cluster_name)
+ cluster = Ironfan.load_cluster(cluster_name)
cluster.resolve!
cluster.discover!
cluster.slice(facet_name, slice_indexes)
@@ -168,7 +168,7 @@ def section(desc, *style)
end
def die *args
- ClusterChef.die(*args)
+ Ironfan.die(*args)
end
module ClassMethods
View
44 lib/cluster_chef.rb → lib/ironfan.rb
@@ -7,25 +7,25 @@
require 'gorillib/hash/compact'
require 'set'
-require 'cluster_chef/dsl_object'
-require 'cluster_chef/cloud'
-require 'cluster_chef/security_group'
-require 'cluster_chef/compute' # base class for machine attributes
-require 'cluster_chef/facet' # similar machines within a cluster
-require 'cluster_chef/cluster' # group of machines with a common mission
-require 'cluster_chef/server' # realization of a specific facet
-require 'cluster_chef/discovery' # pair servers with Fog and Chef objects
-require 'cluster_chef/server_slice' # collection of server objects
-require 'cluster_chef/volume' # configure external and internal volumes
-require 'cluster_chef/private_key' # coordinate chef keys, cloud keypairs, etc
-require 'cluster_chef/role_implications' # make roles trigger other actions (security groups, etc)
+require 'ironfan/dsl_object'
+require 'ironfan/cloud'
+require 'ironfan/security_group'
+require 'ironfan/compute' # base class for machine attributes
+require 'ironfan/facet' # similar machines within a cluster
+require 'ironfan/cluster' # group of machines with a common mission
+require 'ironfan/server' # realization of a specific facet
+require 'ironfan/discovery' # pair servers with Fog and Chef objects
+require 'ironfan/server_slice' # collection of server objects
+require 'ironfan/volume' # configure external and internal volumes
+require 'ironfan/private_key' # coordinate chef keys, cloud keypairs, etc
+require 'ironfan/role_implications' # make roles trigger other actions (security groups, etc)
#
-require 'cluster_chef/chef_layer' # interface to chef for server actions
-require 'cluster_chef/fog_layer' # interface to fog for server actions
+require 'ironfan/chef_layer' # interface to chef for server actions
+require 'ironfan/fog_layer' # interface to fog for server actions
#
-require 'cluster_chef/deprecated' # stuff slated to go away
+require 'ironfan/deprecated' # stuff slated to go away
-module ClusterChef
+module Ironfan
# path to search for cluster definition files
def self.cluster_path
@@ -52,7 +52,7 @@ def self.chef_config() @chef_config ; end
# Defines a cluster with the given name.
#
# @example
- # ClusterChef.cluster 'demosimple' do
+ # Ironfan.cluster 'demosimple' do
# cloud :ec2 do
# availability_zones ['us-east-1d']
# flavor "t1.micro"
@@ -70,19 +70,19 @@ def self.chef_config() @chef_config ; end
#
def self.cluster(name, attrs={}, &block)
name = name.to_sym
- cl = ( self.clusters[name] ||= ClusterChef::Cluster.new(name, attrs) )
+ cl = ( self.clusters[name] ||= Ironfan::Cluster.new(name, attrs) )
cl.configure(&block)
cl
end
#
- # Return cluster if it's defined. Otherwise, search ClusterChef.cluster_path
+ # Return cluster if it's defined. Otherwise, search Ironfan.cluster_path
# for an eponymous file, load it, and return the cluster it defines.
#
# Raises an error if a matching file isn't found, or if loading that file
# doesn't define the requested cluster.
#
- # @return [ClusterChef::Cluster] the requested cluster
+ # @return [Ironfan::Cluster] the requested cluster
def self.load_cluster(cluster_name)
raise ArgumentError, "Please supply a cluster name" if cluster_name.to_s.empty?
return clusters[cluster_name] if clusters[cluster_name]
@@ -127,8 +127,8 @@ def self.die *strings
# Utility to turn an error into a warning
#
# @example
- # ClusterChef.safely do
- # ClusterChef.fog_connection.associate_address(self.fog_server.id, address)
+ # Ironfan.safely do
+ # Ironfan.fog_connection.associate_address(self.fog_server.id, address)
# end
#
def self.safely
View
12 lib/cluster_chef/chef_layer.rb → lib/ironfan/chef_layer.rb
@@ -25,12 +25,12 @@
#
#
-module ClusterChef
+module Ironfan
module DryRunnable
- # Run given block unless in dry_run mode (ClusterChef.chef_config[:dry_run]
+ # Run given block unless in dry_run mode (Ironfan.chef_config[:dry_run]
# is true)
def unless_dry_run
- if ClusterChef.chef_config[:dry_run]
+ if Ironfan.chef_config[:dry_run]
ui.info(" ... but not really (#{ui.color("dry run", :bold, :yellow)} for server #{name})")
else
yield
@@ -42,7 +42,7 @@ def unless_dry_run
def new_chef_role(role_name, cluster, facet=nil)
chef_role = Chef::Role.new
chef_role.name role_name
- chef_role.description "ClusterChef generated role for #{[cluster_name, facet_name].compact.join('-')}" unless chef_role.description
+ chef_role.description "Ironfan generated role for #{[cluster_name, facet_name].compact.join('-')}" unless chef_role.description
chef_role.instance_eval{ @cluster = cluster; @facet = facet; }
@chef_roles << chef_role
chef_role
@@ -60,7 +60,7 @@ def sync_roles
end
#
- # ClusterChef::Server methods that handle chef actions
+ # Ironfan::Server methods that handle chef actions
#
Server.class_eval do
include DryRunnable
@@ -136,7 +136,7 @@ def sync_chef_node
end
def client_key
- @client_key ||= ClusterChef::ChefClientKey.new("client-#{fullname}", chef_client) do |body|
+ @client_key ||= Ironfan::ChefClientKey.new("client-#{fullname}", chef_client) do |body|
chef_client.private_key(body) if chef_client.present? && body.present?
cloud.user_data(:client_key => body)
end
View
8 lib/cluster_chef/cloud.rb → lib/ironfan/cloud.rb
@@ -1,4 +1,4 @@
-module ClusterChef
+module Ironfan
module Cloud
#
@@ -45,7 +45,7 @@ module Cloud
# spot_price_fraction 0.4
# end
#
- class Base < ClusterChef::DslObject
+ class Base < Ironfan::DslObject
has_keys(
:name, :flavor, :image_name, :image_id, :keypair,
:chef_client_script, :public_ip, :permanent )
@@ -152,13 +152,13 @@ def defaults
# adds a security group to the cloud instance
def security_group(sg_name, hsh={}, &block)
sg_name = sg_name.to_s
- security_groups[sg_name] ||= ClusterChef::Cloud::SecurityGroup.new(self, sg_name)
+ security_groups[sg_name] ||= Ironfan::Cloud::SecurityGroup.new(self, sg_name)
security_groups[sg_name].configure(hsh, &block)
security_groups[sg_name]
end
# With a value, sets the spot price to the given fraction of the
- # instance's full price (as found in ClusterChef::Cloud::Aws::FLAVOR_INFO)
+ # instance's full price (as found in Ironfan::Cloud::Aws::FLAVOR_INFO)
# With no value, returns the spot price as a fraction of the full instance price.
def spot_price_fraction(val=nil)
if val
View
16 lib/cluster_chef/cluster.rb → lib/ironfan/cluster.rb
@@ -1,9 +1,9 @@
-module ClusterChef
+module Ironfan
#
# A cluster has many facets. Any setting applied here is merged with the facet
# at resolve time; if the facet explicitly sets any attributes they will win out.
#
- class Cluster < ClusterChef::ComputeBuilder
+ class Cluster < Ironfan::ComputeBuilder
attr_reader :facets, :undefined_servers
def initialize(name, attrs={})
@@ -46,11 +46,11 @@ def cluster_role(&block)
# @param [Hash] attrs -- attributes to configure on the object
# @yield a block to execute in the context of the object
#
- # @return [ClusterChef::Facet]
+ # @return [Ironfan::Facet]
#
def facet(facet_name, attrs={}, &block)
facet_name = facet_name.to_sym
- @facets[facet_name] ||= ClusterChef::Facet.new(self, facet_name)
+ @facets[facet_name] ||= Ironfan::Facet.new(self, facet_name)
@facets[facet_name].configure(attrs, &block)
@facets[facet_name]
end
@@ -65,10 +65,10 @@ def find_facet(facet_name)
# All servers in this facet, sorted by facet name and index
#
- # @return [ClusterChef::ServerSlice] slice containing all servers
+ # @return [Ironfan::ServerSlice] slice containing all servers
def servers
svrs = @facets.sort.map{|name, facet| facet.servers.to_a }
- ClusterChef::ServerSlice.new(self, svrs.flatten)
+ Ironfan::ServerSlice.new(self, svrs.flatten)
end
#
@@ -81,9 +81,9 @@ def servers
# @param [Array, String] slice_indexes -- servers in that facet (or nil for all in facet).
# You must specify a facet if you use slice_indexes.
#
- # @return [ClusterChef::ServerSlice] the requested slice
+ # @return [Ironfan::ServerSlice] the requested slice
def slice facet_name=nil, slice_indexes=nil
- return ClusterChef::ServerSlice.new(self, self.servers) if facet_name.nil?
+ return Ironfan::ServerSlice.new(self, self.servers) if facet_name.nil?
find_facet(facet_name).slice(slice_indexes)
end
View
16 lib/cluster_chef/compute.rb → lib/ironfan/compute.rb
@@ -1,8 +1,8 @@
-module ClusterChef
+module Ironfan
#
# Base class allowing us to layer settings for facet over cluster
#
- class ComputeBuilder < ClusterChef::DslObject
+ class ComputeBuilder < Ironfan::DslObject
attr_reader :cloud, :volumes, :chef_roles
has_keys :name, :bogosity, :environment
@@role_implications ||= Mash.new
@@ -38,7 +38,7 @@ def bogus?
#
def cloud(cloud_provider=nil, attrs={}, &block)
raise "Only have ec2 so far" if cloud_provider && (cloud_provider != :ec2)
- @cloud ||= ClusterChef::Cloud::Ec2.new(self)
+ @cloud ||= Ironfan::Cloud::Ec2.new(self)
@cloud.configure(attrs, &block)
@cloud
end
@@ -65,13 +65,13 @@ def ec2(attrs={}, &block)
# @param attrs [Hash] a hash of attributes to pass down.
#
def volume(volume_name, attrs={}, &block)
- volumes[volume_name] ||= ClusterChef::Volume.new(:parent => self, :name => volume_name)
+ volumes[volume_name] ||= Ironfan::Volume.new(:parent => self, :name => volume_name)
volumes[volume_name].configure(attrs, &block)
volumes[volume_name]
end
def raid_group(rg_name, attrs={}, &block)
- volumes[rg_name] ||= ClusterChef::RaidGroup.new(:parent => self, :name => rg_name)
+ volumes[rg_name] ||= Ironfan::RaidGroup.new(:parent => self, :name => rg_name)
volumes[rg_name].configure(attrs, &block)
volumes[rg_name].sub_volumes.each do |sv_name|
volume(sv_name){ in_raid(rg_name) ; mountable(false) ; tags({}) }
@@ -95,7 +95,7 @@ def root_volume(attrs={}, &block)
# * run_list :normal items -- cluster, then facet, then server
# * run_list :last items -- cluster, then facet, then server
#
- # (see ClusterChef::Server#combined_run_list for full details though)
+ # (see Ironfan::Server#combined_run_list for full details though)
#
def role(role_name, placement=nil)
add_to_run_list("role[#{role_name}]", placement)
@@ -109,15 +109,15 @@ def role(role_name, placement=nil)
# * run_list :normal items -- cluster, then facet, then server
# * run_list :last items -- cluster, then facet, then server
#
- # (see ClusterChef::Server#combined_run_list for full details though)
+ # (see Ironfan::Server#combined_run_list for full details though)
#
def recipe(name, placement=nil)
add_to_run_list(name, placement)
end
# Roles and recipes for this element only.
#
- # See ClusterChef::Server#combined_run_list for run_list order resolution
+ # See Ironfan::Server#combined_run_list for run_list order resolution
def run_list
groups = run_list_groups
[ groups[:first], groups[:normal], groups[:last] ].flatten.compact.uniq
View
4 lib/cluster_chef/deprecated.rb → lib/ironfan/deprecated.rb
@@ -1,4 +1,4 @@
-module ClusterChef
+module Ironfan
class Cluster
#
@@ -7,7 +7,7 @@ class Cluster
def use(*clusters)
ui.warn "The 'use' statement is deprecated #{caller.inspect}"
clusters.each do |c|
- other_cluster = ClusterChef.load_cluster(c)
+ other_cluster = Ironfan.load_cluster(c)
reverse_merge! other_cluster
end
self
View
30 lib/cluster_chef/discovery.rb → lib/ironfan/discovery.rb
@@ -1,11 +1,11 @@
-module ClusterChef
+module Ironfan
class Cluster
def discover!
@aws_instance_hash = {}
- discover_cluster_chef!
+ discover_ironfan!
discover_chef_nodes!
- discover_fog_servers! unless ClusterChef.chef_config[:cloud] == false
+ discover_fog_servers! unless Ironfan.chef_config[:cloud] == false
discover_chef_clients!
discover_volumes!
end
@@ -56,7 +56,7 @@ def find_node(nd_name)
protected
def fog_servers
- @fog_servers ||= ClusterChef.fog_servers.select{|fs| fs.key_name == cluster_name.to_s && (fs.state != "terminated") }
+ @fog_servers ||= Ironfan.fog_servers.select{|fs| fs.key_name == cluster_name.to_s && (fs.state != "terminated") }
end
# Walk the list of chef nodes and
@@ -75,7 +75,7 @@ def discover_chef_nodes!
else
next
end
- svr = ClusterChef::Server.get(cluster_name, facet_name, facet_index)
+ svr = Ironfan::Server.get(cluster_name, facet_name, facet_index)
svr.chef_node = chef_node
@aws_instance_hash[ chef_node.ec2.instance_id ] = svr if chef_node[:ec2] && chef_node.ec2.instance_id
end
@@ -86,8 +86,8 @@ def discover_chef_clients!
servers.each(&:chef_client)
end
- # calling #servers vivifies each facet's ClusterChef::Server instances
- def discover_cluster_chef!
+ # calling #servers vivifies each facet's Ironfan::Server instances
+ def discover_ironfan!
self.servers
end
@@ -98,7 +98,7 @@ def discover_fog_servers!
# to the chef node name found in the chef node
fog_servers.each do |fs|
if fs.tags["cluster"] && fs.tags["facet"] && fs.tags["index"] && fs.tags["cluster"] == cluster_name.to_s
- svr = ClusterChef::Server.get(fs.tags["cluster"], fs.tags["facet"], fs.tags["index"])
+ svr = Ironfan::Server.get(fs.tags["cluster"], fs.tags["facet"], fs.tags["index"])
elsif @aws_instance_hash[fs.id]
svr = @aws_instance_hash[fs.id]
else
@@ -129,10 +129,10 @@ def discover_addresses!
servers.each(&:discover_addresses!)
end
- end # ClusterChef::Cluster
+ end # Ironfan::Cluster
end
-module ClusterChef
+module Ironfan
def self.fog_connection
@fog_connection ||= Fog::Compute.new({
@@ -146,13 +146,13 @@ def self.fog_connection
def self.fog_servers
return @fog_servers if @fog_servers
Chef::Log.debug("Using fog to catalog all servers")
- @fog_servers = ClusterChef.fog_connection.servers.all
+ @fog_servers = Ironfan.fog_connection.servers.all
end
def self.fog_addresses
return @fog_addresses if @fog_addresses
Chef::Log.debug("Using fog to catalog all addresses")
- @fog_addresses = {}.tap{|hsh| ClusterChef.fog_connection.addresses.each{|fa| hsh[fa.public_ip] = fa } }
+ @fog_addresses = {}.tap{|hsh| Ironfan.fog_connection.addresses.each{|fa| hsh[fa.public_ip] = fa } }
end
def self.fog_volumes
@@ -161,17 +161,17 @@ def self.fog_volumes
def self.fetch_fog_volumes
Chef::Log.debug("Using fog to catalog all volumes")
- @fog_volumes = ClusterChef.fog_connection.volumes
+ @fog_volumes = Ironfan.fog_connection.volumes
end
def self.fog_keypairs
return @fog_keypairs if @fog_keypairs
Chef::Log.debug("Using fog to catalog all keypairs")
- @fog_keypairs = {}.tap{|hsh| ClusterChef.fog_connection.key_pairs.each{|kp| hsh[kp.name] = kp } }
+ @fog_keypairs = {}.tap{|hsh| Ironfan.fog_connection.key_pairs.each{|kp| hsh[kp.name] = kp } }
end
def safely *args, &block
- ClusterChef.safely(*args, &block)
+ Ironfan.safely(*args, &block)
end
end
View
14 lib/cluster_chef/dsl_object.rb → lib/ironfan/dsl_object.rb
@@ -19,12 +19,12 @@ def to_mash
end unless method_defined?(:to_mash)
end
-module ClusterChef
+module Ironfan
#
# Provides magic methods, defined with has_keys
#
# @example
- # class Mom < ClusterChef::DslObject
+ # class Mom < Ironfan::DslObject
# has_keys(:college, :combat_boots, :fat, :so_fat)
# end
#
@@ -57,7 +57,7 @@ def initialize(attrs={}, &block)
# @params [Array(String)] key_names DSL attribute names
#
# @example
- # class Mom < ClusterChef::DslObject
+ # class Mom < Ironfan::DslObject
# has_keys(:fat, :so_fat)
# end
# yer_mom = Mom.new
@@ -104,19 +104,19 @@ def configure(hsh={}, &block)
end
# delegate to the knife ui presenter
- def ui() ClusterChef.ui ; end
+ def ui() Ironfan.ui ; end
# delegate to the knife ui presenter
- def self.ui() ClusterChef.ui ; end
+ def self.ui() Ironfan.ui ; end
def step(desc, *style)
ui.info(" #{"%-15s" % (name.to_s+":")}\t#{ui.color(desc.to_s, *style)}")
end
# helper method for bombing out of a script
- def die(*args) ClusterChef.die(*args) ; end
+ def die(*args) Ironfan.die(*args) ; end
# helper method for turning exceptions into warnings
- def safely(*args, &block) ClusterChef.safely(*args, &block) ; end
+ def safely(*args, &block) Ironfan.safely(*args, &block) ; end
# helper method for debugging only
def dump(*args) args.each{|arg| Chef::Log.debug( arg.inspect ) } end
View
16 lib/cluster_chef/facet.rb → lib/ironfan/facet.rb
@@ -1,5 +1,5 @@
-module ClusterChef
- class Facet < ClusterChef::ComputeBuilder
+module Ironfan
+ class Facet < Ironfan::ComputeBuilder
attr_reader :cluster
has_keys :instances
@@ -50,11 +50,11 @@ def assign_volume_ids(volume_name, *volume_ids)
# @param [Hash] attrs -- attributes to configure on the object
# @yield a block to execute in the context of the object
#
- # @return [ClusterChef::Facet]
+ # @return [Ironfan::Facet]
#
def server(idx, attrs={}, &block)
idx = idx.to_i
- @servers[idx] ||= ClusterChef::Server.new(self, idx)
+ @servers[idx] ||= Ironfan::Server.new(self, idx)
@servers[idx].configure(attrs, &block)
@servers[idx]
end
@@ -70,7 +70,7 @@ def has_server? idx
# All servers in this facet
#
- # @return [ClusterChef::ServerSlice] slice containing all servers
+ # @return [Ironfan::ServerSlice] slice containing all servers
def servers
slice(indexes)
end
@@ -83,12 +83,12 @@ def servers
#
# @param [Array, String] slice_indexes -- servers in that facet (or nil for all in facet).
#
- # @return [ClusterChef::ServerSlice] the requested slice
+ # @return [Ironfan::ServerSlice] the requested slice
def slice(slice_indexes=nil)
slice_indexes = self.indexes if slice_indexes.blank?
slice_indexes = indexes_from_intervals(slice_indexes) if slice_indexes.is_a?(String)
svrs = Array(slice_indexes).map(&:to_i).sort!.select{|idx| has_server?(idx) }.map{|idx| server(idx) }
- ClusterChef::ServerSlice.new(self.cluster, svrs)
+ Ironfan::ServerSlice.new(self.cluster, svrs)
end
# all valid server indexes
@@ -127,7 +127,7 @@ def create_facet_role
# indexes. The indexes will be unique but in an arbitrary order.
#
# @example
- # facet = ClusterChef::Facet.new('foo', 'bar')
+ # facet = Ironfan::Facet.new('foo', 'bar')
# facet.indexes_from_intervals('1,2-3,8-9,7') # [1, 2, 3, 8, 9, 7]
# facet.indexes_from_intervals('1,3-5,4,7') # [1, 3, 4, 5, 7]
#
View
24 lib/cluster_chef/fog_layer.rb → lib/ironfan/fog_layer.rb
@@ -1,6 +1,6 @@
-module ClusterChef
+module Ironfan
#
- # ClusterChef::Server methods that handle Fog action
+ # Ironfan::Server methods that handle Fog action
#
Server.class_eval do
@@ -10,12 +10,12 @@ def fog_create_server
launch_desc = fog_launch_description
Chef::Log.debug(JSON.pretty_generate(launch_desc))
safely do
- @fog_server = ClusterChef.fog_connection.servers.create(launch_desc)
+ @fog_server = Ironfan.fog_connection.servers.create(launch_desc)
end
end
def lint_fog
- unless cloud.image_id then raise "No image ID found: nothing in Chef::Config[:ec2_image_info] for AZ #{self.default_availability_zone} flavor #{cloud.flavor} backing #{cloud.backing} image name #{cloud.image_name}, and cloud.image_id was not set directly. See https://github.com/infochimps/cluster_chef/wiki/machine-image-(AMI)-lookup-by-name - #{cloud.list_images}" end
+ unless cloud.image_id then raise "No image ID found: nothing in Chef::Config[:ec2_image_info] for AZ #{self.default_availability_zone} flavor #{cloud.flavor} backing #{cloud.backing} image name #{cloud.image_name}, and cloud.image_id was not set directly. See https://github.com/infochimps-labs/ironfan/wiki/machine-image-(AMI)-lookup-by-name - #{cloud.list_images}" end
unless cloud.image_id then cloud.list_flavors ; raise "No machine flavor found" ; end
end
@@ -50,23 +50,23 @@ def fog_create_tags(fog_obj, desc, tags)
tags_to_create.each do |key, value|
Chef::Log.debug( "tagging #{desc} with #{key} = #{value}" )
safely do
- ClusterChef.fog_connection.tags.create({
+ Ironfan.fog_connection.tags.create({
:key => key, :value => value.to_s, :resource_id => fog_obj.id })
end
end
end
def fog_address
address_str = self.cloud.public_ip or return
- ClusterChef.fog_addresses[address_str]
+ Ironfan.fog_addresses[address_str]
end
def discover_volumes!
composite_volumes.each do |vol_name, vol|
my_vol = volumes[vol_name]
next if my_vol.fog_volume
- next if ClusterChef.chef_config[:cloud] == false
- my_vol.fog_volume = ClusterChef.fog_volumes.find do |fv|
+ next if Ironfan.chef_config[:cloud] == false
+ my_vol.fog_volume = Ironfan.fog_volumes.find do |fv|
( # matches the explicit volume id
(vol.volume_id && (fv.id == vol.volume_id) ) ||
# OR this server's machine exists, and this volume is attached to
@@ -111,7 +111,7 @@ def associate_public_ip
if (fog_address && fog_address.server_id) then check_server_id_pairing(fog_address, desc) ; return ; end
safely do
step(" assigning #{desc}", :blue)
- ClusterChef.fog_connection.associate_address(self.fog_server.id, address)
+ Ironfan.fog_connection.associate_address(self.fog_server.id, address)
end
end
@@ -133,10 +133,10 @@ class ServerSlice
def sync_keypairs
step("ensuring keypairs exist")
keypairs = servers.map{|svr| [svr.cluster.cloud.keypair, svr.cloud.keypair] }.flatten.map(&:to_s).reject(&:blank?).uniq
- keypairs = keypairs - ClusterChef.fog_keypairs.keys
+ keypairs = keypairs - Ironfan.fog_keypairs.keys
keypairs.each do |keypair_name|
- keypair_obj = ClusterChef::Ec2Keypair.create!(keypair_name)
- ClusterChef.fog_keypairs[keypair_name] = keypair_obj
+ keypair_obj = Ironfan::Ec2Keypair.create!(keypair_name)
+ Ironfan.fog_keypairs[keypair_name] = keypair_obj
end
end
View
10 lib/cluster_chef/private_key.rb → lib/ironfan/private_key.rb
@@ -1,11 +1,11 @@
require 'fileutils'
-module ClusterChef
+module Ironfan
#
# A private key -- chef client key, ssh key, etc.
#
# The key is a pro
- class PrivateKey < ClusterChef::DslObject
+ class PrivateKey < Ironfan::DslObject
attr_reader :name
attr_reader :proxy
attr_reader :on_update
@@ -27,7 +27,7 @@ def filename
def save
return unless @body
- if ClusterChef.chef_config[:dry_run]
+ if Ironfan.chef_config[:dry_run]
Chef::Log.debug(" key #{name} - dry run, not writing out key")
return
end
@@ -109,9 +109,9 @@ def body
def create_proxy!
safely do
step(" key #{name} - creating", :green)
- @proxy = ClusterChef.fog_connection.key_pairs.create(:name => name.to_s)
+ @proxy = Ironfan.fog_connection.key_pairs.create(:name => name.to_s)
end
- ClusterChef.fog_keypairs[name] = proxy
+ Ironfan.fog_keypairs[name] = proxy
self.body = proxy.private_key
save
end
View
2 lib/cluster_chef/role_implications.rb → lib/ironfan/role_implications.rb
@@ -1,4 +1,4 @@
-module ClusterChef
+module Ironfan
ComputeBuilder.class_eval do
# organization-wide security group
View
14 lib/cluster_chef/security_group.rb → lib/ironfan/security_group.rb
@@ -1,4 +1,4 @@
-module ClusterChef
+module Ironfan
module Cloud
class SecurityGroup < DslObject
@@ -9,7 +9,7 @@ class SecurityGroup < DslObject
def initialize cloud, group_name, group_description=nil, group_owner_id=nil
super()
set :name, group_name.to_s
- description group_description || "cluster_chef generated group #{group_name}"
+ description group_description || "ironfan generated group #{group_name}"
@cloud = cloud
@group_authorizations = []
@group_authorized_by = []
@@ -26,22 +26,22 @@ def self.all
get_all
end
def self.get_all
- groups_list = ClusterChef.fog_connection.security_groups.all
+ groups_list = Ironfan.fog_connection.security_groups.all
@@all = groups_list.inject(Mash.new) do |hsh, fog_group|
hsh[fog_group.name] = fog_group ; hsh
end
end
def get
- all[name] || ClusterChef.fog_connection.security_groups.get(name)
+ all[name] || Ironfan.fog_connection.security_groups.get(name)
end
def self.get_or_create(group_name, description)
- # FIXME: the '|| ClusterChef.fog' part is probably unnecessary
- fog_group = all[group_name] || ClusterChef.fog_connection.security_groups.get(group_name)
+ # FIXME: the '|| Ironfan.fog' part is probably unnecessary
+ fog_group = all[group_name] || Ironfan.fog_connection.security_groups.get(group_name)
unless fog_group
self.step(group_name, "creating (#{description})", :green)
- fog_group = all[group_name] = ClusterChef.fog_connection.security_groups.new(:name => group_name, :description => description, :connection => ClusterChef.fog_connection)
+ fog_group = all[group_name] = Ironfan.fog_connection.security_groups.new(:name => group_name, :description => description, :connection => Ironfan.fog_connection)
fog_group.save
end
fog_group
View
14 lib/cluster_chef/server.rb → lib/ironfan/server.rb
@@ -1,12 +1,12 @@
-module ClusterChef
+module Ironfan
#
# A server is a specific (logical) member of a facet within a cluster.
#
# It may have extra attributes if it also exists in the Chef server,
# or if it exists in the real world (as revealed by Fog)
#
- class Server < ClusterChef::ComputeBuilder
+ class Server < Ironfan::ComputeBuilder
attr_reader :cluster, :facet, :facet_index, :tags
attr_accessor :chef_node, :fog_server
@@ -37,7 +37,7 @@ def facet_name
end
def servers
- ClusterChef::ServerGroup.new(cluster, [self])
+ Ironfan::ServerGroup.new(cluster, [self])
end
def bogosity val=nil
@@ -139,7 +139,7 @@ def resolve!
# * own roles: cluster_role then facet_role
# * run_list :last items -- cluster then facet then server
#
- # ClusterChef.cluster(:my_cluster) do
+ # Ironfan.cluster(:my_cluster) do
# role('f', :last)
# role('c')
# facet(:my_facet) do
@@ -186,12 +186,12 @@ def combined_run_list
def composite_volumes
vols = {}
facet.volumes.each do |vol_name, vol|
- self.volumes[vol_name] ||= ClusterChef::Volume.new(:parent => self, :name => vol_name)
+ self.volumes[vol_name] ||= Ironfan::Volume.new(:parent => self, :name => vol_name)
vols[vol_name] ||= self.volumes[vol_name].dup
vols[vol_name].reverse_merge!(vol)
end
cluster.volumes.each do |vol_name, vol|
- self.volumes[vol_name] ||= ClusterChef::Volume.new(:parent => self, :name => vol_name)
+ self.volumes[vol_name] ||= Ironfan::Volume.new(:parent => self, :name => vol_name)
vols[vol_name] ||= self.volumes[vol_name].dup
vols[vol_name].reverse_merge!(vol)
end
@@ -209,7 +209,7 @@ def default_availability_zone
# retrieval
#
def self.get(cluster_name, facet_name, facet_index)
- cluster = ClusterChef.cluster(cluster_name)
+ cluster = Ironfan.cluster(cluster_name)
had_facet = cluster.has_facet?(facet_name)
facet = cluster.facet(facet_name)
facet.bogosity true unless had_facet
View
8 lib/cluster_chef/server_slice.rb → lib/ironfan/server_slice.rb
@@ -1,11 +1,11 @@
-module ClusterChef
+module Ironfan
#
# A server group is a set of actual or implied servers.
#
# The idea is we want to be able to smoothly roll up settings
#
#
- class ServerSlice < ClusterChef::DslObject
+ class ServerSlice < Ironfan::DslObject
attr_reader :name, :servers, :cluster
def initialize cluster, servers
@@ -142,7 +142,7 @@ def sync_to_chef
# call it with no args, you get the basic table that knife cluster show
# draws. If you give it an array of strings, you can override the order and
# headings displayed. If you also give it a block you can add your own logic
- # for generating content. The block is given a ClusterChef::Server instance
+ # for generating content. The block is given a Ironfan::Server instance
# for each item in the collection and should return a hash of Name,Value
# pairs to merge into the minimal fields.
#
@@ -220,7 +220,7 @@ def joined_names
# Calls block on each server in parallel, each in its own thread
#
# @example
- # target = ClusterChef::Cluster.slice('web_server')
+ # target = Ironfan::Cluster.slice('web_server')
# target.parallelize{|svr| svr.launch }
#
# @yield each server, in turn
View
12 lib/cluster_chef/volume.rb → lib/ironfan/volume.rb
@@ -1,8 +1,8 @@
-module ClusterChef
+module Ironfan
#
# Internal or external storage
#
- class Volume < ClusterChef::DslObject
+ class Volume < Ironfan::DslObject
attr_reader :parent
attr_accessor :fog_volume
has_keys(
@@ -45,7 +45,7 @@ class Volume < ClusterChef::DslObject
# Describes a volume
#
# @example
- # ClusterChef::Volume.new( :name => 'redis',
+ # Ironfan::Volume.new( :name => 'redis',
# :device => '/dev/sdp', :mount_point => '/data/redis', :fstype => 'xfs', :mount_options => 'defaults,nouuid,noatime'
# :size => 1024, :snapshot_id => 'snap-66494a08', :volume_id => 'vol-12312',
# :tags => {}, :keep => true )
@@ -69,10 +69,10 @@ def ephemeral_device?
volume_id =~ /^ephemeral/
end
- # Named snapshots, as defined in ClusterChef::Volume::VOLUME_IDS
+ # Named snapshots, as defined in Ironfan::Volume::VOLUME_IDS
def snapshot_name(name)
snap_id = VOLUME_IDS[name.to_sym]
- raise "Unknown snapshot name #{name} - is it defined in ClusterChef::Volume::VOLUME_IDS?" unless snap_id
+ raise "Unknown snapshot name #{name} - is it defined in Ironfan::Volume::VOLUME_IDS?" unless snap_id
self.snapshot_id(snap_id)
end
@@ -141,7 +141,7 @@ def desc
def defaults()
super
fstype 'xfs'
- mount_options "defaults,nobootwait,noatime,nouuid,comment=cluster_chef"
+ mount_options "defaults,nobootwait,noatime,nouuid,comment=ironfan"
attachable false
create_at_launch false
#
View
6 rspec.watchr
@@ -20,10 +20,10 @@ watch("lib/(.*)\.rb") do |match|
run_spec file if File.exists?(file)
end
-# watch('lib/cluster_chef/cookbook_munger\.rb') do |match|
+# watch('lib/ironfan/cookbook_munger\.rb') do |match|
# system match[0]
# end
#
-# watch('lib/cluster_chef/cookbook_munger/.*\.erb') do |match|
-# system 'lib/cluster_chef/cookbook_munger.rb'
+# watch('lib/ironfan/cookbook_munger/.*\.erb') do |match|
+# system 'lib/ironfan/cookbook_munger.rb'
# end
View
4 spec/cluster_chef/cluster_spec.rb → spec/ironfan/cluster_spec.rb
@@ -1,8 +1,8 @@
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
-require CLUSTER_CHEF_DIR("lib/cluster_chef")
+require IRONFAN_DIR("lib/ironfan")
-describe ClusterChef::Cluster do
+describe Ironfan::Cluster do
describe 'discover!' do
let(:cluster){ get_example_cluster(:monkeyballs) }
View
7 spec/cluster_chef/facet_spec.rb → spec/ironfan/facet_spec.rb
@@ -1,9 +1,9 @@
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
-require CLUSTER_CHEF_DIR("lib/cluster_chef")
+require IRONFAN_DIR("lib/ironfan")
-describe ClusterChef::Facet do
- let(:cluster){ ClusterChef.cluster(:gibbon) }
+describe Ironfan::Facet do
+ let(:cluster){ Ironfan.cluster(:gibbon) }