Terraform and packer understandings

Hi,

I run ESXi and I run TF to built ubuntu VM’s in it.
Within main.tf I kick-off the VM that runs the setup
based on PXE while booting the VM guest.
So far so good.

The system set’s up itself automatically based on linux kickstart file but I want
to do further steps after the installation was sucessful.

I think there is where “packer” would come into play. Is there a way (in my case) that packer would somehow poll until SSH is becoming available on the Linux boxes?

And how would that look like to kick-off “packer” in TF in my case.

Any help kindly appreciated!
ndee

Packer is rather for backing images which you’d use for the deployment itself, compared to post-deployment configurations. IMHO, config management tools like puppet, ansible, chef, salt come into play here.

Thank you for this clarification.

I figured out myself how it basically works by “RTFM”.

So, I start running packer and opened a public git repo:

At first, this repo covers only packer in conjunction with ansible so far.

What I’m still struggling in order to proceed with terraform in that case
is, that I don’t understand how to pack multiple instances in parallel.

I know now how to build on but if you would like to build several as I
understand I need configured multiple builders maybe?

How would that look like and how can I parameterize multiple builders?

Thx

Hm,
you build a single image using packer. This is the reference Image or the template.

Using that template terraform would deploy multiple instances and maybe initiate tooling for additional customization.