allow additional custom setup
Currently, my userdata
script pulls in some additional stuff, and executes that -- to speed things up, it'd be nice to already have that additional stuff in my AMI itself.
Idea here is that profiles could specify additional files/directories to be copied when building the image, and a custom script to put it where it needs to be. setup-ami
would check for the existence of the custom script after doing what it needs to do, and executes that.
What gets copied (including the extra install script) is configurable per build. In build/profiles/<profile>/<build>/
is a setup-ami.d/
directory, where source files/directories are symlinked; the extra install script gets symlinked as an explicit filename that the setup-ami
looks for. setup-ami.d/
gets copied to the build instance's /tmp/setup-ami.d/
.
I've already got the nvme-ebs-links
script getting symlinked and copied in this way (and setup-ami
is installing it properly). Shouldn't be too much more work to get the rest of this operational.