1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 11:16:47 +00:00
Commit graph

48 commits

Author SHA1 Message Date
catborise
1cd1d63f0c fix(installer): the panel starts on SELinux hosts, and a relabel keeps it so
On an AlmaLinux 10 host with SELinux enforcing, the installer finished
with exit 0 but the panel's four services never started: chcon labelled
the virtualenv httpd_sys_rw_content_t, which systemd may not execute
(status 203/EXEC, Permission denied), and the login page answered 502.
The README's manual steps did the same with httpd_sys_content_t. chcon
labels also went on a relabel, after which nginx got 403 for the
static files.

Now the installer writes file context rules, httpd_sys_content_t for
the panel and bin_t for venv/bin, restores the labels from them, and
does so whenever SELinux is enabled, not only when it enforces. The
manual steps add the bin_t rule and policycoreutils-python-utils (for
semanage).
2026-11-03 17:08:44 +03:00
catborise
d00e24f46d feat(installer): openEuler 24.03 LTS is installed
The removed openEuler branch only took 20.03, whose Python 3.7 cannot
run the panel. 24.03 LTS has Python 3.11: it installs like the RHEL
family, with the packages under their openEuler names (iproute holds
tc, cyrus-sasl the MD5 mechanism) and the RHEL family's main nginx
config. Other openEuler versions are refused with the supported one.
2026-11-03 14:53:05 +03:00
catborise
d70552a734 fix(installer): a failed step stops the installer, and openSUSE gets a working panel
Tested on Ubuntu 22.04, 24.04 and 26.04, Debian 12 and 13, AlmaLinux 10
and openSUSE Leap 15.6. On Leap the panel did not start: the secret key
was written with python3 before the installer looked for Python 3.10+,
and Leap has only python3.11, so the key was empty. The installer still
said "Finished!" and exited 0, as it did for any failed step.

Now Python is found first. The package list update, each package, the
clone, the key, pip, migrate and collectstatic stop the installer with
a message when they fail (pipefail makes a logged step's status count).

Also:
- Ubuntu 26.04 is installed; Ubuntu 18/20 and Debian 9-11 are refused
  up front (their Python is older than 3.10, so they failed later).
- The uos and openEuler branches are gone: untested, and their Python
  is too old as well.
- Only `apt-get update`, no upgrade of the whole system.
- Debian no longer asks for smbios-utils (gone in Debian 13) and uuid,
  which nothing uses; Debian and Ubuntu take python3-libvirt.
- RHEL reads the time zone like the others, and installs hostname for
  ALLOWED_HOSTS.
- The unused wvcuser account is no longer created.
- The end of the run says where the admin password is.
2026-11-03 13:29:03 +03:00
catborise
777057cb19 feat(appsettings): the panel backs itself up every day
The only backups of the panel were the ones taken by hand before an
update. Now `manage.py backup` writes a new directory under backups/
with a consistent copy of the sqlite database (the backup API, while
the panel runs, checked with PRAGMA integrity_check), the secret key,
the worker's node_id, settings.py, the SSH keys of the panel's user
and, outside Docker, the commit. It keeps the newest 7 (--keep N) and
deletes older ones only after a good backup; a failed one leaves
nothing, and a second run while one runs fails. Files are mode 600,
directories 700: the database holds compute passwords and keys. With
PostgreSQL the database is left out.

It runs daily at 03:15: in Docker from the image's cron into a new
volume, webvirtcloud-backups; otherwise from webvirt-backup.timer,
which the installer and the manual steps install. A backup has the
layout of the update backups, so the restore steps take either.
2026-11-03 09:40:47 +03:00
catborise
68b104dfe4 feat(console): the VNC console uses the panel's own address
The console pages connect to /novncd/ on the address, scheme and port the
page itself was loaded from; nginx proxies it to novncd, which listens on
the loopback only. There is nothing to configure: the console works on
HTTPS (wss), behind another proxy and on any published port.

Before, the page connected to WS_PUBLIC_HOST/PORT/PATH, port 6080 by
default: straight to novncd, past nginx and without TLS, so an HTTPS panel
and a Docker container published on another port had no console until the
public port was set by hand, and novncd listened on every interface.

Gone: WS_PUBLIC_PORT, WS_PUBLIC_HOST, WS_PUBLIC_PATH and WS_CERT, the
installer's two public console questions and its 6080 firewall rule, the
Docker image's WS_PUBLIC_PORT and its init script lines, the manual
install's firewall rule for 6080 and nginx's unused /websockify location.
WS_HOST defaults to 127.0.0.1. A VM with a QEMU websocket port is still
reached on that port of the panel's host name (left for a separate
decision).
2026-10-26 20:14:04 +03:00
catborise
5c68050ce0 build: LDAP login's packages are optional
django-auth-ldap, python-ldap and pyasn1 move to
conf/requirements-ldap.txt. Installs without LDAP no longer need the
openldap and sasl headers that pip builds python-ldap with; the
installer and the README's system packages drop them, and the README's
LDAP section installs them with that file. The settings already work
without the module.

