I haven’t started yet, I’m basically going to design and start this soon. I have to finish the initial MVP before May since I have a project we’re launching soon that currently depends on images:
, you can imagine the predicament I’m in on one hand there is the LXD / incus fork, then incus drops fan networking, and then images:
is announced that it will stop working for LXD.
My initial solution was to switch to incus, but without fan networking some features we require (cross-host networking for containers) become cumbersome to manage and setup. OVN is just overkill for what we need. So given that incus won’t work, we have to stick with LXD, which brings us to the fact that images:
will be shutdown by May 2024 for lxd. Which leads me to take this matter into my own hands.
You can see the website for the project here https://opsmaru.com basically it’s a self-hosted PaaS built on top of LXD hosted in any cloud (launching with AWS / Digitalocean) It’s all running on the customer’s cloud account. It uses LXD as the container engine and enable users to deploy their rails / php / elixir / go / python / whatever apps on top in a few clicks.
We’ve been developing the project for the past year, what you will see on the website is the old version, the new version automates away all the complexity of setting up a lxd cluster.
We use alpine linux as the main OS in the container. So basically the MVP image server we setup will host alpine X86_64 and arm64 versions default variant for lxd only.
Essentially though the main designs behind it is.
- Uses distrobuilder to build the images requested
- Database to store different versions / metadata
- Repository on github responsible for building the image using github action
- Github action pushes built artifacts to this web app via API
- Webapp receives and process the artifact (generates all necessary hashes etc…)
- Webapp pushes artifacts to S3 compatible bucket of choice
- Webapp serves files requested by lxd
- CDN infront to cache images
- Some kind of user authentication token in the path.
the Webapp will enable users to get a private url so for example.
https://images.example.com/:token
Which is then added to the lxd cluster as the image source. Which will in turn be consumed by LXD as
https://images.example.com/:token/streams/v1/index.json
https://images.example.com/:token/streams/v1/images.json
This way it can track / throttle prevent abusive behaviour.
Initially we will build this to serve our own customers since it’s what is primarily needed. It’ll be open-sourced so if anyone wishes to run their own instance they can.
Created a github repo here https://github.com/upmaru/polar
Development will probably start sometime in late Jan 2024 as we’re going to launch our service first. Since there is a lot of work that have been scheduled to go out as public beta. That then leaves us just about 2-3 months to develop / qa / deploy the image server.