Try using SSD for root volumes.
This commit is contained in:
parent
723fb27671
commit
2f2a88825d
1 changed files with 9 additions and 0 deletions
|
@ -113,6 +113,14 @@ class EC2Executor(BuilderExecutor):
|
|||
logger.debug('Generated cloud config: %s', user_data)
|
||||
|
||||
ec2_conn = self._get_conn()
|
||||
|
||||
ssd_root_ebs = boto.ec2.blockdevicemapping.BlockDeviceType(
|
||||
size=8,
|
||||
volume_type='gp2',
|
||||
delete_on_termination=True,
|
||||
)
|
||||
block_devices = boto.ec2.blockdevicemapping.BlockDeviceMapping()
|
||||
block_devices['/dev/sda1'] = ssd_root_ebs
|
||||
reservation = yield From(ec2_conn.run_instances(
|
||||
coreos_ami,
|
||||
instance_type=self.executor_config['EC2_INSTANCE_TYPE'],
|
||||
|
@ -120,6 +128,7 @@ class EC2Executor(BuilderExecutor):
|
|||
key_name=self.executor_config.get('EC2_KEY_NAME', None),
|
||||
user_data=user_data,
|
||||
instance_initiated_shutdown_behavior='terminate',
|
||||
block_device_map=block_devices,
|
||||
))
|
||||
|
||||
if not reservation.instances:
|
||||
|
|
Reference in a new issue