This repo contains instructions to build Enterprise Aerospike AMI using hashicorp Packer
Templates will install Aerospike 5.5.0.3.
Currently following distrubutions are supported :
- Ubuntu 20.04 ("Focal") LTS
- Amazon Linux 2
- AWS CLI, installation instructions can be found here
- Packer >= 1.7.0, packer installation instructions can be found here
- AWS account with access to create, update ec2 instance, ebs. This can be restricted based on IAM task or Instance Role as per Packer docs
- User have knowledge of region where they with to build ami, otherwise default region is selected (us-west-1)
Export AWS variables
$ export AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID>
$ export AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY>
Following will build ami for the template and install aerospike on the system.
$ packer build -var 'region=<AWS_REGION>' templates/aws/[name]
region
- [optional] The region where build will be performed. Defaultus-east-1
. It is recommended to provide this valueinstance_type_amd64
- [optional] The instance type for the instance. Defaultt2.large
.
use packer validate
command to validate template and packer fmt
to format the template.
$ packer validate templates/aws/ubuntu
- Integrate with CI/CD pipeline
- Scanninng AMI for security vlunerability
- Notification for failures when AMI build fails
- Automated test for newly built AMI
- Decommission old AMI after retention period (*)