Using Terraform and packer-plugin-xenserver for Talos Linux
-
I've been looking into Talos Linux for an easier way to spin up Kubernetes clusters. It looks promising and I've used it manually setup a simple cluster in Xen-Orchestra. Now I'm trying to use Terraform to automate cluster creation.
Talos has a list of Cloud Platforms that it supports and I've been trying out the Nocloud platform so that I can pass it a cloud-init network config. I've tested this out by passing the correct parameter on the Talos boot menu and it works. (You have to set the boot paramter "talos.platform=nocloud.)
But in their releases they have a preconfigured Nocloud image. I figured I could use that with Packer to create a template, but I'm having a hard time getting it to work. I'm thinking maybe @ddelnano can help getting this work with the packer-plugin-xenserver.
I've been trying to piece together the details for how to get this working. The Talos documentation has documentation for using the nocloud platform but they don't use Packer in those docs. There are two platforms they support that they document using Packer - Hetzner and Upcloud - but I can't figure out how to use that knowledge to get this to work with packer-plugin-xenserver.
One of the issues seems to be that packer-plugin-xenserver requires an ISO, but the nocloud image they have released is not an ISO, it's a raw.xz file.
I'm not very experienced with Packer so I might just be missing something here.
If anyone has some insight on how to get this to work I'd appreciate it.
-
Hi @slynch, I unfortunately don't have any experience with Talos Linux. It seems like a very promising project.
Creating packer images with the xenserver packer plugin is OS dependent. The Ubuntu and CentOS examples provided in the repo use autoinstallation and kickstart respectively.
Is Talos Linux based on an existing distro that has an existing unattended / automatic install solution? I think the key to accomplishing this is using an off the shelf auto install tool or finding something that will work for Talos.
Talos's nocloud data source will likely be part of this solution, however, for the existing examples it's just a means for configuring the auto install tool for the target distro.
There are two platforms they support that they document using Packer - Hetzner and Upcloud - but I can't figure out how to use that knowledge to get this to work with packer-plugin-xenserver.
While I'm not familiar with the the Hetzner and Upcloud packer plugins, it seems there "examples" are essentially booting a VM and then
dd
'ing theraw.xz
file over top of a disk device. So unfortunately I don't think those examples will be useful for implementing this with the xenserver packer plugin. -