packer-virtualbox-ami-centos7

This Packer template will built an extremely bare CentOS 7 image from the NetInstall ISO, intended for deployment to EC2.

This image conforms to Amazon's guidelines, and uses cloud init to provision the image upon deployment.

Follow Amazon's import/export guide to learn how to deploy the OVA once created.

Usage

Building

To use a different kickstart script, just set the profile accordingly.

packer build -var 'profile=ext4' template.json

Uploading to S3

aws s3 cp output-ext4/centos7-ec2-ext4.ova s3://my-ami-bucket/centos7-ec2-ext4.ova

Importing to EC2

aws ec2 import-image --cli-input-json '{  "Description": "CentOS 7 EXT4", "DiskContainers": [ { "Description": "CentOS 7 EXT4", "UserBucket": { "S3Bucket": "my-ami-bucket", "S3Key" : "centos7-ec2-ext4.ova" } } ]}'