ironfan 4.0.5 → 4.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/ironfan.gemspec +2 -2
- data/lib/ironfan/broker/computer.rb +11 -11
- data/lib/ironfan/broker.rb +1 -1
- data/lib/ironfan/builder.rb +0 -4
- data/lib/ironfan/dsl/server.rb +3 -0
- data/lib/ironfan/provider.rb +4 -4
- data/lib/ironfan.rb +5 -11
- metadata +3 -3
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
# v4.0.8:
|
2
|
+
* Removed .delegates_to, .parallelize in favor of manual delegation (via .each) and .parallel, to remove assumption that calls must be in the context of the individual object (preparation for fixing bootstrapping)
|
3
|
+
* Adding cluster and facet roles to server run list (fixes #160)
|
4
|
+
* Fixed blocking bugs in launch (bad versions 4.0.6 & 4.0.7)
|
5
|
+
|
1
6
|
# v4.0.5: security_group bug-fixes
|
2
7
|
* Fix for snapshot_id setting in cluster DSL
|
3
8
|
* Reinstated missing group_authorized capability
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.0.
|
1
|
+
4.0.8
|
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 = "4.0.
|
8
|
+
s.version = "4.0.8"
|
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-09-
|
12
|
+
s.date = "2012-09-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 = [
|
@@ -51,7 +51,7 @@ module Ironfan
|
|
51
51
|
|
52
52
|
def validate
|
53
53
|
computer = self
|
54
|
-
|
54
|
+
chosen_resources.each {|r| r.validate_computer! computer }
|
55
55
|
end
|
56
56
|
|
57
57
|
#
|
@@ -131,8 +131,8 @@ module Ironfan
|
|
131
131
|
values["Chef?"] = "no"
|
132
132
|
values["State"] = "not running"
|
133
133
|
|
134
|
-
|
135
|
-
to_display style, values
|
134
|
+
[ server, node, machine ].compact.each do |part|
|
135
|
+
part.to_display style, values
|
136
136
|
end
|
137
137
|
|
138
138
|
if style == :expanded
|
@@ -228,34 +228,34 @@ module Ironfan
|
|
228
228
|
# Discovery
|
229
229
|
#
|
230
230
|
def correlate
|
231
|
-
|
231
|
+
values.each {|c| c.correlate }
|
232
232
|
end
|
233
233
|
|
234
234
|
def validate
|
235
235
|
providers = values.map {|c| c.providers.values}.flatten
|
236
236
|
computers = self
|
237
237
|
|
238
|
-
|
239
|
-
|
238
|
+
values.each {|c| c.validate }
|
239
|
+
providers.each {|p| p.validate computers }
|
240
240
|
end
|
241
241
|
|
242
242
|
#
|
243
243
|
# Manipulation
|
244
244
|
#
|
245
245
|
def kill(options={})
|
246
|
-
Ironfan.
|
246
|
+
Ironfan.parallel(values) {|c| c.kill(options) }
|
247
247
|
end
|
248
248
|
def launch
|
249
|
-
Ironfan.
|
249
|
+
Ironfan.parallel(values) {|c| c. launch }
|
250
250
|
end
|
251
251
|
def save(options={})
|
252
|
-
Ironfan.
|
252
|
+
Ironfan.parallel(values) {|c| c. save(options) }
|
253
253
|
end
|
254
254
|
def start
|
255
|
-
Ironfan.
|
255
|
+
Ironfan.parallel(values) {|c| c. start }
|
256
256
|
end
|
257
257
|
def stop
|
258
|
-
Ironfan.
|
258
|
+
Ironfan.parallel(values) {|c| c. stop }
|
259
259
|
end
|
260
260
|
|
261
261
|
#
|
data/lib/ironfan/broker.rb
CHANGED
@@ -16,7 +16,7 @@ module Ironfan
|
|
16
16
|
computers = Computers.new(:cluster => cluster.resolve)
|
17
17
|
providers = computers.map{|c| c.providers.values}.flatten.uniq
|
18
18
|
|
19
|
-
|
19
|
+
providers.each {|p| p.load cluster }
|
20
20
|
computers.correlate
|
21
21
|
computers.validate
|
22
22
|
computers
|
data/lib/ironfan/builder.rb
CHANGED
data/lib/ironfan/dsl/server.rb
CHANGED
data/lib/ironfan/provider.rb
CHANGED
@@ -24,11 +24,11 @@ module Ironfan
|
|
24
24
|
# Discovery
|
25
25
|
#
|
26
26
|
def self.load(cluster)
|
27
|
-
|
27
|
+
resources.each {|r| r.load! cluster }
|
28
28
|
end
|
29
29
|
|
30
30
|
def self.validate(computers)
|
31
|
-
|
31
|
+
resources.each {|r| r.validate_resources! computers }
|
32
32
|
end
|
33
33
|
|
34
34
|
|
@@ -119,13 +119,13 @@ module Ironfan
|
|
119
119
|
# Create all things that aren't machines
|
120
120
|
targets = resources.reject {|type| type < IaasProvider::Machine}
|
121
121
|
computers.each do |computer|
|
122
|
-
|
122
|
+
targets.each {|r| r.create! computer }
|
123
123
|
end
|
124
124
|
end
|
125
125
|
|
126
126
|
def save!(computers)
|
127
127
|
computers.each do |computer|
|
128
|
-
|
128
|
+
targets.each {|r| r.save! computer }
|
129
129
|
end
|
130
130
|
end
|
131
131
|
|
data/lib/ironfan.rb
CHANGED
@@ -24,19 +24,13 @@ module Ironfan
|
|
24
24
|
def self.chef_config=(cc) @chef_config = cc ; end
|
25
25
|
def self.chef_config() @chef_config ; end
|
26
26
|
|
27
|
-
#
|
28
|
-
def self.
|
27
|
+
# execute against multiple targets in parallel
|
28
|
+
def self.parallel(targets,options={})
|
29
29
|
raise 'missing block' unless block_given?
|
30
|
-
[targets].flatten.
|
31
|
-
end
|
32
|
-
|
33
|
-
# delegate to multiple targets in parallel
|
34
|
-
def self.parallelize(targets,options={},&block)
|
35
|
-
raise 'missing block' unless block_given?
|
36
|
-
[targets].flatten.map do |t|
|
30
|
+
[targets].flatten.map do |target|
|
37
31
|
sleep(0.1) # avoid hammering with simultaneous requests
|
38
|
-
Thread.new(
|
39
|
-
end.each(&:join)
|
32
|
+
Thread.new(target) {|target| yield target }
|
33
|
+
end.each(&:join) # wait for all the blocks to return
|
40
34
|
end
|
41
35
|
|
42
36
|
#
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: ironfan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 4.0.
|
5
|
+
version: 4.0.8
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Infochimps
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-09-
|
13
|
+
date: 2012-09-20 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: chef
|
@@ -232,7 +232,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
232
232
|
requirements:
|
233
233
|
- - ">="
|
234
234
|
- !ruby/object:Gem::Version
|
235
|
-
hash:
|
235
|
+
hash: -2934265328136200700
|
236
236
|
segments:
|
237
237
|
- 0
|
238
238
|
version: "0"
|