feat: Modernize WebVirtCloud, add Python 3.12+ & openSUSE/SLES 15 support, and enhance test coverage - #688
Merged
Conversation
…ler 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
…ulti-distro setup - Replace shortened URL links (bit.ly, clck.ru) with direct upstream/repository paths - Modernize and reorganize manual production installation guides for Ubuntu/Debian, RHEL/Rocky, and openSUSE/SLES - Fix Nginx proxy header ($remote_addr -> $scheme) and streamline Supervisor configs - Unify Compute Node (Hypervisor) setup into a dedicated section - Update test running documentation reflecting isolated mocks and WEBVIRTCLOUD_TEST_LIBVIRT_URI - Document drf-spectacular OpenAPI 3.0 schema endpoints and fix typos - Convert screenshot gallery to clean Markdown table formatting
…taticfiles.json - Remove legacy .travis.yml since continuous integration runs on GitHub Actions - Remove 34 obsolete drf-yasg file mappings from static/staticfiles.json - Recompute staticfiles manifest hash to match current static asset inventory
… 3.12 - Configure matrix testing across Python 3.10, 3.11, and 3.12 on ubuntu-latest - Install system libvirt, ldap, and C build dependencies with pip cache - Run Django database migrations and test suite - Run vrtManager unit test discovery with test_*.py pattern - Fix vrtManager unittest discovery command in README.md
…e docker-compose setup - Add python3-libvirt to apt and configure --system-site-packages for zero-compilation build - Introduce 10_webvirtcloud_init.sh to handle container startup, migrations, and SQLite persistence - Exclude host settings.py in .dockerignore for clean builds from settings.py.template - Add docker-compose.yml with persistent data and SSH volume mounts - Document Docker Compose deployment in README.md
…ymlinks, 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
…hes in websocket url
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR provides a comprehensive modernization of WebVirtCloud:
docker-compose.ymldrf-yasgtodrf-spectacular(OpenAPI 3.0)Key Changes
1. Multi-Distribution Support (openSUSE / SLES 15, Ubuntu 24.04, Debian 12, RHEL/Rocky)
conf/nginx/suse_nginx.conf), and Supervisor service handling inwebvirtcloud.sh.python311) without modifying or overwriting host system symlinks.dev/libvirt-bootstrap.sh).libvirt-python>=9.0.0,lxml>=4.9.0) so distro-provided binary packages work out of the box without recompilation errors.opensuse/leap:15.6container.2. Modern Containerization & Docker Compose
Dockerfilewith--system-site-packagesand prebuilt distro bindings for faster, zero-compilation image builds./etc/my_init.d/10_webvirtcloud_init.shcontainer initialization script for runtime migrations, dynamicSECRET_KEYgeneration, and volume persistence..dockerignoreand build cleanup).docker-compose.ymlwith persistent SQLite and SSH volumes.3. Python 3.12+ & Core Modernization
vrtManager/rwlock.py(threading._RLock→threading.RLock) for Python 3.12+ and replaced vendoredIPywith stdlibipaddress.optparsewithargparseand fixed invalid regex escape sequences.drf-yasgtodrf-spectacularfor OpenAPI 3.0 support (/swagger/,/redoc/,/api/schema/).drf-yasgreferences fromstatic/staticfiles.jsonand recalculated manifest hash.4. Security & Reverse Proxy Fixes
DEBUG=Falseby properly populatingCSRF_TRUSTED_ORIGINSand adding reverse proxy forwarding headers (SECURE_PROXY_SSL_HEADER,USE_X_FORWARDED_HOST,USE_X_FORWARDED_PORT).$remote_addr→$scheme).install.sh) with privilege escalation checks, fallback downloads, and ShellCheck compliance.bit.ly,clck.ru) in favor of direct repository URLs.5. CI/CD & Testing
Test Suiteworkflow (.github/workflows/test.yml) running matrix tests on Python 3.10, 3.11, and 3.12.WEBVIRTCLOUD_TEST_LIBVIRT_URI) and standalone mocks.vrtManagerunit tests pass cleanly in automated CI..travis.yml.Verification
webvirtcloud.shrun (exit 0),manage.py testpassed (96 passed, 15 skipped), vrtManager tests passed.