Promote v0.2.0 to production
This commit is contained in:
+46
-40
@@ -1,10 +1,10 @@
|
||||
#!/bin/sh
|
||||
# GPU Kitchen — one-command install (specs/plateforme/installation.md).
|
||||
# GPU Kitchen — one-command install (specs/plateforme/installation/README.md).
|
||||
#
|
||||
# curl -fsSL https://repo.byterain.io/gpukitchen/channel/raw/branch/main/install.sh | sudo sh
|
||||
# curl -fsSL https://gpu.kitchen/install.sh | sudo sh
|
||||
#
|
||||
# (Interim URL — becomes https://gpu.kitchen/install.sh once the hub exists; the
|
||||
# channel repo is written by .gitea/workflows/release.yml, see specs/developpement/ci-cd.md.)
|
||||
# The public entrypoint serves the release channel's installer; the channel repo is
|
||||
# written by .gitea/workflows/release.yml, see specs/developpement/ci-cd/README.md.
|
||||
#
|
||||
# What it does, and nothing more:
|
||||
# 0. existing detect an install already on this host (manifest, or the traces
|
||||
@@ -33,7 +33,7 @@
|
||||
#
|
||||
# This installs a CONTROLLER node (the full app + UI). A headless compute node is
|
||||
# `gpuk install --mode worker …` — see deployments/install/gpuk and
|
||||
# specs/plateforme/installation.md.
|
||||
# specs/plateforme/installation/README.md.
|
||||
#
|
||||
# Design note — this script starts nothing itself. workerd owns the container's
|
||||
# lifecycle (create, health-gate, roll back, update); the UI's update button and
|
||||
@@ -51,7 +51,7 @@ main() {
|
||||
# it is served next to this script, and the backend's update check reads the SAME
|
||||
# document (apps/controller/api/src/core/release-channel.ts). One file, one answer. Interim
|
||||
# default: the public Gitea channel repo — flips to https://gpu.kitchen/latest.json
|
||||
# once the hub exists (keep the three defaults in sync, see specs/developpement/ci-cd.md).
|
||||
# once the hub exists (keep the three defaults in sync, see specs/developpement/ci-cd/README.md).
|
||||
CHANNEL_URL="${GPUK_CHANNEL_URL:-https://repo.byterain.io/gpukitchen/channel/raw/branch/main/latest.json}"
|
||||
EDITION="${GPUK_EDITION:-community}"
|
||||
DATA_ROOT="${GPUK_DATA_ROOT:-/var/lib/gpu-kitchen}"
|
||||
@@ -139,8 +139,8 @@ usage() {
|
||||
cat <<EOF
|
||||
GPU Kitchen installer
|
||||
|
||||
curl -fsSL https://repo.byterain.io/gpukitchen/channel/raw/branch/main/install.sh | sudo sh
|
||||
curl -fsSL https://repo.byterain.io/gpukitchen/channel/raw/branch/main/install.sh | sudo sh -s -- [options]
|
||||
curl -fsSL https://gpu.kitchen/install.sh | sudo sh
|
||||
curl -fsSL https://gpu.kitchen/install.sh | sudo sh -s -- [options]
|
||||
|
||||
Options:
|
||||
--version <tag> The release the channel names (another one: --image <ref>@sha256:…)
|
||||
@@ -155,7 +155,7 @@ Options:
|
||||
--network <mode> bridge (default) | host. Bridged, only the three ports above
|
||||
touch the host; host makes every listener of the container a
|
||||
host-wide claim. An existing install keeps its mode.
|
||||
--profile <p> homelab | studio | enterprise | public (no flag + a terminal
|
||||
--profile <p> homelab | small-team | managed-network | public (no flag + a terminal
|
||||
= the script asks; no flag + no terminal = first-run asks)
|
||||
--domain <d> Name the UI is reached by through a reverse proxy, any
|
||||
profile: allowed as a host of the install, proxy trusted for
|
||||
@@ -222,8 +222,8 @@ case "$EDITION" in
|
||||
esac
|
||||
|
||||
case "$PROFILE" in
|
||||
""|homelab|studio|enterprise|public) ;;
|
||||
*) die "--profile must be homelab, studio, enterprise or public (got '$PROFILE')" ;;
|
||||
""|homelab|small-team|managed-network|public) ;;
|
||||
*) die "--profile must be homelab, small-team, managed-network or public (got '$PROFILE')" ;;
|
||||
esac
|
||||
|
||||
case "$DOMAIN" in
|
||||
@@ -363,7 +363,7 @@ case "$EXISTING" in
|
||||
# read as the daemon reads it (host).
|
||||
[ "$NETWORK_GIVEN" -eq 1 ] || NETWORK="${C_NETMODE:-host}"
|
||||
case "$_profile" in
|
||||
homelab|studio|enterprise|public) [ -n "$PROFILE" ] || PROFILE="$_profile" ;;
|
||||
homelab|small-team|managed-network|public) [ -n "$PROFILE" ] || PROFILE="$_profile" ;;
|
||||
esac
|
||||
ok "data root $DATA_ROOT"
|
||||
ok "ports UI $OURS_UI, worker channel $OURS_MTLS, inference $OURS_INF"
|
||||
@@ -488,7 +488,7 @@ fi
|
||||
|
||||
if [ "$SKIP_GPU_CHECK" -eq 1 ]; then
|
||||
warn "nvidia-container-toolkit check skipped (--skip-gpu-check)"
|
||||
elif docker info 2>/dev/null | grep -qiE 'runtimes:.*nvidia'; then
|
||||
elif docker info 2>/dev/null | grep -iE 'runtimes:.*nvidia' >/dev/null; then
|
||||
# The runtime being REGISTERED is not the same as it working. With the toolkit
|
||||
# installed, --gpus injects the driver and nvidia-smi into a plain image; that
|
||||
# is the exact mechanism the controller container relies on, so test it rather
|
||||
@@ -861,24 +861,24 @@ fi
|
||||
# Only ever on a terminal, and only when --profile was not given. The answer is
|
||||
# relayed verbatim as --profile: the backend stays the sole applier of profile
|
||||
# defaults and floors. Without a terminal the historical path is untouched —
|
||||
# profile unset, enterprise floors, the first-run wizard requires the choice
|
||||
# profile unset, managed-network floors, the first-run wizard requires the choice
|
||||
# (PRF-05).
|
||||
if [ -z "$PROFILE" ] && can_prompt; then
|
||||
step "Security profile — how will this kitchen be used?"
|
||||
cat > /dev/tty <<'PROFILES'
|
||||
1) Home lab a trusted home network
|
||||
1) Home lab a trusted home network
|
||||
No sign-in on your home network. Nearby workers are found and join
|
||||
without waiting for approval.
|
||||
|
||||
2) Studio one control station, shared compute
|
||||
2) Small team one control station, shared compute
|
||||
Control stays on this machine. Colleagues use API keys, while nearby
|
||||
workers wait for your approval.
|
||||
|
||||
3) Enterprise a managed company network
|
||||
3) Managed network a managed company network
|
||||
Sign-in is required. The controller stays quiet on the network; known
|
||||
workers can request your approval.
|
||||
|
||||
4) Public server direct internet exposure
|
||||
4) Public server direct internet exposure
|
||||
Sign-in and hardened browser transport are required. Network discovery
|
||||
is off and workers join only by token.
|
||||
|
||||
@@ -889,10 +889,10 @@ PROFILES
|
||||
while :; do
|
||||
ask " Choose a profile [1-4, Enter = 1 (Home lab)]: "
|
||||
case "$REPLY" in
|
||||
""|1|homelab) PROFILE="homelab" ;;
|
||||
2|studio) PROFILE="studio" ;;
|
||||
3|enterprise) PROFILE="enterprise" ;;
|
||||
4|public) PROFILE="public" ;;
|
||||
""|1|homelab) PROFILE="homelab" ;;
|
||||
2|small-team) PROFILE="small-team" ;;
|
||||
3|managed-network) PROFILE="managed-network" ;;
|
||||
4|public) PROFILE="public" ;;
|
||||
*) printf '%s\n' " pick 1, 2, 3 or 4" > /dev/tty; continue ;;
|
||||
esac
|
||||
break
|
||||
@@ -1058,28 +1058,34 @@ LAN_IP=$(ip route get 1.1.1.1 2>/dev/null | sed -n 's/.* src \([0-9.]*\).*/\1/p'
|
||||
echo
|
||||
echo "${BOLD}${GREEN}GPU Kitchen is running.${RESET}"
|
||||
echo
|
||||
echo " ${BOLD}Open:${RESET} http://${HOSTNAME_FQDN}:${PORT}"
|
||||
[ -n "$LAN_IP" ] && echo " http://${LAN_IP}:${PORT}"
|
||||
echo
|
||||
# [PRF-12] [SEC-53] homelab and studio open straight into the app: the controller
|
||||
# closed their claim window at first boot, so there is no code to show. Every other
|
||||
# profile — or none yet — starts with the claim code (SEC-52).
|
||||
# [INS-06] [SEC-52] Where a claim window exists (managed-network, public, or no profile yet)
|
||||
# the opening URL IS the claim URL: /start?key=<one-time key>, nothing to type. The key
|
||||
# is the one secret allowed in an opening URL because it serves once and /start wipes it
|
||||
# from the history (SEC-71). homelab and small-team open straight into the app (PRF-12).
|
||||
CLAIM_KEY=""
|
||||
CLAIM_SUFFIX=""
|
||||
case "$PROFILE" in
|
||||
homelab|studio)
|
||||
homelab|small-team) ;;
|
||||
*)
|
||||
CLAIM_KEY_FILE="$DATA_ROOT/secrets/claim_key"
|
||||
[ ! -s "$CLAIM_KEY_FILE" ] || CLAIM_KEY=$(cat "$CLAIM_KEY_FILE" 2>/dev/null || true)
|
||||
[ -z "$CLAIM_KEY" ] || CLAIM_SUFFIX="/start?key=${CLAIM_KEY}"
|
||||
;;
|
||||
esac
|
||||
echo " ${BOLD}Open:${RESET} http://${HOSTNAME_FQDN}:${PORT}${CLAIM_SUFFIX}"
|
||||
[ -n "$LAN_IP" ] && echo " http://${LAN_IP}:${PORT}${CLAIM_SUFFIX}"
|
||||
echo
|
||||
case "$PROFILE" in
|
||||
homelab|small-team)
|
||||
echo " ${BOLD}Next:${RESET} open the URL above: GPU Kitchen opens straight away."
|
||||
;;
|
||||
*)
|
||||
CLAIM_CODE_FILE="$DATA_ROOT/secrets/claim_code"
|
||||
CLAIM_CODE=""
|
||||
[ ! -s "$CLAIM_CODE_FILE" ] || CLAIM_CODE=$(cat "$CLAIM_CODE_FILE" 2>/dev/null || true)
|
||||
if [ -n "$CLAIM_CODE" ]; then
|
||||
echo " ${BOLD}Claim code:${RESET} $CLAIM_CODE"
|
||||
echo " ${BOLD}Read again:${RESET} $CLAIM_CODE_FILE (mode 0600; removed after claim)"
|
||||
if [ -n "$CLAIM_KEY" ]; then
|
||||
echo " ${BOLD}Next:${RESET} open the URL above to set up this installation. It works once."
|
||||
echo " ${BOLD}gpuk status${RESET} shows it again until it has been used."
|
||||
else
|
||||
echo " ${BOLD}Claim code:${RESET} consumed (the first account already exists)"
|
||||
echo " ${BOLD}Next:${RESET} open the URL above (the setup link was already used: the first account exists)."
|
||||
fi
|
||||
echo
|
||||
echo " ${BOLD}Next:${RESET} open the URL above and enter the claim code."
|
||||
;;
|
||||
esac
|
||||
# [INS-50] Linking to a GPU Kitchen account is never a first-run step: a banner in
|
||||
@@ -1109,11 +1115,11 @@ case "$PROFILE" in
|
||||
fi
|
||||
echo
|
||||
;;
|
||||
enterprise)
|
||||
managed-network)
|
||||
echo " ${BOLD}Then:${RESET} create the first administrator in the UI"
|
||||
echo
|
||||
;;
|
||||
homelab|studio)
|
||||
homelab|small-team)
|
||||
echo
|
||||
;;
|
||||
"")
|
||||
|
||||
Reference in New Issue
Block a user