The LXD documentation refers to several implementations of LXD API clients on different languages, however, there is none specified for PHP.
I have found this on Github:
Which seems to be quite up to date…
I was wondering if anyone had any experience with it.
Or if there’s a good reason for it not to be listed, then which one of the listed implementations/languages do you recommend.
Yeah i maintain that library now, i forked it from the original maintener as there wernt merging pull requests!
LXDMosaic uses it for communicating with LXD nodes and have had no complaints, occasionally i discover bugs and fix them (E.G couldnt create container from snapshot before)
I havent submited them to be “official” and i think the only special things about “official” bindings is that they were written by @stgraber
I would really need to understand what you are trying to achieve properly, budget, throughput etc but I have some ideas, at work currently ill take a look when I get home later (around 9 / 10 BST)
LXDMosaic is not a required component for php-lxd i was only mentioning it so you could take a look at some of the problems I had to solve as part of the deployments functionality
I see… would you be interested in adding to LXDMosaic features like:
Auto-healing
More complex than round-robin methods for deploying new containers( like based on load or other constraints)
Rollbacks and automated deployments.
You know, all these features that made K8S popular and are probably never gonna make it to LXD because it goes against its minimalistic design. approach…
Most of these things wont be available for LXD until it exposes CPU load information, I have thought at great length about some of these things (E.G deployments is my attempt to start this)
Without CPU load information you can only base it on memory and id ague that most apps need to scale based on CPU load and not memory
But there is a good reason that CPU load isn’t included and thats because it makes things slower
You could use them on the host, after all, you want to know the whole load on the host in order to decide which host to create a new container on, right?