I'm not sure if this is the right way to go about it but what I'm looking to do is shorten the build time of an image by Packer. One of the steps required is to copy some 10 GB of data and make it part of the image.
Currently I'm using a shell provisioner to SFTP this in to the image. This takes a long time. Instead I would like to have this data already in an EBS volume which can be attached at build time. Since it would be mounted as a block device in Amazon's own network the transfer would be much faster than SFTP.
I tried searching around for such a method in Packer but there's not much out there. I'm going to try and see if I can use the ami_block_device_mappings
optional parameter in the amazon-ebs
builder to attach the EBS volume.
If there is a better method I'm not aware of please let me know.
So it looks like the shell provisioner is the way to go..for now. The shell provisioner seems like the catch all for things like this :). It would be good to have a parameter in the amazon-ebs builder at some point though. Something like "attach_ebs_volume" for instance. Anyway, here's how I did it:
Done.
If anyone has a more elegant way... please share.
Thanks.