flatcar / sysext-bakery

Recipes for baking systemd-sysext images
Apache License 2.0
72 stars 37 forks source link

create_k3s_sysext.sh: create systemd unit files #69

Closed johanneskastl closed 6 months ago

johanneskastl commented 6 months ago

create systemd unit files

create /usr/local/lib/systemd/system/k3s.service and /usr/local/lib/systemd/system/k3s-agent.service

unit files were taken from the k3s install script at get.k3s.io.

kastl-ars commented 6 months ago

I just had some time to actually test the k3s sysext, which fails:

$ systemd-sysext refresh
Failed to read metadata for image k3s-v1.29.2+k3s1-x86-64: No medium found
$ ls -lh /etc/extensions/
total 56M
lrwxrwxrwx. 1 root root   9 May  7 13:46 containerd-flatcar.raw -> /dev/null
lrwxrwxrwx. 1 root root   9 May  7 13:46 docker-flatcar.raw -> /dev/null
-rw-r--r--. 1 root root 56M May  7 13:46 k3s-v1.29.2+k3s1-x86-64.raw
lrwxrwxrwx. 1 root root  33 May  7 13:46 oem-qemu.raw -> /oem/sysext/oem-qemu-3815.2.2.raw
$

Should I open up an issue?

pothos commented 6 months ago

The file name must be /etc/extensions/k3s.raw which can be a symlink to a folder that has versioned files as done in the README and managed by systemd-sysupdate.

kastl-ars commented 6 months ago

Ah, thanks @pothos, that works. I'll prepare a PR for the README, to make the k3s and rke2 sections more self-contained, with all the bits and pieces needed.