Merge pull request #223 from jwendell/use-gp2

Use SSD volumes instead of magnetic
This commit is contained in:
Anders Ingemann 2015-06-04 18:49:45 +02:00
commit 7c15a4255d
2 changed files with 2 additions and 2 deletions

View file

@ -12,7 +12,7 @@ class EBSVolume(Volume):
conn = e.connection conn = e.connection
zone = e.zone zone = e.zone
size = self.size.bytes.get_qty_in('GiB') size = self.size.bytes.get_qty_in('GiB')
self.volume = conn.create_volume(size, zone) self.volume = conn.create_volume(size, zone, volume_type='gp2')
while self.volume.volume_state() != 'available': while self.volume.volume_state() != 'available':
time.sleep(5) time.sleep(5)
self.volume.update() self.volume.update()

View file

@ -108,7 +108,7 @@ class RegisterAMI(Task):
from boto.ec2.blockdevicemapping import BlockDeviceType from boto.ec2.blockdevicemapping import BlockDeviceType
from boto.ec2.blockdevicemapping import BlockDeviceMapping from boto.ec2.blockdevicemapping import BlockDeviceMapping
block_device = BlockDeviceType(snapshot_id=info._ec2['snapshot'].id, delete_on_termination=True, block_device = BlockDeviceType(snapshot_id=info._ec2['snapshot'].id, delete_on_termination=True,
size=info.volume.size.bytes.get_qty_in('GiB')) size=info.volume.size.bytes.get_qty_in('GiB'), volume_type='gp2')
registration_params['block_device_map'] = BlockDeviceMapping() registration_params['block_device_map'] = BlockDeviceMapping()
registration_params['block_device_map'][root_dev_name] = block_device registration_params['block_device_map'][root_dev_name] = block_device