The Docker image and dev/requirements.txt keep LDAP, so CI still builds
and audits python-ldap.
2026-10-18 22:50:11 +03:00
catborise
837c5468ec build: systemd runs the panel on hosts instead of supervisor
The installer and the manual installation install four systemd units
(webvirt-cloud, webvirt-novncd, webvirt-socketiod, webvirt-worker) that
run as the web server's user with absolute paths and read
/etc/default/webvirtcloud. gunicorn, socketiod and the worker stop with
KillMode=mixed, so they wind down their own children. supervisor, its
installer code and the contributed systemd files go; the README gets
the update, rollback and a one-time move from supervisor, and the
installer refuses to run over a supervisor install. Docker keeps runit;
novncd's runit script is the one-line form of the others.
2026-10-17 23:18:26 +03:00
catborise
3be3b4b2cc fix(install): openSUSE installs get python-ldap and pyasn1 without known flaws
The installer's venv sees the system site packages, and pip keeps a
system package that meets a requirement. On openSUSE Leap 15.6 the LDAP
login thus ran on the distro's python-ldap 3.4.4 (CVE-2025-61911, a
filter-escaping bypass, and CVE-2025-61912) and pyasn1 0.5.0
(CVE-2026-30922 and others), which django-auth-ldap loads through
ldap.controls. python-ldap>=3.4.5 and pyasn1>=0.6.4 make pip install
fixed copies in the venv. python-ldap builds there, so openldap2-devel
joins the openSUSE package lists (installer, manual and development
setup) and the update steps. Checked in a fresh Leap 15.6 container
with the installer's package list: 3.4.8 and 0.6.4 from the venv,
ldap.controls imports.
2026-10-11 22:45:52 +03:00
catborise
9f5e8fe1c4 fix(settings): ALLOWED_HOSTS lists the server's names instead of accepting any host 2026-10-07 16:31:51 +03:00
catborise
bbb9f77cb1 fix(installer): a re-run keeps settings, key and nginx config, and restricts modes 2026-10-07 15:01:59 +03:00
catborise
7b53493800 fix: stop printing secrets during installation
- The generated admin password is written to data/admin_password (mode
  0600) instead of being printed, so it no longer ends up in the install
  log or `docker logs`. If the file cannot be written it is printed as
  before, so the admin is never locked out.
