Update installer and runtime setup flow

This commit is contained in:
Jino Jose committed 2026-07-09 10:30:10 +05:30
1 parent 8603fb2bc2
commit 7540da04a8
5 files changed
+385 -54

No files matched your search

+22 -5
View File
@@ -260,6 +260,23 @@ d=json.load(open("/tmp/cezen-license-check.json"))
print((d.get("license") or {}).get("status","missing"))
PY
)
# Human-readable label for display only — the raw code above (e.g.
# "invalid_signature", "machine_mismatch") is what gets persisted to
# install-record.json and is meant for machines/support, not end users.
LICENSE_STATUS_LABEL=$(LICENSE_STATUS="$LICENSE_STATUS" python3 - <<'PY'
import os
labels = {
"valid": "Valid",
"missing": "No license installed (field-staging mode)",
"expired": "Expired — contact support@cezentech.com",
"invalid_signature": "Invalid signature — re-upload a valid signed license",
"not_yet_valid": "Not yet in its valid date range",
"machine_mismatch": "Bound to different hardware — contact support@cezentech.com",
}
status = os.environ.get("LICENSE_STATUS", "missing")
print(labels.get(status, status))
PY
)
LICENSE_ALLOWED_TIER=$(python3 - <<'PY'
import json
d=json.load(open("/tmp/cezen-license-check.json"))
@@ -285,7 +302,7 @@ if [ "$WORKSTATION_MODE" = true ]; then
# /opt/cezen/tier and the install-record below is what
# actually drives Workstation branding/entitlement.
whiptail --title "$TITLE" \
--msgbox "\nNexus One AI Workstation\n\nLicense status: ${LICENSE_STATUS}\nHardware recommendation: ${HARDWARE_TIER}\n\nThis image installs the personal-appliance stack (local chat, personal RAG, document intelligence, prompt studio) — it is not a Server tier and will not be offered a Server S/M/L/Max upgrade path." \
--msgbox "\nNexus One AI Workstation\n\nLicense status: ${LICENSE_STATUS_LABEL}\nHardware recommendation: ${HARDWARE_TIER}\n\nThis image installs the personal-appliance stack (local chat, personal RAG, document intelligence, prompt studio) — it is not a Server tier and will not be offered a Server S/M/L/Max upgrade path." \
$H $W
else
mapfile -t TIER_MENU < <(python3 - <<'PY'
@@ -306,13 +323,13 @@ PY
if [ "${#TIER_MENU[@]}" -eq 0 ]; then
whiptail --title "$TITLE" \
--msgbox "\nNo installable tiers are available.\n\nLicense status: ${LICENSE_STATUS}\nHardware recommendation: ${HARDWARE_TIER}\n\nCheck the signed license or contact Cezen support." \
--msgbox "\nNo installable tiers are available.\n\nLicense status: ${LICENSE_STATUS_LABEL}\nHardware recommendation: ${HARDWARE_TIER}\n\nCheck the signed license or contact Cezen support." \
$H $W
exit 1
fi
whiptail --title "$TITLE" \
--msgbox "\nLicense status: ${LICENSE_STATUS}\nAllowed tier: ${LICENSE_ALLOWED_TIER}\nHardware recommendation: ${HARDWARE_TIER}\n\nOnly valid tiers will be shown next." \
--msgbox "\nLicense status: ${LICENSE_STATUS_LABEL}\nAllowed tier: ${LICENSE_ALLOWED_TIER}\nHardware recommendation: ${HARDWARE_TIER}\n\nOnly valid tiers will be shown next." \
$H $W
TIER=$(whiptail --title "$TITLE" \
@@ -357,7 +374,7 @@ TOOLS_DISPLAY=$(echo "$TOOLS" | tr -d '"' | tr ' ' '\n' | sed 's/^/ · /' | tr
MY_IP=$(hostname -I | awk '{print $1}')
LICENSE_DISPLAY="Field staging / evaluation"
if [ -n "$LICENSE_PATH" ]; then
LICENSE_DISPLAY="Signed file (${LICENSE_STATUS})"
LICENSE_DISPLAY="Signed file (${LICENSE_STATUS_LABEL})"
fi
whiptail --title "$TITLE" \
@@ -433,7 +450,7 @@ if bash "$AIPACKAGE_DIR/install.sh" --tier="$TIER" >> "$INSTALL_LOG_FILE" 2>&1;
# Mark as configured only after the installer finishes successfully.
touch /opt/cezen/.setup-done
whiptail --title "$TITLE" \
--msgbox "\nInstaller command finished successfully.\n\nPortal:\n http://localhost\n\nFor detailed logs, run:\n sudo tail -f $INSTALL_LOG_FILE" \
--msgbox "\nInstaller command finished successfully.\n\nPortal -> http://localhost\nOllama API -> http://localhost:11434\nGrafana -> http://localhost:3000\n\nAdmin login -> admin / Cezen@2024!\n(you will be required to change this on first login)\n\nFor detailed logs, run:\n sudo tail -f $INSTALL_LOG_FILE" \
$H $W
else
whiptail --title "$TITLE" \