TL;DR: Packer + checksums = ๐
By Corey Gale
meetup.com/West-LA-DevOps
-debug
Packer JSON
AMI config paths
AMI ID
docker pull mechtron/ami-bakeryโ
Get list of all
config files
Sort list
Calculate SHA1 of each file
Calculate SHA1 of list of file SHA1s
= ami_config_checksum
Does an
AMI exist with that
ami_config_checksum
?
Build new AMI
Return existing AMI
No
Yes
WARNING:
Contains manually-pinned AMI IDs
New stage
Updated stage
https://github.com/mechtron/ami-bakery
coreygale@gmail.com
Question: "what's using all the disk space on this Debian system?"
Answer: apt install ncdu && ncdu /
coreygale@gmail.com
docker run --rm -t \
-e AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION \
-e AWS_SUBNET_ID=$AWS_SUBNET_ID \
-e PACKER_JSON_PATH=`pwd`/example-app/ami/packer/ami.json \
-e AMI_DEFINITION_DIRS=`pwd`/example-app/ami/ \
--mount type=bind,source=`pwd`,target=`pwd` \
--mount type=bind,source=$HOME/.aws/,target=/root/.aws \
docker.io/mechtron/ami-bakery:latest