Make the size of the build node HDD configurable

Fixes #1520
This commit is contained in:
Joseph Schorr 2016-06-06 11:23:55 -04:00
parent 7d356c451b
commit f9469a84b3
2 changed files with 3 additions and 2 deletions

View file

@ -75,6 +75,7 @@ class BuilderExecutor(object):
coreos_channel=coreos_channel, coreos_channel=coreos_channel,
worker_tag=self.executor_config['WORKER_TAG'], worker_tag=self.executor_config['WORKER_TAG'],
logentries_token=self.executor_config.get('LOGENTRIES_TOKEN', None), logentries_token=self.executor_config.get('LOGENTRIES_TOKEN', None),
volume_size=self.executor_config.get('VOLUME_SIZE', '42G'),
) )
@ -119,7 +120,7 @@ class EC2Executor(BuilderExecutor):
ec2_conn = self._get_conn() ec2_conn = self._get_conn()
ssd_root_ebs = boto.ec2.blockdevicemapping.BlockDeviceType( ssd_root_ebs = boto.ec2.blockdevicemapping.BlockDeviceType(
size=48, size=int(self.executor_config.get('BLOCK_DEVICE_SIZE', 48)),
volume_type='gp2', volume_type='gp2',
delete_on_termination=True, delete_on_termination=True,
) )

View file

@ -61,7 +61,7 @@ coreos:
ConditionPathExists=!/var/lib/docker.btrfs ConditionPathExists=!/var/lib/docker.btrfs
[Service] [Service]
Type=oneshot Type=oneshot
ExecStart=/usr/bin/truncate --size=42G /var/lib/docker.btrfs ExecStart=/usr/bin/truncate --size={{ volume_size }} /var/lib/docker.btrfs
ExecStart=/usr/sbin/mkfs.btrfs /var/lib/docker.btrfs ExecStart=/usr/sbin/mkfs.btrfs /var/lib/docker.btrfs
- name: var-lib-docker.mount - name: var-lib-docker.mount
enable: true enable: true