#1067041 Please also include "Incus UI"

#1067041#5
Date:
2024-03-17 13:56:42 UTC
From:
To:
I am using zabby's deb for incus on bookworm following:

https://github.com/zabbly/incus

Unlike current Debian package, this deb installs files into /opt so this
is not compliant to the current Debian packaging policy.  This is quite
understandable since he is making these binary deb as the upstream
developer.

zabby's deb comes with nice feature of Incus UI.  With it, we can use
browser to manage incus.  All I have to get to the cute web UI is:

 $ incus config set core.https_address ":8443"
 $ firefox-esr https://localhost:8443

zabby's comment on web UI is at:
https://discuss.linuxcontainers.org/t/web-ui-for-incus/18198

He basically uses generated static LXD-UI pages and rebranded with brute
force patching and seems to build deb binary package.  The github site
doesn't seem to be real Debian source tree.  The above git source only
exposes patches he used etc.

LXD-UI itself is available from Canonical with GPL3
https://github.com/canonical/lxd-ui
It is a typescript source.

Providing the same page in /var/lib/incus/ui (instead of current
/opt/incus/ui) compliant to Debian policy should help user with updated
path configuration while compiling incus.  I am talking about
followings:

/opt/incus/ui
├── assets
│   ├── AutoExpandingTextArea-b0984bfa.js
│   ├── BaseLayout-da695259.js
│   ├── CancelOperationBtn-dfd3023a.js
│   ├── CertificateAdd-d4a7d2ae.js
│   ├── certificate-eda28c43.js
│   ├── CertificateGenerate-8ae719bf.js
│   ├── ClusterGroupForm-25c7ab41.js
│   ├── clusterGroups-6c3ae0ac.js
│   ├── ClusterList-0300f9c4.js
│   ├── ConfigFieldDescription-04cc287b.js
│   ├── CreateClusterGroup-c6ee6b8a.js
│   ├── CreateInstance-a4f78951.js
│   ├── CreateInstanceFromImageBtn-7f531769.js
│   ├── CreateNetwork-4e810edc.js
│   ├── CreateNetworkForward-22e93cd5.js
│   ├── CreateProfile-2069b1e2.js
│   ├── CreateProject-cecc9d43.js
│   ├── CreateStoragePool-55b5f272.js
│   ├── DiskSizeSelector-5b72fc84.js
│   ├── EditClusterGroup-b708f190.js
│   ├── EditNetworkForward-25840707.js
│   ├── formFields-f410667c.js
│   ├── FormFooterLayout-e758fca7.js
│   ├── FormMenuItem-5a280379.js
│   ├── HelpLink-57385562.js
│   ├── ImageList-a33f30ee.js
│   ├── images-20841d65.js
│   ├── images-8e8d15cf.js
│   ├── img
│   │   ├── favicon-32x32.png
│   │   └── incus-logo.svg
│   ├── index-100d4e14.js
│   ├── index-a1e42770.css
│   ├── index.esm-20fecc07.js
│   ├── instanceDelete-92f38617.js
│   ├── InstanceDetail-1dce84a0.js
│   ├── InstanceDetail-ff373be6.css
│   ├── instanceEdit-3e40081d.js
│   ├── InstanceFormMenu-21a11985.js
│   ├── InstanceList-49b398fa.js
│   ├── instanceValidation-3b4af1be.js
│   ├── instanceValidation-d51d9b53.css
│   ├── loadIsoVolumes-a8ddc0c0.js
│   ├── Login-25eed496.js
│   ├── Meter-cf3a0fcf.js
│   ├── NetworkDetail-a584b0b6.js
│   ├── NetworkDevicesForm-70bef83c.js
│   ├── NetworkForm-4b1a1351.js
│   ├── NetworkForwardForm-a6450899.js
│   ├── network-forwards-23e433d0.js
│   ├── NetworkList-d460bfff.js
│   ├── NetworkMap-8937e175.js
│   ├── networks-d1e4a90f.js
│   ├── NotificationRow-a23c7bb5.js
│   ├── OperationList-ccc34f7d.js
│   ├── operations-3c8573d9.js
│   ├── PageHeader-efb2fb2e.js
│   ├── ProfileDetail-aa5b79ee.js
│   ├── ProfileDetailsForm-cfb6fa83.js
│   ├── ProfileFormMenu-ffc77ee4.js
│   ├── ProfileList-62f69cf9.js
│   ├── ProfileSelector-90b3c743.js
│   ├── ProjectConfiguration-069a34e2.js
│   ├── ProjectForm-54c842f9.js
│   ├── ProtectedRoute-e9d1eae7.js
│   ├── RenameHeader-45fc28ec.js
│   ├── ScrollableTable-d58fc75b.js
│   ├── searchAndFilter-67115edd.js
│   ├── SelectableMainTable-a37bf25d.js
│   ├── SelectedTableNotification-9bffcb9e.js
│   ├── Settings-a73d738f.js
│   ├── settings-c23f9009.js
│   ├── SnapshotForm-be2640fe.js
│   ├── snapshots-78c0e63e.js
│   ├── Storage-dc687613.js
│   ├── StoragePoolDetail-c056ed2d.js
│   ├── StoragePoolSize-b4aaa57a.js
│   ├── StorageUsedBy-d3753f8f.js
│   ├── StorageVolumeCreate-1103f5ec.js
│   ├── storageVolume-dc1599e5.js
│   ├── StorageVolumeDetail-9514de93.js
│   ├── StorageVolumeForm-4ac2614e.js
│   ├── StorageVolumesFilter-1d98b8f2.js
│   ├── SubmitButton-c7658723.js
│   ├── TabLinks-be66fd30.js
│   ├── useClusterMembers-ab2fc364.js
│   ├── useDeleteIcon-9df3ee17.js
│   ├── useSortTableData-cb0187d4.js
│   ├── VolumeAddSnapshotBtn-11eaa84e.js
│   └── WarningList-8aeb56fe.js
└── index.html

