Add managed Lab 3 browser terminal deployment

This commit is contained in:
c4ch3c4d3
2026-04-13 16:40:14 -06:00
parent 30b919c0b9
commit cbf6c3fad3
12 changed files with 361 additions and 2 deletions
Executable → Regular
+27
View File
@@ -49,6 +49,31 @@ Pinned component versions:
EOF
}
require_student_password_hash() {
local current_host_profile
current_host_profile=$(host_profile)
if [ "$current_host_profile" = "macos" ]; then
return
fi
if [ -n "${COURSEWARE_STUDENT_PASSWORD_HASH:-}" ]; then
return
fi
cat <<'EOF' >&2
Missing COURSEWARE_STUDENT_PASSWORD_HASH.
Set a password hash for the managed `student` login before running this command. Example:
export COURSEWARE_STUDENT_PASSWORD_HASH="$(openssl passwd -6 'student-password')"
Then rerun:
./labctl up
EOF
exit 1
}
confirm_installation() {
local response
local tlab_version
@@ -527,6 +552,7 @@ main() {
case "$cmd" in
up)
confirm_installation
require_student_password_hash
run_playbook up.yml
run_project_script "$ROOT_DIR/scripts/service_manager.sh" start all
;;
@@ -536,6 +562,7 @@ main() {
;;
preflight)
confirm_installation
require_student_password_hash
run_playbook up.yml --tags preflight
;;
versions)