Конфігурація
Public self-hosted configuration , checked-in cto-gui/docker-compose.self-hosted.yml plus settings read by cto-gui-libvirt-backend. This page documents that evaluation surface. It does not invent generic Enterprise environment contract.
Compose contract
| Setting | Checked-in value | Purpose |
|---|---|---|
SELF_HOSTED | true | Select local-console mode and disable cloud-dependent routes |
KVM_URI | qemu:///system | Connect to the host system libvirt daemon |
TEST_STORAGE_DIR | /app/data/tests | Retain test state, locks, and cleanup journals in cto-data |
SOURCE_ISO_DIR | Host source-ISO path | Resolve read-only source artifacts at the same absolute path visible to host libvirt |
SOURCE_GOLDEN_IMAGE_DIR | Host promoted-image path | Resolve immutable installed QCOW2 inputs at the same absolute path visible to host libvirt |
TRUST_PROXY_HEADERS | true in the Compose file | Permit proxy-derived client information subject to the backend’s trusted-proxy rules |
Backend also defaults ISO uploads to /var/lib/libvirt/images and limits uploads to 10 GB unless backend setting deliberately changed.
Host path overrides
Two shell environment variables affect Compose bind mounts:
export SOURCE_ISO_HOST_DIR=/srv/openfactory/source-isos
export SOURCE_GOLDEN_IMAGE_HOST_DIR=/srv/openfactory/golden-images
docker compose -f docker-compose.self-hosted.yml up --build -dCreate and permission those directories first. Container path kept identical to host path because host libvirt, not container, opens image files for QEMU. Path that exists only inside container will fail at guest launch time.
Persistent and non-persistent data
| Location | Ownership and lifecycle |
|---|---|
/var/lib/libvirt/images | Host-managed uploaded ISOs, guest disks, and overlays |
| Source ISO directory | Operator-managed, mounted read-only |
| Golden-image directory | Operator-promoted immutable inputs, mounted read-only |
cto-data named volume | Backend state including test records and cleanup journals |
| Container filesystem outside mounts | Disposable; do not rely on it for recovery |
Back up or snapshot only after identifying which resources must be retained. Compose file does not schedule backups.
Exposure and proxy settings
Frontend maps host port 80. TRUST_PROXY_HEADERS does not provide TLS or authentication; it only changes how backend accepts forwarded connection metadata from explicitly trusted proxy ranges. If you add reverse proxy, configure network path and trusted proxies narrowly and verify spoofed forwarding headers rejected from untrusted peers.
Do not place evaluation console directly on public internet. Production identity, TLS, secrets, and authorization design , separate deployment decision.
Validate every change
After changing paths or settings:
- recreate affected container;
- verify
self_hosted: truethrough mode endpoint; - upload and launch disposable ISO;
- stop and delete guest;
- restart stack and confirm cleanup state and inventory survive.