Add managed Lab 3 browser terminal deployment
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user