Retrieve Incus images from S3 object storage

Hello !

I was wondering if it’s possible to retrieve remote Incus images from an S3 object storage instead of web server ? I would like to build my images inside a Github Actions, then upload the artifacts directly on a private S3 storage bucket and finally retrieve them on my server through a given URL.

The problem I see is that Incus requires that some headers are set by the server but I don’t see how I can configure it on any of my storage providers (MinIO and/or Scaleway).

Thanks !

There are no header requirements if providing the images through a simplestreams index.
So you should be able to use an S3 bucket for that, you just need:

  • <URL>/streams/v1/index.json
  • <URL>/streams/v1/images.json
  • <URL>/files/somewhere/in/there

And have all of that be available over HTTPS. Incus will fetch index.json which will point to your images.json which then has the records for the various files for the images you’re distributing.

You can look at https://images.linuxcontainers.org/streams/v1/index.json and https://images.linuxcontainers.org/streams/v1/images.json if you want to see how it’s done on our servers (static web servers in our case, but that doesn’t really matter).

1 Like

Hello @stgraber

That’s good to know, I didn’t look much into simplestreams and how this works, but it looks not that difficult :slight_smile:

Thank you !