ironfan 6.0.7 → 6.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/ironfan.gemspec CHANGED
@@ -24,9 +24,10 @@ Gem::Specification.new do |gem|
24
24
  gem.add_dependency('unf', '0.1.3')
25
25
  gem.add_dependency('excon', '0.32.1')
26
26
  gem.add_dependency('formatador', '0.2.4')
27
- gem.add_dependency('gorillib', '~> 0.5.2')
27
+ gem.add_dependency('gorillib', '0.5.0')
28
28
  gem.add_dependency('rbvmomi', '1.8.1')
29
29
  gem.add_dependency('diff-lcs', '1.2.5')
30
+ gem.add_dependency('json', '1.5.4')
30
31
 
31
32
  gem.add_development_dependency('bundler', '~> 1.0')
32
33
 
@@ -42,6 +42,10 @@ module Ironfan
42
42
  name
43
43
  end
44
44
 
45
+ def full_cluster_name
46
+ full_name
47
+ end
48
+
45
49
  def full_name
46
50
  "#{realm_name}-#{name}"
47
51
  end
@@ -110,7 +110,7 @@ module Ironfan
110
110
  discovery = {discovers: keys.reverse.inject(compute.realm_name){|hsh,key| {key => hsh}}}
111
111
  (compute.facet_role || compute.cluster_role).override_attributes(discovery)
112
112
 
113
- client_group_v = compute.full_name
113
+ client_group_v = compute.full_cluster_name
114
114
  server_group_v = "#{realm_name}-#{server_cluster}"
115
115
 
116
116
  group_edge(compute, client_group_v, :authorized_by_group, server_group_v)
