Publish AI workspace source through the isolated runtime

This commit is contained in:
WebUp Cloud committed 2026-11-08 17:29:54 +08:00
1 parent 03169bd0f6
commit d1d14f0f77
21 files changed
+487 -68

No files matched your search

+7
View File
@@ -3,6 +3,12 @@ set -euo pipefail
[[ ${WSL_DISTRO_NAME:-} == WebUp-Local && $EUID == 0 && -e /etc/webup-local/environment ]] || { echo 'Dedicated local environment required.' >&2; exit 1; }
project_root=$(realpath "$1")
k3s kubectl apply -f "$project_root/infra/k8s/review-rbac.yaml"
k3s kubectl apply -f "$project_root/infra/k8s/runtime-rbac.yaml"
if k3s kubectl -n platform-sandboxes get configmap webup-runtime >/dev/null 2>&1; then
k3s kubectl -n platform-sandboxes patch configmap webup-runtime --type merge -p '{"data":{"SOURCE_IMAGE":"docker.io/library/webup-development-sandbox:local-v1"}}'
else
k3s kubectl -n platform-sandboxes create configmap webup-runtime --from-literal=SOURCE_IMAGE=docker.io/library/webup-development-sandbox:local-v1
fi
install -d -m 0700 /etc/webup-local
if [[ ! -e /etc/webup-local/gateway.env ]]; then
python3 - <<'PY'
@@ -40,6 +46,7 @@ WantedBy=multi-user.target
UNIT
systemctl daemon-reload
systemctl enable --now webup-gateway-forward
systemctl restart webup-gateway-forward
install -d -m 0700 "$project_root/.runtime/local-cluster"
cp /etc/webup-local/gateway.env "$project_root/.runtime/local-cluster/gateway.env"
python3 - <<'PY'