Skip to content

Commit

Permalink
Add incus-ui-canonical
Browse files Browse the repository at this point in the history
Closes #7

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
  • Loading branch information
stgraber committed Nov 23, 2023
1 parent 33d12be commit bb30b97
Show file tree
Hide file tree
Showing 9 changed files with 922 additions and 1 deletion.
42 changes: 41 additions & 1 deletion .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ jobs:
CGO_CFLAGS: "-I/opt/incus/include/"
LD_LIBRARY_PATH: "/opt/incus/lib/"
CPATH: "/opt/incus/include/"
PATH: "/opt/incus/bin:/root/.cargo/bin:/usr/local/go/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
PATH: "/opt/incus/bin:/root/.cargo/bin:/usr/local/go/bin:/usr/local/node/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
LXC_TAG: "lxc-5.0.3"
LXCFS_TAG: "lxcfs-5.0.4"
INCUS_TAG: "main"
INCUS_UI_CANONICAL_TAG: "0.4"
RAFT_TAG: "v0.18.2"
COWSQL_TAG: "v1.15.4"
CRIU_TAG: "v3.18"
Expand Down Expand Up @@ -151,6 +152,15 @@ jobs:
curl -sL https://sh.rustup.rs -o install-rust.sh
bash install-rust.sh -y
- name: Install Node
run: |
[ "${OS_ARCH}" = "amd64" ] && NODE_ARCH=x64
[ "${OS_ARCH}" = "arm64" ] && NODE_ARCH=arm64
mkdir /usr/local/node/
curl -sL "https://nodejs.org/dist/v20.10.0/node-v20.10.0-linux-${NODE_ARCH}.tar.xz" | tar -C /usr/local/node/ -Jx --strip-components=1
- name: Build environment
run: |
mkdir /build/
Expand Down Expand Up @@ -182,6 +192,8 @@ jobs:
git clone https://gitlab.com/virtio-fs/virtiofsd /build/virtiofsd --depth 1 -b "${VIRTIOFSD_TAG}"
git clone https://gitlab.com/qemu-project/qemu /build/qemu --depth 1 -b "${QEMU_TAG}"
git clone https://github.com/canonical/lxd-ui /build/incus-ui-canonical -b "${INCUS_UI_CANONICAL_TAG}"
- name: Build liburing
run: |
cd /build/liburing
Expand Down Expand Up @@ -285,6 +297,34 @@ jobs:
cd /build/incus/cmd/lxd-to-incus
go build -o "/opt/incus/bin/lxd-to-incus" -tags=libsqlite3 ./
- name: Build UI (canonical)
run: |
REPO="${PWD}"
cd /build/incus-ui-canonical
# Specific tweaking
git am "${REPO}/patches/ui-canonical-0001-incus-Branding.patch"
git am "${REPO}/patches/ui-canonical-0002-incus-Remove-some-config-options.patch"
git am "${REPO}/patches/ui-canonical-0003-incus-Update-navigation.patch"
git am "${REPO}/patches/ui-canonical-0004-incus-Update-certificate-generation.patch"
git am "${REPO}/patches/ui-canonical-0005-incus-Remove-external-links.patch"
git am "${REPO}/patches/ui-canonical-0007-incus-Remove-Canonical-image-servers.patch"
# Generic renaming
sed -i "s/LXD/Incus/g" src/*/*.ts* src/*/*/*.ts* src/*/*/*/*.ts*
sed -i "s/devlxd/guestapi/g" src/*/*.ts* src/*/*/*.ts* src/*/*/*/*.ts*
sed -i "s/dev\/lxd/dev\/incus/g" src/*/*.ts* src/*/*/*.ts* src/*/*/*/*.ts*
sed -i "s/lxd_/incus_/g" src/*/*.ts* src/*/*/*.ts* src/*/*/*/*.ts*
sed -i "s/\"lxd\"/\"incus\"/g" src/*/*.ts* src/*/*/*.ts* src/*/*/*/*.ts*
npm install yarn --global
yarn install
yarn build
mkdir -p /opt/incus/ui-canonical/
rsync -a /build/incus-ui-canonical/build/ui/ /opt/incus/ui-canonical/
- name: Build CRIU
run: |
cd /build/criu
Expand Down
14 changes: 14 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,17 @@ Description: Incus - Command line client
.
This build of Incus is provided for free by Zabbly.
Zabbly can be contacted for commercial support and development on Incus.

Package: incus-ui-canonical
Architecture: any
Pre-Depends: ${misc:Pre-Depends}
Depends: incus
Description: Incus - Web interface (canonical)
Incus provides the ability to run containers and virtual machines locally
along with very flexible networking and storage akin to what's offered
in a public cloud environment.
.
This package contains a web interface based on canonical/lxd-ui.
.
This build of Incus is provided for free by Zabbly.
Zabbly can be contacted for commercial support and development on Incus.
6 changes: 6 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@ override_dh_shlibdeps:
override_dh_installsystemd:
override_dh_install:
dh_install

# Handle incus-client
rm debian/incus/usr/bin/incus
rm debian/incus/opt/incus/bin/incus

# Handle incus-ui-canonical
mkdir -p debian/incus-ui-canonical/opt/incus/
mv debian/incus/opt/incus/ui-canonical debian/incus-ui-canonical/opt/incus/ui
Loading

0 comments on commit bb30b97

Please sign in to comment.