3 directories, 90 files

For proper Debian packaging, using LXD-UI source as upstream and use
zabby's patch as post-build patch script may be easier.

#1067041#10
Date:
2024-03-17 22:40:15 UTC
From:
To:
Hi Osamu,

  Prior to the LXD/Incus hard fork, I did have an ITP to look at
packaging lxd-ui (#1036926). I think the "proper" way to package Incus
UI would be to have it as a new package (incus-ui), which incus
packaging could then Recommend or Suggest.

  I would also be more comfortable with Incus UI it was a proper fork
of Canonical's repository that carried the seven patches from
zabbly/incus. As a packager, we shouldn't be taking one upstream and
totally transforming it into something else via patches since that's
just too much work to carry in our packaging. :)

  My suggestion would be to rework this bug into a RFP and/or merge
with the prior ITP. I don't have any plans to work on this, but someone
else might.

Mathias

#1067041#15
Date:
2024-03-18 05:49:16 UTC
From:
To:
Hi,

When I initially start writing this wishlist bug report, I was expecting
existence of one upstream source tree. The more I checked situation around
incus-ui, I concur with your thought and see more challenges for packaging.

Although I have no idea for typescript nor node, I realize that, though the
building lxd-ui was trivial task on my local Debian machine, it is a non-trivial
task for Debian packaging unless I dare to package many node packages.

I found 2 references for existing packaging efforts (ARCH and SPEC for some RPM)
 * https://gist.github.com/vaxvhbe/ce679df15fc521c8aca1ff9ddf537201 SPEC
 * https://github.com/KosmX/incus-ui-canonical-arch/blob/master/PKGBUILD ARCH

So I tried on my local machine to build unmodified source as a starter:

 $ sudo apt install yarnpkg npm
 $ git clone https://github.com/canonical/lxd-ui.git
 $ cd lxd-ui
 $ yarn install
 $ yarn build

Then I easily had a static web page with javascript to serve at
  build/ui/

I realize zabby's patches to make Incus UI were applied to the upstream LXD-UI
source, so it wasn't as brute force changes as I was afraid of.  But, as I
checked in the build tree under node-modules/, there are too many packages
(~600) involved.  This means there is a heavy burden of creating an official deb
package since all these packages need to be packaged in advance for Debian to
satisfy the Debian build requirement.  Then, on the top of it, there is an issue
of maintaining patches as you mentioned.

If I will file a RFP, I should do it as a fresh one to get the best exposure
(instead of retitle ITP or this bug report.)

Let me record few references I found.

Debian
* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1067041 this wishlist bug
* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1036926 closed ITP lxd-ui

Upstream message around web-ui
* https://stgraber.org/2023/11/25/adding-a-web-ui-to-the-incus-demo-service/
* https://discuss.linuxcontainers.org/t/web-ui-for-incus/18198/2
* https://discuss.linuxcontainers.org/t/incus-web-ui-spacing/18928
* https://discuss.linuxcontainers.org/t/lxconsole-as-web-ui/19212
*
https://discuss.linuxcontainers.org/t/stateful-uis-and-questions-about-lxd-ui-history/18302

Incus upstream doesn't wish to spend his time on this web page generation and
maintenance and provided proof-of-concept example by rebranding lxd-ui

Incus UI is a single-page application written in TypeScript and React and only
replicates what you can do with the incus CLI program (i.e. works through the
REST API).

Other UI -- all needs external dependencies
* https://github.com/PenningLabs/lxconsole (PYTHON)
* https://github.com/AdaptiveScale/lxdui (PYTHON)
* https://github.com/turtle0x1/LxdMosaic (JS with SQL)
* https://github.com/lxdware/lxd-dashboard (PHP)

Quoting Incus upstream:
Those more complex web interfaces will typically come with their own set of
instructions on how to properly deploy them, what OS they support to run their
daemon and database, how to setup the database for high-availability when in a
cluster environment, how to perform backups of that data, …
--- none of these seem to be good replacements of Incus UI(rebranded lxd-ui). Regards, Osamu
#1067041#20
Date:
2024-03-19 06:47:30 UTC
From:
To:
Hi,

I actually made a hackish binary package for "Incus UI".

https://github.com/osamuaoki/incus-ui-canonical

At least, this is more compatible with official Debian package.  (I know this is
not ready for Debian upload at all.)

I realize that the current Debian package doesn't seem to set INCUS_UI.

Do you plan to set it to `/var/lib/incus/ui`?  I think that is better place to
put web page for distribution if it ever happens.

Or should I need to set it through `/etc/environment`?

I think someone with interest and good skill on typescript and node needs to
work on this to make real debian package.

Osamu

#1067041#25
Date:
2024-03-21 01:29:16 UTC
From:
To:
Control: block 1067041 by 1067132

  For right now, I don't think I want to set a default INCUS_UI
environment variable, as there isn't any corresponding packaging in
Debian that would populate such a path. Better to let individuals set
it themselves if they wish to manually make a web-based UI available.
But I'd be happy to add that default along with a Recommends or
Suggests when Incus UI is packaged and ready for upload into the
archive.

  I'm blocking this bug by the RFP; thanks for filing it. Down the road
if/when someone does the packaging work, please let me know of any
progress that's made.

Mathias