Implement BlockDeviceMappings for AWS::EC2::Instance¶
Include the URL of your launchpad blueprint:
https://blueprints.launchpad.net/heat/+spec/implement-ec2instance-bdm
We should support the BlockDeviceMappings for AWS::EC2::Instance resource to be compatible with AWSCloudFormation.
Problem description¶
Now in Heat, the AWS::EC2::Instance resource only has ‘Volumes’ property to indicate the volumes to be attached, but there are two ways defining volumes in AWSCloudFormation, ‘Volumes’ and ‘BlockDeviceMappings’, see:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html
‘Volumes’ support the ‘volume_id’, user can specify the volume to be attached to the instance. This way has been implemented in Heat, but it’s not a good way for batch creation because one volume can’t be attached to many instances.
‘BlockDeviceMappings’ support the ‘snapshot_id’, user can specify a snapshot, then a volume will be created from the snapshot, and the volume will be attached to the instance. This way is a good way for batch creation.
Nova supports to create a server with a block device mapping:
http://docs.openstack.org/api/openstack-compute/2/content/ext-os-block-device-mapping-v2-boot.html
So, we should support the ‘BlockDeviceMappings’ for AWS::EC2::Instance resource.
Proposed change¶
Add ‘BlockDeviceMappings’ property for AWS::EC2::Instance resource, specially in which user can specify the ‘snapshot_id’.
Alternatives¶
None
Implementation¶
Assignee(s)¶
- Primary assignee:
<huangtianhua>
Milestones¶
- Target Milestone for completion:
Juno-2
Work Items¶
Support the BlockDeviceMappings for AWS::EC2::Instance resource
Add UT/Tempest for the change
Add a template for AWS::EC2::Instance with BlockDeviceMappings
Dependencies¶
None