cluster_chef 3.0.12 → 3.0.14

Sign up to get free protection for your applications and to get access to all the features.
data/ironfan.gemspec ADDED
@@ -0,0 +1,123 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "ironfan"
8
+ s.version = "3.0.14"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Infochimps"]
12
+ s.date = "2012-02-15"
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
+ s.email = "coders@infochimps.com"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.md"
18
+ ]
19
+ s.files = [
20
+ ".gitignore",
21
+ ".rspec",
22
+ "CHANGELOG.md",
23
+ "Gemfile",
24
+ "LICENSE",
25
+ "README.md",
26
+ "Rakefile",
27
+ "TODO.md",
28
+ "VERSION",
29
+ "chefignore",
30
+ "cluster_chef-knife.gemspec",
31
+ "cluster_chef.gemspec",
32
+ "config/client.rb",
33
+ "config/proxy.pac",
34
+ "config/ubuntu10.04-cluster_chef.erb",
35
+ "config/ubuntu11.10-cluster_chef.erb",
36
+ "lib/chef/knife/bootstrap/ubuntu10.04-cluster_chef.erb",
37
+ "lib/chef/knife/bootstrap/ubuntu11.10-cluster_chef.erb",
38
+ "lib/chef/knife/cluster_bootstrap.rb",
39
+ "lib/chef/knife/cluster_kick.rb",
40
+ "lib/chef/knife/cluster_kill.rb",
41
+ "lib/chef/knife/cluster_launch.rb",
42
+ "lib/chef/knife/cluster_list.rb",
43
+ "lib/chef/knife/cluster_proxy.rb",
44
+ "lib/chef/knife/cluster_show.rb",
45
+ "lib/chef/knife/cluster_ssh.rb",
46
+ "lib/chef/knife/cluster_start.rb",
47
+ "lib/chef/knife/cluster_stop.rb",
48
+ "lib/chef/knife/cluster_sync.rb",
49
+ "lib/chef/knife/generic_command.rb",
50
+ "lib/chef/knife/knife_common.rb",
51
+ "lib/cluster_chef.rb",
52
+ "lib/cluster_chef/chef_layer.rb",
53
+ "lib/cluster_chef/cloud.rb",
54
+ "lib/cluster_chef/cluster.rb",
55
+ "lib/cluster_chef/compute.rb",
56
+ "lib/cluster_chef/deprecated.rb",
57
+ "lib/cluster_chef/discovery.rb",
58
+ "lib/cluster_chef/dsl_object.rb",
59
+ "lib/cluster_chef/facet.rb",
60
+ "lib/cluster_chef/fog_layer.rb",
61
+ "lib/cluster_chef/private_key.rb",
62
+ "lib/cluster_chef/role_implications.rb",
63
+ "lib/cluster_chef/security_group.rb",
64
+ "lib/cluster_chef/server.rb",
65
+ "lib/cluster_chef/server_slice.rb",
66
+ "lib/cluster_chef/volume.rb",
67
+ "notes/aws_console_screenshot.jpg",
68
+ "rspec.watchr",
69
+ "spec/cluster_chef/cluster_spec.rb",
70
+ "spec/cluster_chef/facet_spec.rb",
71
+ "spec/cluster_chef/server_slice_spec.rb",
72
+ "spec/cluster_chef/server_spec.rb",
73
+ "spec/cluster_chef_spec.rb",
74
+ "spec/spec_helper.rb",
75
+ "spec/spec_helper/dummy_chef.rb",
76
+ "spec/test_config.rb",
77
+ "tasks/chef_config.rake",
78
+ "tasks/jeweler_use_alt_branch.rake"
79
+ ]
80
+ s.homepage = "http://infochimps.com/labs"
81
+ s.licenses = ["apachev2"]
82
+ s.require_paths = ["lib"]
83
+ s.rubygems_version = "1.8.15"
84
+ 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."
85
+ 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"]
86
+
87
+ if s.respond_to? :specification_version then
88
+ s.specification_version = 3
89
+
90
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
91
+ s.add_runtime_dependency(%q<chef>, ["~> 0.10.4"])
92
+ s.add_runtime_dependency(%q<fog>, ["~> 1.1.1"])
93
+ s.add_runtime_dependency(%q<formatador>, ["~> 0.2.1"])
94
+ s.add_runtime_dependency(%q<gorillib>, ["~> 0.1.7"])
95
+ s.add_development_dependency(%q<bundler>, ["~> 1"])
96
+ s.add_development_dependency(%q<jeweler>, ["~> 1.6"])
97
+ s.add_development_dependency(%q<rspec>, ["~> 2.5"])
98
+ s.add_development_dependency(%q<yard>, ["~> 0.6"])
99
+ s.add_development_dependency(%q<configliere>, ["~> 0.4.8"])
100
+ else
101
+ s.add_dependency(%q<chef>, ["~> 0.10.4"])
102
+ s.add_dependency(%q<fog>, ["~> 1.1.1"])
103
+ s.add_dependency(%q<formatador>, ["~> 0.2.1"])
104
+ s.add_dependency(%q<gorillib>, ["~> 0.1.7"])
105
+ s.add_dependency(%q<bundler>, ["~> 1"])
106
+ s.add_dependency(%q<jeweler>, ["~> 1.6"])
107
+ s.add_dependency(%q<rspec>, ["~> 2.5"])
108
+ s.add_dependency(%q<yard>, ["~> 0.6"])
109
+ s.add_dependency(%q<configliere>, ["~> 0.4.8"])
110
+ end
111
+ else
112
+ s.add_dependency(%q<chef>, ["~> 0.10.4"])
113
+ s.add_dependency(%q<fog>, ["~> 1.1.1"])
114
+ s.add_dependency(%q<formatador>, ["~> 0.2.1"])
115
+ s.add_dependency(%q<gorillib>, ["~> 0.1.7"])
116
+ s.add_dependency(%q<bundler>, ["~> 1"])
117
+ s.add_dependency(%q<jeweler>, ["~> 1.6"])
118
+ s.add_dependency(%q<rspec>, ["~> 2.5"])
119
+ s.add_dependency(%q<yard>, ["~> 0.6"])
120
+ s.add_dependency(%q<configliere>, ["~> 0.4.8"])
121
+ end
122
+ end
123
+
@@ -149,6 +149,10 @@ module ClusterChef
149
149
  @chef_client_script_content = safely{ File.read(script_filename) }
