Help on generating "howto to add incus-agent to alpine linux"

I have successfully added the incus-agent package to alpine from the edge-community repo, however, it fails to start. It seems that the 9p mount assumes a systemd system, and doesn’t like openrc.

I would be happy to create a step-by-step doc on how to enable the agent after installing, is there a reverse engineer of the install file? My incus-agent seems to complain about a missing server.crt file.

I did manage to start it manually, if I run it in the 9pfs directory, but NO idea where to put the proper config files so that it runs unattended/reboot safe.

We have the agent pre-installed in our Alpine VM images.

The install.sh provided by Incus is limited to systemd, but we have logic for others in distrobuilder as that’s what we use to generate our preinstalled images, including Alpine’s.

Hello,

I’m late to the party, but I was trying to do the same thing today. The incus-agent installed from the alpine edge package crashes because it needs to have the certificate files in its working directory. I managed to make it work by mounting the 9p drive, copying all its contents (that include the certificates) to /run/incus-agent and modify the /etc/init.d/incus-agent file to include:

start_stop_daemon_args="-d /run/incus"

In order to have the daemon start in the directory.

That’s what distrobuilder installs. That’s unfortunate that the Alpine package doesn’t follow the same method.