I am also very interested in this topic.
I currently in need of building a bare minimum image for AWS. My current approach is to use FAI
inside of Packer script.
- Packer prepares the build machine (dependencies, tools, etc.)
- FAI builds the disk image
- I clone the image to EBS volume and convert it to AMI.
I wonder if there is better way to do that. Can I build an image without FAI
using pure Packer?
Thanks
On 2022-05-30 10:07, Brian Metzler wrote:
If you are starting from scratch there are two ways to go:
1.) Start with the Cloud images available here:
https://cloud.debian.org/images/cloud/
Spin up a VM in openstack, make your needed modifications, then create an image
of that VM.
2.) Start fresh with the Debian ISO and use hashicorp packer to preseed a VM with the qemu
plugin. This will allow you to script out creation of the image, allow for post processing of the
vm through SSH and then you can pass the output image through qemu-img to convert it to the image
format you need to upload to Openstack Glance.
Once here you can spin up a VM in Openstack and use cloud-init to do any final customizations you
need.
I use #2 in my day-to-day work, to keep images up to date for my stakeholders. It allows you to
script everything out without having to do anything manually.
*If you have to do anything more than once, script it.*
-Brian
On Mon, May 30, 2022, 8:12 AM PICCA Frederic-Emmanuel
<[email protected]> wrote:
Hello, I think that this question was resolved a long time ago, but I did
not found an answer
from the cloud team.
I need to create a bunch of vm image for an openstack instance. In this
images, we need to
install a bunch of software, Debian packages, pure binary packages, and
does some
customisation of the configuration for these packages.
So I would like to know which tool should be use for this purpose.
thanks for your consideration and I am sorry if this question has already a
definitive answer :)
Cheers
Frederic