150
150
  end
151
151
 
152
+ def announce_state state
153
+ @chef_node.set[:state] = state
154
+ end
155
+
152
156
  protected
153
157
 
154
158
  # Create the chef client on the server. Do not call this directly -- go
@@ -73,7 +73,6 @@ module ClusterChef
73
73
  def raid_group(rg_name, attrs={}, &block)
74
74
  volumes[rg_name] ||= ClusterChef::RaidGroup.new(:parent => self, :name => rg_name)
75
75
  volumes[rg_name].configure(attrs, &block)
76
- p volumes
77
76
  volumes[rg_name].sub_volumes.each do |sv_name|
78
77
  volume(sv_name){ in_raid(rg_name) ; mountable(false) ; tags({}) }
79
78
  end
@@ -5,7 +5,7 @@ module ClusterChef
5
5
  @aws_instance_hash = {}
6
6
  discover_cluster_chef!
7
7
  discover_chef_nodes!
8
- discover_fog_servers!
8
+ discover_fog_servers! unless ClusterChef.chef_config[:cloud] == false
9
9
  discover_chef_clients!
10
10
  discover_volumes!
11
11
  end
@@ -13,7 +13,19 @@ module ClusterChef
13
13
  def chef_clients
14
14
  return @chef_clients if @chef_clients
15
15
  @chef_clients = []
16
- Chef::Search::Query.new.search(:client, "clientname:#{cluster_name}-*") do |client_hsh|
16
+
17
+ # Oh for fuck's sake -- the key used to index clients changed from
18
+ # 'clientname' in 0.10.4-and-prev to 'name' in 0.10.8. Rather than index
19
+ # both 'clientname' and 'name', they switched it -- so we have to fall
20
+ # back. FIXME: While the Opscode platform is 0.10.4 I have clientname
21
+ # first (sorry, people of the future). When it switches to 0.10.8 we'll
22
+ # reverse them (suck it people of the past).
23
+ # Also sometimes the server returns results that are nil on
24
+ # recently-expired clients, so that's annoying too.
25
+ clients, wtf, num = Chef::Search::Query.new.search(:client, "clientname:#{cluster_name}-*") ; clients.compact!
26
+ clients, wtf, num = Chef::Search::Query.new.search(:client, "name:#{cluster_name}-*") if clients.blank?
27
+ clients.each do |client_hsh|
28
+ next if client_hsh.nil?
17
29
  # Return values from Chef::Search seem to be inconsistent across chef
