ironfan 4.0.4 → 4.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,12 +1,20 @@
1
- # v4.0.3: correcting EBS volume issues
1
+ # v4.0.5: security_group bug-fixes
2
+ * Fix for snapshot_id setting in cluster DSL
3
+ * Reinstated missing group_authorized capability
4
+
5
+ # v4.0.4: volume bug-fixes
6
+ * Made launch correctly create and tag secondary EBS volumes
7
+ * Adding some more warnings of code smells where separation of concerns has become blurry
8
+
9
+ # v4.0.3: volume bug-fixes
2
10
  * Volume information should now be correctly saving to Chef nodes
3
11
  * Keep flag now respected correctly for EBS root volumes
4
12
 
5
- # v4.0.2: Parallel calls working once more
13
+ # v4.0.2: parallelize bug-fixes
6
14
  * Added Ironfan.parallelize, to run the basic cluster commands in parallel against their servers
7
15
  * Make security_group range and group authorizations store only unique values
8
16
 
9
- # v4.0.1: Minor bug-fixes
17
+ # v4.0.1: volume bug-fixes
10
18
  * Don't attempt to correlate the node volumes hash unless it's set
11
19
  * RaidGroup declared by the DSL should get a name (so it can be indexed correctly)
12
20
  * Volume.defaults is deprecated
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.0.4
1
+ 4.0.5
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.4"
8
+ s.version = "4.0.5"
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-13"
12
+ s.date = "2012-09-18"
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 = [
@@ -96,6 +96,7 @@ module Ironfan
96
96
 
97
97
  class SecurityGroup < Ironfan::Dsl
98
98
  field :name, String
99
+ field :group_authorized, Array, :default => []
99
100
  field :group_authorized_by, Array, :default => []
100
101
  field :range_authorizations, Array, :default => []
101
102
 
@@ -111,6 +112,12 @@ module Ironfan
111
112
  group_authorized_by.compact!
112
113
  group_authorized_by.uniq!
113
114
  end
115
+
116
+ def authorize_group(other_name)
117
+ group_authorized << other_name.to_s
118
+ group_authorized.compact!
119
+ group_authorized.uniq!
120
+ end
114
121
  end
115
122
 
116
123
  end
@@ -29,7 +29,7 @@ module Ironfan
29
29
  :blank_xfs => 'snap-d9c1edb1',
30
30
  })
31
31
 
32
- def snapshot_id
32
+ def snapshot_id(id)
33
33
  Chef::Log.warn("CODE SMELL: EBS specific information in Dsl::Volume::VOLUME_IDS")
34
34
  super || VOLUME_IDS[snapshot_name]
35
35
  end
@@ -57,12 +57,20 @@ module Ironfan
57
57
  security_groups = computer.server.cloud(:ec2).security_groups.values
58
58
  dsl_groups = security_groups.select do |dsl_group|
59
59
  not (recall? dsl_group or recall(dsl_group.name).ensured) and \
60
- not (dsl_group.range_authorizations + dsl_group.group_authorized_by).empty?
60
+ not (dsl_group.range_authorizations +
61
+ dsl_group.group_authorized_by +
62
+ dsl_group.group_authorized).empty?
61
63
  end.compact
62
64
  return if dsl_groups.empty?
63
65
 
64
66
  Ironfan.step(computer.server.cluster_name, "ensuring security group permissions", :blue)
65
67
  dsl_groups.each do |dsl_group|
68
+ dsl_group.group_authorized.each do |other_group|
69
+ Ironfan.step(dsl_group.name, " ensuring access from #{other_group}", :blue)
70
+ options = {:group => "#{Ec2.aws_account_id}:#{other_group}"}
71
+ safely_authorize(dsl_group.name,1..65535,options)
72
+ end
73
+
66
74
  dsl_group.group_authorized_by.each do |other_group|
67
75
  Ironfan.step(dsl_group.name, " ensuring access to #{other_group}", :blue)
68
76
  options = {:group => "#{Ec2.aws_account_id}:#{dsl_group.name}"}
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: ironfan
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 4.0.4
5
+ version: 4.0.5
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 00:00:00 Z
13
+ date: 2012-09-18 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: -403832733803141254
235
+ hash: 3351900580010290705
236
236
  segments:
237
237
  - 0
238
238
  version: "0"