Closed Shackelford-Arden closed 8 months ago
Hey @Shackelford-Arden, sorry for the late reply and appreciate you getting involved with the project!
Is the intended pattern here that there is a brand new template created upon each run using a new dynamically generated name?
Not exactly. What you described with the AWS AMI data source is what I envisioned for the project. However, my personal workflow has been lazy and I never tried to make the workflow you described a reality. I typically build an VM template through packer and rename the template through the Xen Orchestra UI.
It would be very cool to have a more polished workflow, so contributions to make that seamless are extremely welcome.
The idea I had for supporting the workflow you described was to annotate a VM template in a way that the xenorchestra_template
could then support filtering by. I don't know exactly how to do this with direct Xenserver integration without some investigation, but if the packer integrated with XO directly XO's tag mechanism would be flexible enough for supporting that (tag could be packer-created-at:${timestamp_of_build}
).
As you mentioned, the filtering isn't the only piece that needs work (packer plugin issues with multiple VMs).
Cool, thanks for getting back to me! Makes sense based on what I'm seeing. I'll close this out for now, but I'm hoping to see if I can play with this some more!
Hello!
I'm trying to understand the "proper" workflow within XCP-ng/XO to use Packer. I've got a working build using the following (generalized for brevity):
As it stands today, this results in a template that I can then use in either the UI or the Terraform provider (haven't used it yet this way, but will soon).
However, once I re-run the Packer build, the build errors out due to naming conflicts:
Is the intended pattern here that there is a brand new template created upon each run using a new dynamically generated name?
Seems like that would make this challenging to use w/ the Terraform provider (based on reading the docs for it) since the data resource doesn't have similar functionality to that of AWS's AMI data resource where it attempts to match the name and pulls the most recent. Rather it appears that the name is static, which would then require updating once a new template has been generated.
Based on what I see in the XO UI, seems like there isn't a way to update an existing template?