@@ -325,7 +325,7 @@ Chef::Config[:ec2_flavor_info].merge!({
325
325
  'c1.xlarge' => { :price => 0.580, :bits => 64, :ram => 7168, :cores => 8, :core_size => 2.5, :inst_disks => 4, :inst_disk_size => 420, :ephemeral_volumes => 4, :ebs_optimizable => 1000, },
326
326
  'm1.xlarge' => { :price => 0.480, :bits => 64, :ram => 15360, :cores => 4, :core_size => 2.0, :inst_disks => 4, :inst_disk_size => 420, :ephemeral_volumes => 4, :ebs_optimizable => 1000, },
327
327
  'm3.2xlarge' => { :price => 0.900, :bits => 64, :ram => 30720, :cores => 8, :core_size => 3.25, :inst_disks => 2, :inst_disk_size => 80, :ephemeral_volumes => 2, :ebs_optimizable => 1000, },
328
- 'm2.2xlarge' => { :price => 0.820, :bits => 64, :ram => 35021, :cores => 4, :core_size => 3.25, :inst_disks => 1, :inst_disk_size => 850, :ephemeral_volumes => 2, :ebs_optimizable => 500, },
328
+ 'm2.2xlarge' => { :price => 0.820, :bits => 64, :ram => 35021, :cores => 4, :core_size => 3.25, :inst_disks => 1, :inst_disk_size => 850, :ephemeral_volumes => 1, :ebs_optimizable => 500, },
329
329
  'm2.4xlarge' => { :price => 1.640, :bits => 64, :ram => 70042, :cores => 8, :core_size => 3.25, :inst_disks => 2, :inst_disk_size => 840, :ephemeral_volumes => 2, :ebs_optimizable => 1000, },
330
330
  'cc2.8xlarge' => { :price => 2.400, :bits => 64, :ram => 61952, :cores =>32, :core_size => 2.75, :inst_disks => 4, :inst_disk_size => 840, :ephemeral_volumes => 4, :placement_groupable => true, :virtualization => 'hvm' },
331
331
  'cg1.4xlarge' => { :price => 2.100, :bits => 64, :ram => 23040, :cores =>16, :core_size => 2.09375, :inst_disks => 2, :inst_disk_size => 840, :ephemeral_volumes => 2, :placement_groupable => true, :virtualization => 'hvm' },
@@ -27,8 +27,12 @@ module Ironfan
27
27
  servers.to_a + components.to_a
28
28
  end
29
29
 
30
+ def full_cluster_name
31
+ "#{realm_name}-#{cluster_name}"
32
+ end
33
+
30
34
  def full_name
31
- "#{realm_name}-#{cluster_name}-#{name}"
35
+ "#{full_cluster_name}-#{name}"
32
36
  end
33
37
  end
34
38
  end
@@ -170,10 +170,10 @@ module Ironfan
170
170
  hsh.delete(:_type)
171
171
  hsh.delete(:ssh_user)
172
172
  #hsh[:security_groups] = Hash[hsh[:security_groups].map{|x| [x.fetch(:name), x]}]
173
- hsh[:components] = Hash[hsh[:components].to_a.map do |component|
174
- [component[:name].to_s, component]
173
+ hsh[:components] = Hash[hsh.fetch(:components).map do |component|
174
+ [component.fetch(:name), component]
175
175
  end]
176
- hsh[:run_list] = hsh[:run_list].to_a.map do |x|
176
+ hsh[:run_list] = hsh.fetch(:run_list).map do |x|
177
177
  x.end_with?(']') ? x : "recipe[#{x}]"
178
178
  end
179
179
  end)
@@ -48,12 +48,7 @@ module Ironfan
48
48
  #
49
49
  # Discovery
50
50
  #
51
- def self.load!(cluster = nil)
52
- load_once!
53
- end
54
-
55
- def self.load_once!
56
- return if @loaded
51
+ def self.load!(cluster=nil)
57
52
  Ec2.connection.volumes.each do |vol|
58
53
  next if vol.blank?
59
54
  next if %w[deleting deleted error].include?(vol.state.to_s)
@@ -67,7 +62,6 @@ module Ironfan
67
62
  remember ebs
68
63
  end
69
64
  end
70
- @loaded = true
71
65
  end
72
66
 
73
67
  def receive_adaptee(obj)
@@ -114,12 +114,7 @@ module Ironfan
114
114
  #
115
115
  # Discovery
116
116
  #
117
- def self.load!(cluster = nil)
118
- load_once!
119
- end
120
-
121
- def self.load_once!
122
- return if @loaded
117
+ def self.load!(cluster=nil)
123
118
  Ec2.connection.servers.each do |fs|
124
119
  machine = new(:adaptee => fs)
125
120
  if (not machine.created?)
@@ -133,7 +128,6 @@ module Ironfan
133
128
  remember machine
134
129
  end
135
130
  end
136
- @loaded = true
137
131
  end
138
132
 
139
133
  def receive_adaptee(obj)
@@ -204,8 +204,6 @@ module Ironfan
204
204
  server.security_group computer.server.realm_name
205
205
  realm_group = server.security_group cluster_name
206
206
  realm_group.authorized_by_group realm_group.name
207
- facet_name = "#{computer.server.realm_name}-#{computer.server.cluster_name}-#{computer.server.facet_name}"
208
- server.security_group facet_name
209
207
  end
210
208
 
211
209
  # Try an authorization, ignoring duplicates (this is easier than correlating).
@@ -192,8 +192,6 @@ module Ironfan
192
192
  server.security_group computer.server.realm_name
193
193
  realm_group = server.security_group cluster_name
194
194
  realm_group.authorized_by_group realm_group.name
195
- facet_name = "#{computer.server.realm_name}-#{computer.server.cluster_name}-#{computer.server.facet_name}"
196
- server.security_group facet_name
197
195
  end
198
196
 
199
197
  # Try an authorization, ignoring duplicates (this is easier than correlating).
@@ -1,3 +1,3 @@
1
1
  module Ironfan
2
- VERSION = '6.0.7'
2
+ VERSION = '6.0.8'
3
3
  end
@@ -197,7 +197,7 @@ describe Ironfan::Dsl::Component do
197
197
  end
198
198
 
199
199
  it 'correctly sets the server cluster even when the client and server facets differ' do
200
- bam_wak_group = Ironfan.realm(:wap).cluster(:bam).facet(:wak).security_group('wap-bam-wak')
200
+ bam_wak_group = Ironfan.realm(:wap).cluster(:bam).facet(:wak).security_group('wap-bam')
201
201
  bam_wak_group.group_authorized_by.should include('wap-bop')
202
202
  end
203
203
 
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: 6.0.7
4
+ version: 6.0.8
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: 2014-04-03 00:00:00.000000000 Z
12
+ date: 2014-04-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chef
@@ -96,17 +96,17 @@ dependencies:
96
96
  requirement: !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
99
- - - ~>
99
+ - - '='
100
100
  - !ruby/object:Gem::Version
101
- version: 0.5.2
101
+ version: 0.5.0
102
102
  type: :runtime
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
- - - ~>
107
+ - - '='
108
108
  - !ruby/object:Gem::Version
109
- version: 0.5.2
109
+ version: 0.5.0
110
110
  - !ruby/object:Gem::Dependency
111
111
  name: rbvmomi
112
112
  requirement: !ruby/object:Gem::Requirement
@@ -139,6 +139,22 @@ dependencies:
139
139
  - - '='
140
140
  - !ruby/object:Gem::Version
141
141
  version: 1.2.5
142
+ - !ruby/object:Gem::Dependency
143
+ name: json
144
+ requirement: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - '='
148
+ - !ruby/object:Gem::Version
149
+ version: 1.5.4
150
+ type: :runtime
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - '='
156
+ - !ruby/object:Gem::Version
157
+ version: 1.5.4
142
158
  - !ruby/object:Gem::Dependency
143
159
  name: bundler
144
160
  requirement: !ruby/object:Gem::Requirement
@@ -318,7 +334,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
318
334
  version: '0'
319
335
  segments:
320
336
  - 0
321
- hash: 2994755977680562733
337
+ hash: 770393223121845941
322
338
  required_rubygems_version: !ruby/object:Gem::Requirement
323
339
  none: false
324
340
  requirements:
@@ -327,7 +343,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
327
343
  version: '0'
328
344
  segments:
329
345
  - 0
330
- hash: 2994755977680562733
346
+ hash: 770393223121845941
331
347
  requirements: []
332
348
  rubyforge_project:
333
349
  rubygems_version: 1.8.25