Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incus Support #91

Open
fthorns opened this issue Jan 6, 2025 · 1 comment
Open

Incus Support #91

fthorns opened this issue Jan 6, 2025 · 1 comment

Comments

@fthorns
Copy link
Contributor

fthorns commented Jan 6, 2025

With the recent changes around LXD and the fork of Incus, using lxd-dashboard with Incus would be awesome.

Unfortunately, Incus is slightly incompatible with LXD. However, regarding the container aspects of lxd-dashboard, the only crucial change seems to be the merge of the API endpoints /1.0/containers and /1.0/virtual-machines into /1.0/instances (see https://linuxcontainers.org/incus/news/2023_10_07_06_10.html).

These APIs are similar enough that a quick and dirty

sed -e 's%/1.0/containers%/1.0/instances%' -i /opt/lxd-dashboard-3.8.0/lxd-dashboard/backend/lxd/*.php

allows lxd-dashboard to work just fine with Incus containers. An stable implementation would of course require to check whether the backend is LXD or Incus and also cover VM aspects, which I haven't checked. However, I wanted to report that Incus support may not be overly complicated and help out anyone who needs a quick way to use lxd-dashboard for Incus containers.

@fthorns fthorns changed the title Incus compatibility Incus Support Jan 6, 2025
@matthewalanpenning
Copy link
Contributor

@fthorns
Before the fork on Incus, I was already working on porting this code to a Python-based project, moving away from PHP and created LXConsole, https://github.com/PenningLabs/lxconsole. When Incus started, I made sure to support both LXD and Incus with the new code base. I moved to Python to utilize libraries and security features and have made quite a few additions/improvements to the python-based project. This is where I have been making all new updates.

You are correct that both API endpoints are still very similar with the exception of instances, vms, and containers. That was the first change I needed to make to support Incus. There are a few additional differences too, like now support for OCI-based containers in addition to LXC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants