ironfan 4.12.1 → 4.12.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +3 -0
- data/VERSION +1 -1
- data/ironfan.gemspec +2 -2
- data/lib/ironfan/dsl/cluster.rb +5 -6
- data/lib/ironfan/dsl/compute.rb +1 -0
- data/lib/ironfan/dsl/facet.rb +4 -4
- data/lib/ironfan/dsl/realm.rb +13 -11
- metadata +3 -3
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.12.
|
1
|
+
4.12.2
|
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.12.
|
8
|
+
s.version = "4.12.2"
|
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 = "2013-09-
|
12
|
+
s.date = "2013-09-29"
|
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 = [
|
data/lib/ironfan/dsl/cluster.rb
CHANGED
@@ -7,10 +7,8 @@ module Ironfan
|
|
7
7
|
def initialize(attrs={},&block)
|
8
8
|
super
|
9
9
|
self.cluster_role Ironfan::Dsl::Role.new(:name => "#{attrs[:name]}-cluster")
|
10
|
-
|
11
|
-
|
12
|
-
def facet(name,attrs={},&block)
|
13
|
-
super(name,attrs.merge(cluster_names: cluster_names),&block)
|
10
|
+
self.realm_name attrs[:owner].name unless attrs[:owner].nil?
|
11
|
+
self.cluster_names attrs[:owner].cluster_names unless attrs[:owner].nil?
|
14
12
|
end
|
15
13
|
|
16
14
|
# Utility method to reference all servers from constituent facets
|
@@ -20,8 +18,9 @@ module Ironfan
|
|
20
18
|
result
|
21
19
|
end
|
22
20
|
|
23
|
-
def cluster_name
|
21
|
+
def cluster_name
|
22
|
+
name
|
23
|
+
end
|
24
24
|
end
|
25
|
-
|
26
25
|
end
|
27
26
|
end
|
data/lib/ironfan/dsl/compute.rb
CHANGED
data/lib/ironfan/dsl/facet.rb
CHANGED
@@ -7,7 +7,9 @@ module Ironfan
|
|
7
7
|
field :cluster_name, String
|
8
8
|
|
9
9
|
def initialize(attrs={},&block)
|
10
|
-
self.
|
10
|
+
self.cluster_names attrs[:owner].cluster_names unless attrs[:owner].nil?
|
11
|
+
self.realm_name attrs[:owner].realm_name unless attrs[:owner].nil?
|
12
|
+
self.cluster_name = attrs[:owner].cluster_name unless attrs[:owner].nil?
|
11
13
|
self.name = attrs[:name] unless attrs[:name].nil?
|
12
14
|
self.facet_role Ironfan::Dsl::Role.new(:name => "#{full_name}-facet")
|
13
15
|
super
|
@@ -15,8 +17,6 @@ module Ironfan
|
|
15
17
|
end
|
16
18
|
|
17
19
|
def full_name() "#{cluster_name}-#{name}"; end
|
18
|
-
|
19
20
|
end
|
20
|
-
|
21
21
|
end
|
22
|
-
end
|
22
|
+
end
|
data/lib/ironfan/dsl/realm.rb
CHANGED
@@ -7,26 +7,28 @@ module Ironfan
|
|
7
7
|
magic :cluster_suffixes, Whatever
|
8
8
|
|
9
9
|
def initialize(attrs={},&block)
|
10
|
-
cluster_names
|
11
|
-
|
10
|
+
cluster_names({})
|
11
|
+
realm_name attrs[:name] if attrs[:name]
|
12
12
|
super
|
13
13
|
end
|
14
14
|
|
15
15
|
def cluster(label, attrs={},&blk)
|
16
16
|
new_name = [realm_name, label].join('_').to_sym
|
17
|
-
cluster = Ironfan::Dsl::Cluster.new(name: new_name, cluster_names:
|
18
|
-
cluster_names
|
19
|
-
cluster_names.send "#{label}=", new_name
|
20
|
-
cluster_suffixes.new_ostruct_member label
|
21
|
-
cluster_suffixes.send "#{label}=", label
|
22
|
-
(clusters.keys.map{|k| clusters[k]} << cluster).each do |cl|
|
23
|
-
cl.cluster_names cluster_names
|
24
|
-
end
|
17
|
+
cluster = Ironfan::Dsl::Cluster.new(name: new_name, owner: self, cluster_names: cluster_names)
|
18
|
+
cluster_names[label] = new_name
|
25
19
|
cluster.receive!(attrs, &blk)
|
26
20
|
super(new_name, cluster)
|
27
21
|
end
|
28
22
|
|
29
|
-
def
|
23
|
+
def cluster_name suffix
|
24
|
+
clusters.fetch([realm_name, suffix.to_s].join('_').to_sym).name.to_sym
|
25
|
+
end
|
26
|
+
|
27
|
+
def cluster_suffix suffix
|
28
|
+
clusters.
|
29
|
+
fetch([realm_name, suffix.to_s].join('_').to_sym).name.to_s.
|
30
|
+
gsub(/^#{realm_name}_/, '').to_sym
|
31
|
+
end
|
30
32
|
end
|
31
33
|
end
|
32
34
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ironfan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.12.
|
4
|
+
version: 4.12.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-09-
|
12
|
+
date: 2013-09-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: chef
|
@@ -382,7 +382,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
382
382
|
version: '0'
|
383
383
|
segments:
|
384
384
|
- 0
|
385
|
-
hash:
|
385
|
+
hash: 4472391313830122724
|
386
386
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
387
387
|
none: false
|
388
388
|
requirements:
|