kubestronaut-sim/images/desktop/rootfs/usr/local/bin/start-desktop
vumas3r f3d0e536b6 Exam simulator for CKA, CKAD and CKS with per-task hosts and a remote desktop
kubestronaut-sim runs each exam task on a host of its own - a kind (kubeadm)
cluster in rootless podman, or a QEMU/KVM Ubuntu VM for the CKS tasks that
need their own kernel (Falco, AppArmor) - and puts a browser desktop in front
of them, the way killer.sh and sailor.sh do.

- ksim, sim/: the engine (sessions, drills, study mode, grading, coverage,
  audit), host and VM lifecycle, the desktop
- images/: exam host images (common, CKS variant with its tools, VM guest)
- cka/ (131 tasks), ckad/ (105), cks/ (110): task banks, curricula with
  study notes, reference solutions and scripted solutions

Every domain of every track has at least 17 pool tasks. `./ksim audit` proves
a task three ways: it seeds cleanly on its own host, scores nothing before
anyone has worked on it, and reaches full marks when its scripted solution is
run on the host as `candidate`. All 346 tasks pass (CKA audited 2026-10-13,
CKAD and CKS 2026-10-12).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JZPd3GGWyxTgAkL6a4gAJz
2026-10-13 16:29:33 -06:00

13 lines
701 B
Bash

#!/bin/bash
# X server + VNC in one (Xvnc), the XFCE session on it, and noVNC's websocket bridge in front.
# VNC has no password: the container's port is published on 127.0.0.1 only (see sim/desktop.py).
set -u
export DISPLAY=:1 HOME=/home/candidate USER=candidate SHELL=/bin/bash
rm -f /tmp/.X1-lock /tmp/.X11-unix/X1
Xvnc :1 -geometry "${GEOMETRY:-1600x900}" -depth 24 -rfbport 5901 -localhost \
-SecurityTypes None -AlwaysShared -desktop "${DESKTOP_NAME:-exam}" >/tmp/xvnc.log 2>&1 &
for _ in $(seq 50); do [ -S /tmp/.X11-unix/X1 ] && break; sleep 0.1; done
cd "$HOME"
dbus-launch --exit-with-session startxfce4 >/tmp/xfce.log 2>&1 &
exec websockify --web /usr/share/novnc 6080 127.0.0.1:5901