I’ve got quick question. What I can see we don’t have any post-provisioner that allows us create ISO. My workflow is: Packer gets vanilla CentOS, doing provisioning and as output I need installation image with all changes. I guess bootable ISO file would be perfect but other options are also possible. I just need to later install this customized ISO on other devices in easy way.
Do you have any idea how to capture image after provisioning with Packer to ISO or other image format that I can use for further local installations?
Packer doesn’t support building for bare metal, which I’m inferring is what you’re asking for here. (If your “devices” are instead VMs or Containers, then you should be able to just use the wealth of existing builders.)
That last link includes this comment from @vtolstov indicating how he uses mksquashfs to create a normal file containing the entire root filesystem of a packer-built-vm, then copies its kernel and initrd from its boot partition, then makes all 3 of these available as downloadable packer artifacts. There are several tools available to construct a bootable iso from these files.
That issue referred to the newer-but-still-quite-old issue specifically about building an iso from packer (the other was more about pxe boot). This issue is unfortunately rather empty but does refer to this project, by @viralpoetry which appears to just do an alpine linux packer build to virtualbox .ova, and just provides instructions in the README for converting the .vdmk to a raw disk file, then write it to a sub drive. So, this is another approach to achieving what we want.