Sign in
Categories
Migration Mapping Assistant Your Saved List Partners Sell in AWS Marketplace Amazon Web Services Home Help

Not "Cloud Ready"

  • By NCBI - SRA
  • on 06/24/2015

This is specifically about the AMI, not the CentOS 6.6 product itself. It unfortunately suffers from the following faults:

1) 8GiB fixed root (/) partition
2) No cloud-init
3) Clumsy root ssh key handling - instead of using cloud-init, it uses /etc/rc.local in a while loop to check for the SSH key. You can leave an old key in there very easily.
4) As of this writing (late June 2015) it has not been made compatible with the t2.large & c4.* type instances.

The first three points could actually be fixed by installing cloud-init and configuring it. For my organization I've rebuilt the AMI with:

# yum install -y cloud-init
# yum install -y dracut-modules-growpart cloud-utils-growpart
# to /etc/cloud/cloud.cfg, add:
growpart:
mode: auto
devices: ['/']
ignore_growroot_disabled: false
resize_rootfs: True
# dracut -f

Then create a new AMI. On boot, the cloud-init "growpart" module will grow the root partition to the total EBS size. Clearly, if that's not what you what, change or ignore that advice.

You can also fix this manually with a repartition and a reboot, but this will not automatically work as a new image.

# fdisk /dev/xvda <<END
u
d
n
p
1
2048

w
END
# reboot
# (after reboot)
# resize2fs /dev/xvda1
# df -h / # should now be entire EBS volume


There are no comments to display