This repository includes a build script for a CentOS 7 AMI.
- Minimal Packages
- SELinux - Configured in permissive mode
- Partition Scheme Compatible with CIS Benchmarks for Centos
- 1MB Boot Loader (Not Mounted)
- 4GB Root (/)
- 2GB Swap (None)
- 4GB Home (/home)
- 1GB log (/var/log)
- 1GB audit (/var/log/audit)
- 4GB var (/var)
- Start an existing Centos Images and Attach a 16GB volume to
sdb - Copy build.sh
- Execute
sudo sh build.sh - Shutdown the instance
- Take a snapshot of the 16GB volume
- Register the AMI
aws --region us-east-1 --profile terraformrole ec2 register-image --name 'CentOS-7.0-test' --description 'Centos7 Master Beta' --virtualization-type hvm --root-device-name /dev/sda1 --block-device-mappings '[{"DeviceName":"/dev/sda1","Ebs": { "SnapshotId": "snap-06637969bf4557d79", "VolumeSize":16, "DeleteOnTermination": true, "VolumeType": "gp2"}}, { "DeviceName":"/dev/xvdb","VirtualName":"ephemeral0"}, { "DeviceName":"/dev/xvdc","VirtualName":"ephemeral1"}]' --architecture x86_64 --sriov-net-support simple --ena-support