Use SSD volumes instead of magnetic

They are faster and the default when using AWS EC2 console.
This commit is contained in:
Jonh Wendell 2015-06-04 13:23:21 -03:00
parent 66fa01526b
commit 62c3577c59
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