- webvirtcloud.sh no longer echoes the generated SECRET_KEY.
- install.sh creates the install log with mode 0600.
2026-10-02 22:47:56 +03:00
catborise
7435d66492 fix(security): resolve reviewer findings on secret key baking, host symlinks, and injection safety
- Prevent baking SECRET_KEY into Docker image during collectstatic
- Persist runtime SECRET_KEY in data/secret_key volume or read from environment
- Remove sed-based injection of CSRF_TRUSTED_ORIGINS in favor of native os.getenv
- Avoid overwriting system python3 symlink on SUSE; auto-detect python 3.10+ binaries
- Make /etc/hosts entry in installer idempotent
- Add security notice regarding compute node VNC/SPICE port firewall isolation
2026-09-25 22:06:16 +03:00
catborise
f5e5ff2759 fix(install): refine openSUSE Leap dependencies and streamline installer execution
- Add Python 3.11 package detection and alternatives configuration for openSUSE/SLES
- Relax libvirt-python and lxml minimum versions in requirements to match distro-provided packages
- Gracefully handle missing hostname command in minimal/containerized SUSE environments
- Prevent redundant git clone if workspace already exists in target path
2026-09-25 20:44:52 +03:00
catborise
88288f965d feat(install): add openSUSE and SLES 15 distribution support and compute bootstrap 2026-09-25 20:03:02 +03:00
catborise
8306f0d761 fix(ci): fix linter workflow dependencies, python version, and shellcheck issues 2026-09-25 16:09:01 +03:00
catborise
070e3baf75 refactor(install): harden bootstrap script and restore retspen upstream URLs 2026-09-25 15:53:32 +03:00
catborise
79c6bd4c62 fix(install): modernize Ubuntu and Debian installer script for 24.04 and Debian 12 compatibility 2026-09-25 13:49:27 +03:00
catborise
7a9b3c9e13 feat(dev): improve Rocky Linux and RHEL compatibility for local development
- Relax libvirt-python and lxml version pins to allow precompiled distro packages
- Add PEP 508 environment marker to crypt-r (python_version >= 3.13) to avoid unnecessary C compilation on Python 3.12
- Add stdlib crypt fallback when crypt_r is not available in instances/views.py
- Make LDAP imports and configuration optional in settings.py.template
- Add --system-site-packages and missing packages in webvirtcloud.sh for RHEL/CentOS
- Update README with working Rocky Linux / RHEL / Fedora installation and local dev setup
2026-09-25 09:45:54 +03:00
catborise
7047130f3e
Merge pull request #680 from cpasqualini/fix-missing-pip3-in-debian
Fix WVC Install Script: missing pip3 on Debian
2026-09-24 19:17:27 +03:00
catborise
e8974248ee
Merge pull request #685 from resse/fix/ubuntu-ldap-dev-headers
Add missing libldap2-dev/libsasl2-dev to Ubuntu package list
2026-09-24 19:16:33 +03:00
Mikhail Bobkov
b0f978e1db Add missing libldap2-dev/libsasl2-dev to Ubuntu package list
conf/requirements.txt requires django-auth-ldap/python-ldap (added in
#600), which needs libldap2-dev and libsasl2-dev headers to build its
C extension. The Debian branch's PACKAGES list already has both, but
the Ubuntu branch was never updated to match, so a fresh install on
Ubuntu fails to build python-ldap's wheel, which aborts the entire
`pip install -r requirements.txt` — Django itself never gets
installed, and the app fails to start. Verified fix on a real Ubuntu
24.04 host.
2026-09-24 18:27:53 +04:00
Mikhail Bobkov
1f62f150a0 Add Ubuntu 24.04 support to installer version check
webvirtcloud.sh's Ubuntu branch only matched 18.04/20.04/22.04, so
running it on 24.04 (Noble) silently no-ops the entire install block
instead of installing anything. Verified end-to-end on a real 24.04
host: with this check extended, the rest of the Ubuntu install path
(package list, venv setup, nginx/supervisor config) works unmodified.
2026-09-24 18:27:27 +04:00
Carlos Pasqualini
3b2585c1e0 Fix WVC Install Script: missing pip3 on Debian 2026-04-30 12:51:22 -03:00
catborise
9324b9c36d update installation scripts 2025-07-01 15:07:02 +03:00
nono
9e4dc3256e pip install supervisor 2024-08-02 09:41:06 +08:00
catborise
d8fe9c2f64 add user to libvirt group also 2024-02-28 08:15:02 +03:00
catborise
f86eb78cbf add smbios package to debian install 2024-02-13 14:33:20 +03:00
MisterBlueBear
2f24f77368 Install script accepts default hostname 2023-11-01 20:35:15 -04:00
Mark
5c6bcbe610
Fixes issue #614: Quick Install overrides nginx upstream wssocketiod port 2023-10-26 22:18:17 +02:00
catborise
9755f307a6 add libsasl2-dev and libldap2-dev packages for Debian 12 2023-10-06 16:28:30 +03:00
catborise
cedb7beedd set CSRF TRUSTED ORIGIN modification on settings.py 2023-09-06 09:28:50 +03:00
catborise
46514d0897 add collect static command for rest/swagger ui 2022-08-24 10:29:29 +03:00
catborise
0680f02240 remove css urls, add missing socketio requirements, fix cookie import, and rearrange socketiod connetion 2022-07-21 13:31:37 +03:00
Gaëtan Ferez
65dce10ce1 Implement Libvirt Serial Console as Console on WebVirtCloud 2022-07-17 13:25:47 +02:00
catborise
12f0c70069
Merge pull request #503 from catborise/master
add alma linux for know distributions
2022-05-18 14:08:26 +03:00
catborise
995b333038 add alma linux for know distributions 2022-05-18 14:01:35 +03:00
herengui
9ddba262a4 Enhanced system support
UOS is not a specific os, but a series of different OS, they use either dnf or apt package manager

Signed-off-by: herengui <herengui@uniontech.com>
2022-05-18 17:23:29 +08:00
catborise
448c66110b
Merge pull request #497 from catborise/master
update requirements
2022-04-25 08:14:28 +03:00
Lv Genggeng
73201ebc8f add support openEuler
Signed-off-by: Lv Genggeng <lvgenggeng@uniontech.com>
2022-03-14 10:19:24 +08:00
catborise
2154f55e8b fix yes/no question confilict 2022-03-09 13:53:50 +03:00
herengui
5b685a100e add support uos
Signed-off-by: herengui <herengui@uniontech.com>
2022-03-03 10:59:20 +08:00
王卿
7858825258
webvirtcloud.sh support rockylinux 2022-02-23 16:51:05 +08:00
Adrien Delle Cave
9065922eb8 [TYPO] Removed useless = in nginx server_name variable 2021-04-04 01:31:15 +02:00
Adrien Delle Cave
b2068592f5 [BUG] Fixed sed variables and nginx fqdn config 2021-03-12 12:38:52 +01:00
catborise
59af676f68 fix centos 8 bootstrap script to handle new libvirt start mechanism 2021-01-25 16:53:09 +03:00
catborise
1f642a4381 fix linter problems-2: bash 2020-10-17 23:30:00 +03:00
catborise
922a8e62d1 fix some linter warnings 2020-09-25 15:57:17 +03:00
catborise
7dd9127572 Automatic install option for Webvirtcloud is added (beta) 2020-08-21 18:38:10 +03:00