feat(frontend): add Helm chart browser, monitoring, chart-references and values templates pages
Add new frontend pages for the multi-tenant OCDP platform: - Charts page (/charts): Browse Harbor OCI registries to list Helm chart repositories and versions, with deploy modal to launch charts on selected clusters - Monitoring page (/monitoring): Display cluster metrics (CPU/Memory/GPU usage) and per-node details with resource utilization bars - Chart References page (/chart-references): CRUD for chart metadata references - Values Templates page (/templates): CRUD for Helm values templates with version history and rollback support - Sidebar: Add Charts navigation, update Storage and Templates links - api.ts: Add all API client functions (clusterApi, registryApi, instanceApi, monitoringApi, storageApi, chartReferenceApi, valuesTemplateApi, workspaceApi, userApi) with full TypeScript types Note: deploy flow and values template rollback not yet end-to-end tested.
This commit is contained in:
45
start.sh
Normal file
45
start.sh
Normal file
@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
# OCDP 一键启动脚本 (Docker Compose)
|
||||
|
||||
set -e
|
||||
|
||||
# 服务器IP(外部访问)
|
||||
SERVER_IP=${SERVER_IP:-10.6.80.114}
|
||||
BACKEND_PORT=${BACKEND_PORT:-8080}
|
||||
|
||||
echo "=== OCDP 启动 (Docker Compose) ==="
|
||||
echo "Server IP: $SERVER_IP"
|
||||
echo "Backend Port: $BACKEND_PORT"
|
||||
echo ""
|
||||
|
||||
# 1. 停止并清理现有容器(可选,保留数据)
|
||||
echo "检查现有服务..."
|
||||
if docker ps --format '{{.Names}}' | grep -qE '^ocdp-'; then
|
||||
echo "发现现有 OCDP 容器,请先运行 ./stop.sh 停止服务"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 2. 使用 Docker Compose 启动所有服务
|
||||
echo "启动服务..."
|
||||
ALLOWED_DEV_ORIGINS="http://${SERVER_IP},http://${SERVER_IP}:3000" \
|
||||
DATABASE_URL="postgresql://postgres:postgres@postgres:5432/ocdp?sslmode=disable" \
|
||||
JWT_SECRET="change-me-in-production" \
|
||||
ENCRYPTION_KEY="change-me-32-bytes-long-key-here" \
|
||||
ADAPTER_MODE="production" \
|
||||
BACKEND_PORT=$BACKEND_PORT \
|
||||
INIT_DB_SQL_PATH="./backend/scripts/init-db.sql" \
|
||||
docker compose -f docker-compose.yml -f backend/docker-compose.yml --profile backend up -d
|
||||
|
||||
echo ""
|
||||
echo "=== OCDP 启动完成 ==="
|
||||
echo ""
|
||||
echo "访问地址:"
|
||||
echo " 前端: http://${SERVER_IP}"
|
||||
echo " 后端: http://${SERVER_IP}:${BACKEND_PORT}/api/v1"
|
||||
echo " API 文档: http://${SERVER_IP}:${BACKEND_PORT}/api/docs"
|
||||
echo " 数据库: localhost:5432"
|
||||
echo ""
|
||||
echo "默认账号: admin / admin123"
|
||||
echo ""
|
||||
echo "查看日志: docker compose logs -f"
|
||||
echo "停止服务: ./stop.sh"
|
||||
Reference in New Issue
Block a user