lxc/linuxcontainers.org

How to setup an LXC/D image server

Closed this issue · 5 comments

I want to setup an image server, right now mostly to cache downloaded images, later also for staging my own images.

I'm almost certain that I'm just too stupid to find the documentation, but I cannot find any mention about the format of such a repo or any project that has such a server. I did find that there are at least two types of image servers, one is "the old" LXC way, the other seems to be simplestreams, but no mention how I would go about setting up a caching proxy or a local repository.

Would you be so nice to point me to some information about how to setup such a cache/repo for local/on premise use?

That aside, since I don't know how to reach you guys: You are doing an awesome job. Not only is LXD a wonderful product, but also the way how you are supporting the community over the years is gold standard. Especially Stefan with his genial YouTube videos and his omnipresence in all things LXD is unique. I'm certain that this is unfair to other team members doing just as great a job, after all one person cannot possibly do that alone, but he seems to be the frontend, so that's whom we users see - well at least me. Anyway, a huge thank you and lots of appreciation for what you are doing here!

Hi @mutech ,

There is some documentation on the image server types here:

https://linuxcontainers.org/lxd/docs/master/reference/remote_image_servers/#remote-image-servers

You can basically either use simplestreams format or use a LXD server exposed onto the network.

For support questions its better to post over at https://discuss.linuxcontainers.org/

Thanks

Hey @tomponline! Thanks for the quick reply! I'll go to discuss next time, but since this issue is already there:

I saw that page before, but it only describes where to find image servers, not how to set up one. I'm a bit reluctant to expose an LXD server for that purpose, because I would (according to my understanding at least) also expose all the other functionality that LXD provides which actually amounts to root permissions on the host. It's also (again in my understanding) not implementing the use case of a caching proxy, in that I could access images present on the LXD server but I would not be able access images from a repository that would then be cached by the remote LXD (unless I direct the whole process manually).

You can [...] use simplestreams

That's actually my question. How would I go about doing that? I did not find any documentation about how to setup a simplestreams repo or what that actually is (I'm new to that ecosystem, when I need a repo, things like apt-cacher-ng or nexus is what pops up in my brain).

I mean in the end, a repo is probably not much more than a web site with a certain structure maybe presenting some index files. Simplestreams is probably some web socket convention. I could probably reverse engineer that, but I hoped there is an easier way to get there than to wireshark my way around it ;-)

mutech commented

Thanks Stephane! I meanwhile also found your YouTube video about it. Amazing what you're doing over there btw.