Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #247 from nickmarden/explicit_ephemeral_mountpoints

Allow per-ephemeral-disk options using :disks attribute
  • Loading branch information...
commit c8c8e9f88af55823865826b49af8247a928fb548 2 parents 8563455 + c18b4f8
@temujin9 temujin9 authored
View
8 lib/ironfan/dsl/ec2.rb
@@ -104,7 +104,13 @@ def implied_volumes
mount_options 'defaults,noatime'
tags({:bulk => true, :local => true, :fallback => true})
end
- ephemeral.receive! mount_ephemerals
+ ephemeral_attrs = mount_ephemerals.clone
+ if ephemeral_attrs.has_key?(:disks)
+ disk_attrs = mount_ephemerals[:disks][idx] || { }
+ ephemeral_attrs.delete(:disks)
+ ephemeral_attrs.merge!(disk_attrs)
+ end
+ ephemeral.receive! ephemeral_attrs
result << ephemeral
end
result
View
8 spec/ironfan/ec2/cloud_provider_spec.rb
@@ -13,6 +13,10 @@
facet :web do
instances 3
+ cloud(:ec2) do
+ flavor 'm1.small'
+ mount_ephemerals({ :disks => { 0 => { :mount_point => '/data' } } })
+ end
end
end
@@ -30,6 +34,10 @@
it 'should have one cloud provider, EC2' do
@facet.servers[0].clouds.keys.should == [ :ec2 ]
end
+
+ it 'should have its first ephemeral disk mounted at /data' do
+ @facet.servers[0].implied_volumes[1].mount_point.should == '/data'
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.