cloud-images icon indicating copy to clipboard operation
cloud-images copied to clipboard

Major changes for AMIs and build process

Open LKHN opened this issue 2 years ago • 0 comments

AMI:

  • Use IMDSv2 as a default Instance Metadata Service method.
  • Update size of the /boot partition from 512 MiB to 1024 MiB.
  • Add support for EC2 Instance Connect. See: https://wiki.almalinux.org/cloud/EC2-instance-connect.html
  • Add Secure Boot support (disabled by default).
  • Add NitroTPM support (disabled by default).

Packer:

  • Use Amazon EBS Surrogate builder for 8 (x86_64) AMI as 8 (AArch64), 9 (x86_64), 9 (AArch64).

Building with QEMU builder and importing with Amazon Import post-processor via VM Import/Export services of AWS is slow, has multiple stages of build and involves uploading of 4 GiB virtual disk image. Since we are using the Amazon EBS Surrogate builder for the rest of the AMIs very long time. It's good time to move on from the old method.

Ansible:

  • Refactor all roles: - ami_8_x86_64 - ami_8_aarch64 - ami_9_x86_64 - ami_9_aarch64)

All roles passes production profile of Ansible Lint (24.2.1)

Tools(aws_ami_mirror): After copying AMIs to the target regions and making is public, make the snapshot public too. In this way anyone can full copy AMIs to their AWS account. Fixes https://bugs.almalinux.org/view.php?id=329

Documentation:

  • Update the build instructions to build different regions than us-east-1.
  • Add customization section to customize AMI disk type and size also speed-up the build.

LKHN avatar Mar 20 '24 21:03 LKHN