18
30
  # versions (sometimes a hash, sometimes an object). Fix if necessary.
19
31
  client_hsh = Chef::ApiClient.json_create(client_hsh) unless client_hsh.is_a?(Chef::ApiClient)
@@ -65,6 +65,7 @@ module ClusterChef
65
65
  composite_volumes.each do |vol_name, vol|
66
66
  my_vol = volumes[vol_name]
67
67
  next if my_vol.fog_volume
68
+ next if ClusterChef.chef_config[:cloud] == false
68
69
  my_vol.fog_volume = ClusterChef.fog_volumes.find do |fv|
69
70
  ( # matches the explicit volume id
70
71
  (vol.volume_id && (fv.id == vol.volume_id) ) ||
@@ -144,6 +145,6 @@ module ClusterChef
144
145
  step("ensuring security groups exist and are correct")
145
146
  security_groups.each{|name,group| group.run }
146
147
  end
147
-
148
+
148
149
  end
149
150
  end
@@ -2,8 +2,8 @@ module ClusterChef
2
2
  ComputeBuilder.class_eval do
3
3
 
4
4
  # organization-wide security group
5
- role_implication "org_base" do
6
- self.cloud.security_group "org_base" do
5
+ role_implication "systemwide" do
6
+ self.cloud.security_group "systemwide" do
7
7
  end
8
8
  end
9
9
 
@@ -263,5 +263,19 @@ module ClusterChef
263
263
  composite_volumes.values.map(&:block_device_mapping).compact
264
264
  end
265
265
 
266
+ # ugh. non-dry below.
267
+
268
+ def announce_as_started
269
+ return unless chef_node
270
+ announce_state('start')
271
+ chef_node.save
272
+ end
273
+
274
+ def announce_as_stopped
275
+ return unless chef_node
276
+ announce_state('stop')
277
+ chef_node.save
278
+ end
279
+
266
280
  end
267
281
  end
metadata CHANGED
@@ -1,137 +1,136 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: cluster_chef
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.0.14
4
5
  prerelease:
5
- version: 3.0.12
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Infochimps
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2012-01-25 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2012-02-15 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: chef
17
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70259608686280 !ruby/object:Gem::Requirement
18
17
  none: false
19
- requirements:
18
+ requirements:
20
19
  - - ~>
21
- - !ruby/object:Gem::Version
20
+ - !ruby/object:Gem::Version
22
21
  version: 0.10.4
23
22
  type: :runtime
24
23
  prerelease: false
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
24
+ version_requirements: *70259608686280
25
+ - !ruby/object:Gem::Dependency
27
26
  name: fog
28
- requirement: &id002 !ruby/object:Gem::Requirement
27
+ requirement: &70259608685380 !ruby/object:Gem::Requirement
29
28
  none: false
30
- requirements:
29
+ requirements:
31
30
  - - ~>
32
- - !ruby/object:Gem::Version
31
+ - !ruby/object:Gem::Version
33
32
  version: 1.1.1
34
33
  type: :runtime
35
34
  prerelease: false
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
35
+ version_requirements: *70259608685380
36
+ - !ruby/object:Gem::Dependency
38
37
  name: formatador
39
- requirement: &id003 !ruby/object:Gem::Requirement
38
+ requirement: &70259608684540 !ruby/object:Gem::Requirement
40
39
  none: false
41
- requirements:
40
+ requirements:
42
41
  - - ~>
43
- - !ruby/object:Gem::Version
42
+ - !ruby/object:Gem::Version
44
43
  version: 0.2.1
45
44
  type: :runtime
46
45
  prerelease: false
47
- version_requirements: *id003
48
- - !ruby/object:Gem::Dependency
46
+ version_requirements: *70259608684540
47
+ - !ruby/object:Gem::Dependency
49
48
  name: gorillib
50
- requirement: &id004 !ruby/object:Gem::Requirement
49
+ requirement: &70259608683880 !ruby/object:Gem::Requirement
51
50
  none: false
52
- requirements:
51
+ requirements:
53
52
  - - ~>
54
- - !ruby/object:Gem::Version
53
+ - !ruby/object:Gem::Version
55
54
  version: 0.1.7
56
55
  type: :runtime
57
56
  prerelease: false
58
- version_requirements: *id004
59
- - !ruby/object:Gem::Dependency
57
+ version_requirements: *70259608683880
58
+ - !ruby/object:Gem::Dependency
60
59
  name: bundler
61
- requirement: &id005 !ruby/object:Gem::Requirement
60
+ requirement: &70259608683280 !ruby/object:Gem::Requirement
62
61
  none: false
63
- requirements:
62
+ requirements:
64
63
  - - ~>
65
- - !ruby/object:Gem::Version
66
- version: "1"
64
+ - !ruby/object:Gem::Version
65
+ version: '1'
67
66
  type: :development
68
67
  prerelease: false
69
- version_requirements: *id005
70
- - !ruby/object:Gem::Dependency
68
+ version_requirements: *70259608683280
69
+ - !ruby/object:Gem::Dependency
71
70
  name: jeweler
72
- requirement: &id006 !ruby/object:Gem::Requirement
71
+ requirement: &70259608682740 !ruby/object:Gem::Requirement
73
72
  none: false
74
- requirements:
73
+ requirements:
75
74
  - - ~>
76
- - !ruby/object:Gem::Version
77
- version: "1.6"
75
+ - !ruby/object:Gem::Version
76
+ version: '1.6'
78
77
  type: :development
79
78
  prerelease: false
80
- version_requirements: *id006
81
- - !ruby/object:Gem::Dependency
79
+ version_requirements: *70259608682740
80
+ - !ruby/object:Gem::Dependency
82
81
  name: rspec
83
- requirement: &id007 !ruby/object:Gem::Requirement
82
+ requirement: &70259608698400 !ruby/object:Gem::Requirement
84
83
  none: false
85
- requirements:
84
+ requirements:
86
85
  - - ~>
87
- - !ruby/object:Gem::Version
88
- version: "2.5"
86
+ - !ruby/object:Gem::Version
87
+ version: '2.5'
89
88
  type: :development
90
89
  prerelease: false
91
- version_requirements: *id007
92
- - !ruby/object:Gem::Dependency
90
+ version_requirements: *70259608698400
91
+ - !ruby/object:Gem::Dependency
93
92
  name: yard
94
- requirement: &id008 !ruby/object:Gem::Requirement
93
+ requirement: &70259608695240 !ruby/object:Gem::Requirement
95
94
  none: false
96
- requirements:
95
+ requirements:
97
96
  - - ~>
98
- - !ruby/object:Gem::Version
99
- version: "0.6"
97
+ - !ruby/object:Gem::Version
98
+ version: '0.6'
100
99
  type: :development
101
100
  prerelease: false
102
- version_requirements: *id008
103
- - !ruby/object:Gem::Dependency
101
+ version_requirements: *70259608695240
102
+ - !ruby/object:Gem::Dependency
104
103
  name: configliere
105
- requirement: &id009 !ruby/object:Gem::Requirement
104
+ requirement: &70259608694580 !ruby/object:Gem::Requirement
106
105
  none: false
107
- requirements:
106
+ requirements:
108
107
  - - ~>
109
- - !ruby/object:Gem::Version
108
+ - !ruby/object:Gem::Version
110
109
  version: 0.4.8
111
110
  type: :development
112
111
  prerelease: false
113
- version_requirements: *id009
114
- - !ruby/object:Gem::Dependency
112
+ version_requirements: *70259608694580
113
+ - !ruby/object:Gem::Dependency
115
114
  name: cluster_chef-knife
116
- requirement: &id010 !ruby/object:Gem::Requirement
115
+ requirement: &70259608693700 !ruby/object:Gem::Requirement
117
116
  none: false
118
- requirements:
119
- - - "="
120
- - !ruby/object:Gem::Version
121
- version: 3.0.12
117
+ requirements:
118
+ - - =
119
+ - !ruby/object:Gem::Version
120
+ version: 3.0.14
122
121
  type: :runtime
123
122
  prerelease: false
124
- version_requirements: *id010
125
- 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.
123
+ version_requirements: *70259608693700
124
+ description: cluster_chef allows you to orchestrate not just systems but clusters
125
+ of machines. It includes a powerful layer on top of knife and a collection of cloud
126
+ cookbooks.
126
127
  email: coders@infochimps.com
127
128
  executables: []
128
-
129
129
  extensions: []
130
-
131
- extra_rdoc_files:
130
+ extra_rdoc_files:
132
131
  - LICENSE
133
132
  - README.md
134
- files:
133
+ files:
135
134
  - .gitignore
136
135
  - .rspec
137
136
  - CHANGELOG.md
@@ -143,18 +142,16 @@ files:
143
142
  - VERSION
144
143
  - chefignore
145
144
  - cluster_chef.gemspec
146
- - clusters/website_demo.rb
147
145
  - config/client.rb
148
146
  - config/proxy.pac
147
+ - config/ubuntu10.04-cluster_chef.erb
148
+ - config/ubuntu11.10-cluster_chef.erb
149
+ - ironfan.gemspec
149
150
  - lib/cluster_chef.rb
150
151
  - lib/cluster_chef/chef_layer.rb
151
152
  - lib/cluster_chef/cloud.rb
152
153
  - lib/cluster_chef/cluster.rb
153
154
  - lib/cluster_chef/compute.rb
154
- - lib/cluster_chef/cookbook_munger.rb
155
- - lib/cluster_chef/cookbook_munger/README.md.erb
156
- - lib/cluster_chef/cookbook_munger/licenses.yaml
157
- - lib/cluster_chef/cookbook_munger/metadata.rb.erb
158
155
  - lib/cluster_chef/deprecated.rb
159
156
  - lib/cluster_chef/discovery.rb
160
157
  - lib/cluster_chef/dsl_object.rb
@@ -179,36 +176,36 @@ files:
179
176
  - tasks/chef_config.rake
180
177
  - tasks/jeweler_use_alt_branch.rake
181
178
  homepage: http://infochimps.com/labs
182
- licenses:
179
+ licenses:
183
180
  - apachev2
184
- post_install_message:
181
+ post_install_message: ! "!! This gem has been renamed 'ironfan' (from cluster_chef).
182
+ \n It will not be updated after Feb. 2012. \n Sorry for the inconvenience."
185
183
  rdoc_options: []
186
-
187
- require_paths:
184
+ require_paths:
188
185
  - lib
189
- required_ruby_version: !ruby/object:Gem::Requirement
186
+ required_ruby_version: !ruby/object:Gem::Requirement
190
187
  none: false
191
- requirements:
192
- - - ">="
193
- - !ruby/object:Gem::Version
194
- hash: 373181579172920968
195
- segments:
188
+ requirements:
189
+ - - ! '>='
190
+ - !ruby/object:Gem::Version
191
+ version: '0'
192
+ segments:
196
193
  - 0
197
- version: "0"
198
- required_rubygems_version: !ruby/object:Gem::Requirement
194
+ hash: 115206257048957134
195
+ required_rubygems_version: !ruby/object:Gem::Requirement
199
196
  none: false
200
- requirements:
201
- - - ">="
202
- - !ruby/object:Gem::Version
203
- version: "0"
197
+ requirements:
198
+ - - ! '>='
199
+ - !ruby/object:Gem::Version
200
+ version: '0'
204
201
  requirements: []
205
-
206
202
  rubyforge_project:
207
203
  rubygems_version: 1.8.15
208
204
  signing_key:
209
205
  specification_version: 3
210
- 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.
211
- test_files:
206
+ summary: cluster_chef allows you to orchestrate not just systems but clusters of machines.
207
+ It includes a powerful layer on top of knife and a collection of cloud cookbooks.
208
+ test_files:
212
209
  - spec/cluster_chef/cluster_spec.rb
213
210
  - spec/cluster_chef/facet_spec.rb
214
211
  - spec/cluster_chef/server_slice_spec.rb