/cloud-images

Packer templates and other tools for building AlmaLinux images for various cloud platforms.

Primary LanguageHCLMIT LicenseMIT

AlmaLinux OS Cloud Images

AlmaLinux OS Cloud Images is a project that contains Packer templates and other tools for building AlmaLinux OS images for various cloud platforms.

Download official images

Name Download URL
AWS Marketplace AMI https://aws.amazon.com/marketplace/pp/B094C8ZZ8J
AWS community AMIs https://wiki.almalinux.org/cloud/AWS.html
Docker Hub https://hub.docker.com/_/almalinux
Generic Cloud (cloud-init) https://repo.almalinux.org/almalinux/8/cloud/x86_64/images/
Google Cloud https://cloud.google.com/compute/docs/images#almalinux
LXC/LXD https://images.linuxcontainers.org
Quay.io https://quay.io/repository/almalinux/almalinux
Vagrant boxes app.vagrantup.com/almalinux

Roadmap

  • Add aarch64 architecture support
  • Vagrant + VirtualBox support
  • Vagrant + VMWare support
  • Vagrant + Parallels support (#3)
  • Vagrant + Microsoft Hyper-V support (#4)
  • Vagrant + Libvirt support
  • AWS support (using the VMWare builder only, it would be nice to support VirtualBox or Qemu as well)
  • Google Cloud support
  • Microsoft Azure support (#14)
  • DigitalOcean support
  • Generic Cloud / OpenStack support (#12)
  • LXC/LXD support (#8)

Usage

Initialize Packer plugins:

$ packer init .

Build a Vagrant Box

Build a VirtualBox box:

$ packer build -only=virtualbox-iso.almalinux-8 .

Build a VMWare box:

$ packer build -only=vmware-iso.almalinux-8 .

Build a Libvirt box:

$ packer build -only=qemu.almalinux-8 .

Build a Hyper-V box:

> packer build -only="hyperv-iso.almalinux-8" .

Build an Amazon AMI

Before building AMI's you need to configure AWS credentials as described in the Packer documentation. Basically, you need to define the following environment variables:

export AWS_ACCESS_KEY_ID='ENTER_YOUR_ACCESS_KEY_HERE'
export AWS_SECRET_ACCESS_KEY='ENTER_YOUR_SECRET_KEY_HERE'
export AWS_DEFAULT_REGION='us-east-1'

Also, you need to create an S3 bucket that Packer will use for temporary image storing before importing it into EC2. It's strongly recommended creating the bucket in the us-east-1 region if you are going to submit your images to the Amazon Marketplace. Accordingly to Amazon's documentation, the self-service AMI scanner supports only that region.

After configuring the AWS credentials and creating the S3 bucket, run the following command to build an AMI and import it to EC2:

$ packer build -var aws_s3_bucket_name="YOUR_S3_BUCKET_NAME" -only=vmware-iso.almalinux-8-aws .

If you are using a non-standard role name, it's possible to define it as a variable:

$ packer build -var aws_s3_bucket_name="YOUR_S3_BUCKET_NAME" \
               -var aws_role_name="YOUR_IAM_ROLE_NAME" -only=vmware-iso.almalinux-8-aws .

Build a Generic Cloud (OpenStack compatible) image

$ packer build -only qemu.almalinux-8-gencloud-x86_64 .

Requirements

References

License

Licensed under the MIT license, see the LICENSE file for details.