feat(docs): add Virtual Cloud (VNC Minimal) README and 2025 Architecture Blueprint
This commit is contained in:
parent
5a084d265a
commit
ab750a6b7f
214
docs/CloudNeutral-Architecture-Blueprint-2025.md
Normal file
214
docs/CloudNeutral-Architecture-Blueprint-2025.md
Normal file
@ -0,0 +1,214 @@
|
|||||||
|
这一份 Blueprint 定义了现代企业级系统在 2025 年最小即可运行的全景架构。
|
||||||
|
它同时也是 CloudNeutral 模块体系的全局定位图:任何模块(XCloudFlow / XControl / XScopeHub / XPlane / AI Runtime / Infra-as-Code)都可以从此获取“自己在全局中的位置”。
|
||||||
|
|
||||||
|
🧩 全局架构图(Mermaid,可直接复制使用)
|
||||||
|
```···
|
||||||
|
flowchart TB
|
||||||
|
|
||||||
|
%% ---------------------------
|
||||||
|
%% IaaS & Core Infrastructure
|
||||||
|
%% ---------------------------
|
||||||
|
|
||||||
|
subgraph IaaS["IaaS 层(运行时基础设施)"]
|
||||||
|
direction TB
|
||||||
|
LB[负载均衡<br/>ALB / NLB / Ingress]
|
||||||
|
Compute[计算资源<br/>VM / GPU VM / K8s Node]
|
||||||
|
Network[VPC / 子网 / 路由 / SG]
|
||||||
|
Storage[对象存储 / 块存储<br/>S3 / GCS / OSS / MinIO]
|
||||||
|
Cache[缓存服务<br/>Redis / Memcached]
|
||||||
|
MQ[消息队列<br/>RabbitMQ / AWS SQS]
|
||||||
|
APIgw[API Gateway<br/>Kong / APISIX / Cloud GW]
|
||||||
|
end
|
||||||
|
|
||||||
|
%% ---------------------------
|
||||||
|
%% Core Data Layer
|
||||||
|
%% ---------------------------
|
||||||
|
|
||||||
|
subgraph CoreData["核心数据层(Database / Storage)"]
|
||||||
|
direction TB
|
||||||
|
Postgres[PostgreSQL<br/>OLTP 主数据库]
|
||||||
|
ClickHouse[ClickHouse<br/>OLAP 数仓]
|
||||||
|
MinIO[MinIO<br/>S3 兼容对象存储]
|
||||||
|
end
|
||||||
|
|
||||||
|
%% ---------------------------
|
||||||
|
%% Data Compute Layer
|
||||||
|
%% ---------------------------
|
||||||
|
|
||||||
|
subgraph BigData["大数据计算层(Batch / SQL / Stream)"]
|
||||||
|
direction TB
|
||||||
|
Trino[Trino / Presto<br/>SQL 查询引擎]
|
||||||
|
Redpanda[Redpanda(或 Kafka)<br/>事件流 / 消息总线]
|
||||||
|
end
|
||||||
|
|
||||||
|
%% ---------------------------
|
||||||
|
%% AI Compute Layer
|
||||||
|
%% ---------------------------
|
||||||
|
|
||||||
|
subgraph AI["AI / ML / LLM Runtime(训练 & 推理)"]
|
||||||
|
direction TB
|
||||||
|
Ray[Ray Cluster (单节点 Dev / K8s Prod)]
|
||||||
|
MLflow[MLflow Tracking + Model Registry]
|
||||||
|
Embd[Embedding Service<br/>向量生成]
|
||||||
|
VLLM[vLLM / SGLang<br/>LLM 推理服务]
|
||||||
|
InferenceGW[Inference Gateway<br/>Prompt 路由 / A/B / Token 限流]
|
||||||
|
end
|
||||||
|
|
||||||
|
%% ---------------------------
|
||||||
|
%% Observability Layer
|
||||||
|
%% ---------------------------
|
||||||
|
|
||||||
|
subgraph Obs["可观测性层(Observability)"]
|
||||||
|
direction TB
|
||||||
|
Prom[Prometheus Stack<br/>指标 + 告警]
|
||||||
|
Loki[Loki<br/>日志]
|
||||||
|
Grafana[Grafana<br/>统一可视化]
|
||||||
|
end
|
||||||
|
|
||||||
|
%% ---------------------------
|
||||||
|
%% Data Flow & Dependencies
|
||||||
|
%% ---------------------------
|
||||||
|
|
||||||
|
Network --> Compute
|
||||||
|
Compute --> CoreData
|
||||||
|
Compute --> BigData
|
||||||
|
Compute --> AI
|
||||||
|
Compute --> Obs
|
||||||
|
|
||||||
|
Storage --> CoreData
|
||||||
|
Storage --> BigData
|
||||||
|
Storage --> AI
|
||||||
|
Storage --> Obs
|
||||||
|
|
||||||
|
Postgres --> Trino
|
||||||
|
ClickHouse --> Trino
|
||||||
|
MinIO --> Trino
|
||||||
|
|
||||||
|
Redpanda --> Trino
|
||||||
|
Redpanda --> Ray
|
||||||
|
Redpanda --> VLLM
|
||||||
|
|
||||||
|
Ray --> MLflow
|
||||||
|
MLflow --> VLLM
|
||||||
|
|
||||||
|
VLLM --> InferenceGW
|
||||||
|
Embd --> InferenceGW
|
||||||
|
|
||||||
|
APIgw --> InferenceGW
|
||||||
|
LB --> APIgw
|
||||||
|
|
||||||
|
Prom --> Grafana
|
||||||
|
Loki --> Grafana
|
||||||
|
|
||||||
|
📘 架构分层说明
|
||||||
|
① IaaS 层(底座层:Compute / Network / Storage / Gateway)
|
||||||
|
|
||||||
|
在现代系统中已高度标准化:
|
||||||
|
|
||||||
|
LB / Ingress / API Gateway:服务入口
|
||||||
|
|
||||||
|
VPC / SG / 子网:网络结构
|
||||||
|
|
||||||
|
K8s Node / GPU Node / VM:计算资源
|
||||||
|
|
||||||
|
对象存储(S3/GCS/OSS/MinIO):统一的数据落地层
|
||||||
|
|
||||||
|
Redis / MQ(Kafka/SQS/Redpanda):缓存 + 异步事件
|
||||||
|
|
||||||
|
APISIX / Kong:南北向流量入口
|
||||||
|
|
||||||
|
管理方式:
|
||||||
|
|
||||||
|
Terraform 管基础设施
|
||||||
|
|
||||||
|
Ansible 管操作系统
|
||||||
|
|
||||||
|
Helm 不负责系统底座,仅负责 K8s 内部应用
|
||||||
|
|
||||||
|
这是 CloudNeutral 的 Infra Runtime Plane。
|
||||||
|
|
||||||
|
② 核心数据库层(OLTP / OLAP / Object Store)
|
||||||
|
|
||||||
|
现代企业数据三件套:
|
||||||
|
|
||||||
|
类型 组件 用途
|
||||||
|
OLTP PostgreSQL 主业务数据库
|
||||||
|
OLAP ClickHouse 实时分析数仓
|
||||||
|
Data Lake MinIO (S3 API) 模型存储、日志、湖仓结构
|
||||||
|
|
||||||
|
MinIO 在全景中的角色异常重要,它不是“对象存储替代品”,而是:
|
||||||
|
|
||||||
|
你的 模型仓库
|
||||||
|
|
||||||
|
Trino 的底层数据湖
|
||||||
|
|
||||||
|
AI 模型、Embedding、日志文件的中心落地点
|
||||||
|
|
||||||
|
这是 CloudNeutral 的 DataStore Plane。
|
||||||
|
|
||||||
|
③ 大数据计算层(Batch / SQL / Streaming)
|
||||||
|
|
||||||
|
现代系统的“数据中枢”:
|
||||||
|
|
||||||
|
Trino:跨库 SQL 统一查询(Postgres + ClickHouse + MinIO 同查)
|
||||||
|
|
||||||
|
Redpanda(Kafka):事件数据总线(代替传统 MQ)
|
||||||
|
|
||||||
|
功能定位:
|
||||||
|
|
||||||
|
Query Layer(SQL 查询)
|
||||||
|
|
||||||
|
Event Layer(事件驱动)
|
||||||
|
|
||||||
|
这是 CloudNeutral Data Compute Plane(数据计算平面)。
|
||||||
|
|
||||||
|
④ AI / ML / LLM Runtime 层
|
||||||
|
|
||||||
|
2025 年系统的“智能心脏”:
|
||||||
|
|
||||||
|
Ray:分布式训练、特征处理、批量计算
|
||||||
|
|
||||||
|
MLflow:实验追踪 + 模型库
|
||||||
|
|
||||||
|
Embedding Service:向量生成(RAG 基石)
|
||||||
|
|
||||||
|
vLLM / SGLang:推理服务
|
||||||
|
|
||||||
|
Inference Gateway:Prompt 路由、A/B、限流、多模型融合
|
||||||
|
|
||||||
|
这是 CloudNeutral AI Runtime Plane 的核心。
|
||||||
|
|
||||||
|
⑤ 可观测性层(Observability)
|
||||||
|
|
||||||
|
统一观测系统的三件套:
|
||||||
|
|
||||||
|
Prometheus Stack:指标 + 告警
|
||||||
|
|
||||||
|
Loki:日志
|
||||||
|
|
||||||
|
Grafana:统一查询与可视化
|
||||||
|
|
||||||
|
你的 XScopeHub 就是从这一层自然生长出来的。
|
||||||
|
|
||||||
|
📐 这张全景图的意义
|
||||||
|
|
||||||
|
为什么说这是 2025 年最小可运行的现代系统架构?
|
||||||
|
|
||||||
|
因为它完整串起:
|
||||||
|
传统 IaaS 底座
|
||||||
|
数据库与湖仓系统
|
||||||
|
SQL + 流式事件 + 批处理
|
||||||
|
AI/LLM 推理与训练
|
||||||
|
统一观测体系
|
||||||
|
|
||||||
|
并且为 CloudNeutral 所有模块提供了清晰定位:
|
||||||
|
|
||||||
|
CloudNeutral 模块 在全景图的位置
|
||||||
|
XCloudFlow IaC + 多云管理控制面
|
||||||
|
XControl 统一界面 / DevOps Portal
|
||||||
|
XScopeHub Observability Plane
|
||||||
|
XPlane 全局流量、DNS GSLB、自动扩缩容控制面
|
||||||
|
XStream(LLM Client) Inference Gateway 客户端
|
||||||
|
Data / AI 子项目 MinIO + Trino + Ray + vLLM 全链路
|
||||||
|
|
||||||
|
这一张图就是 CloudNeutral 的宇宙坐标系,未来任何模块扩展都能找到它的参考方向。
|
||||||
196
docs/virtual-cloud-README.md
Normal file
196
docs/virtual-cloud-README.md
Normal file
@ -0,0 +1,196 @@
|
|||||||
|
|
||||||
|
CloudNeutral Virtual Cloud(VNC Minimal)
|
||||||
|
|
||||||
|
A Unified Virtual Cloud Abstraction Layer for Multi-Cloud Infrastructure
|
||||||
|
|
||||||
|
1. 一句话概念
|
||||||
|
|
||||||
|
虚拟中立云(Virtual Neutral Cloud)= 用 5 个 CloudNeutral 核心模块,把 AWS / GCP / 阿里云 / 自建集群伪装成“一朵统一的云”。
|
||||||
|
用户永远只看见:
|
||||||
|
|
||||||
|
Tenant → Project → Environment → Region → Services
|
||||||
|
|
||||||
|
|
||||||
|
而不会再感知底层:
|
||||||
|
|
||||||
|
AWS / GCP / AliCloud / On-Prem
|
||||||
|
|
||||||
|
|
||||||
|
CloudNeutral 成为云之上的云。
|
||||||
|
|
||||||
|
2. 架构总览(MVP)
|
||||||
|
|
||||||
|
下面是 CloudNeutral Virtual Cloud 的最小可运行版本(Minimum Viable Cloud):
|
||||||
|
|
||||||
|
flowchart TB
|
||||||
|
|
||||||
|
subgraph VNC["CloudNeutral Virtual Cloud(最小可运行版本)"]
|
||||||
|
XLogin[XLogin<br/>统一身份 / Tenant / RBAC]
|
||||||
|
XCloudFlow[XCloudFlow<br/>虚拟资源 → 多云 Terraform]
|
||||||
|
XPlane[XPlane<br/>虚拟 Region/Env + GSLB]
|
||||||
|
XScopeHub[XScopeHub<br/>统一观测 API]
|
||||||
|
XControl[XControl<br/>虚拟云控制台]
|
||||||
|
end
|
||||||
|
|
||||||
|
subgraph Clouds["实际多云资源(被抽象和隐藏)"]
|
||||||
|
AWS[(AWS)]
|
||||||
|
GCP[(GCP)]
|
||||||
|
Aliyun[(Aliyun)]
|
||||||
|
OnPrem[(On-Prem K8s)]
|
||||||
|
end
|
||||||
|
|
||||||
|
XCloudFlow --> AWS
|
||||||
|
XCloudFlow --> GCP
|
||||||
|
XCloudFlow --> Aliyun
|
||||||
|
XCloudFlow --> OnPrem
|
||||||
|
|
||||||
|
XPlane --> AWS
|
||||||
|
XPlane --> GCP
|
||||||
|
|
||||||
|
XScopeHub --> AWS
|
||||||
|
XScopeHub --> GCP
|
||||||
|
XScopeHub --> OnPrem
|
||||||
|
|
||||||
|
XControl --> XLogin
|
||||||
|
XControl --> XCloudFlow
|
||||||
|
XControl --> XPlane
|
||||||
|
XControl --> XScopeHub
|
||||||
|
|
||||||
|
|
||||||
|
CloudNeutral 的五大模块每个只做一件事,各司其职,联合构成虚拟云。
|
||||||
|
|
||||||
|
3. 五大核心模块(Minimal Responsibility Set)
|
||||||
|
3.1 XLogin — 虚拟云的统一 IAM
|
||||||
|
|
||||||
|
XLogin 把所有云厂商的用户体系“降级”为资源后端。
|
||||||
|
它自己定义:
|
||||||
|
|
||||||
|
登录方式(OIDC → JWT)
|
||||||
|
|
||||||
|
租户(Tenant)
|
||||||
|
|
||||||
|
权限模型(RBAC → 哪个用户能访问哪些项目/区域)
|
||||||
|
|
||||||
|
最终结果:
|
||||||
|
|
||||||
|
AWS IAM 不再是主角,只是 XLogin 的一个 OIDC Consumer。
|
||||||
|
XLogin 才是“虚拟云的账户系统”。
|
||||||
|
|
||||||
|
3.2 XCloudFlow — 虚拟资源 → 多云资源编排器(IaC Orchestrator)
|
||||||
|
|
||||||
|
用户永远只描述“虚拟资源”,例如:
|
||||||
|
|
||||||
|
service: orders-api
|
||||||
|
env: prod
|
||||||
|
region: jp1
|
||||||
|
size: small
|
||||||
|
runtime: k8s
|
||||||
|
|
||||||
|
|
||||||
|
XCloudFlow 的职责:
|
||||||
|
|
||||||
|
将虚拟 Region → 映射到真实云
|
||||||
|
jp1 → AWS ap-northeast-1
|
||||||
|
|
||||||
|
将虚拟规格 → 映射到真实模板
|
||||||
|
small → t4g.medium + 2 pods
|
||||||
|
|
||||||
|
渲染标准 Terraform 模块
|
||||||
|
|
||||||
|
触发 GitHub Actions 完成 plan/apply
|
||||||
|
|
||||||
|
它是整朵虚拟云的“发动机”。
|
||||||
|
|
||||||
|
3.3 XPlane — 虚拟 Region / Env + 全局流量控制(GSLB)
|
||||||
|
|
||||||
|
它让用户只需要关心:
|
||||||
|
|
||||||
|
jp1 / sg1 / eu1 / cn1
|
||||||
|
dev / test / prod
|
||||||
|
|
||||||
|
|
||||||
|
真实配置隐藏在映射表里:
|
||||||
|
|
||||||
|
regions:
|
||||||
|
jp1:
|
||||||
|
backend:
|
||||||
|
- type: aws
|
||||||
|
region: ap-northeast-1
|
||||||
|
ingress: eks.jp.example.com
|
||||||
|
|
||||||
|
|
||||||
|
同时负责:
|
||||||
|
|
||||||
|
全局流量路由(latency / weight / failover)
|
||||||
|
|
||||||
|
服务入口:api.cloudneutral.io / ai.cloudneutral.io
|
||||||
|
|
||||||
|
XPlane 让 CloudNeutral 看起来像一朵真正的全球云。
|
||||||
|
|
||||||
|
3.4 XScopeHub — 虚拟云的统一观测入口
|
||||||
|
|
||||||
|
它不是替代 Prometheus/Loki,而是做一层“虚拟云视角的统一查询 API”。
|
||||||
|
|
||||||
|
职责:
|
||||||
|
|
||||||
|
聚合多云 Prometheus(Metrics)
|
||||||
|
|
||||||
|
聚合多云 Loki(Logs)
|
||||||
|
|
||||||
|
强制统一标签体系:
|
||||||
|
tenant / project / env / region / service
|
||||||
|
|
||||||
|
提供标准 API:
|
||||||
|
/metrics?region=jp1&service=orders-api
|
||||||
|
|
||||||
|
于是:
|
||||||
|
|
||||||
|
多云观测 → 变成一朵云的观测。
|
||||||
|
|
||||||
|
3.5 XControl — 虚拟云的 Portal / Console
|
||||||
|
|
||||||
|
登录(XLogin) 项目/环境/区域视图
|
||||||
|
|
||||||
|
管理流量 → 调用 XPlane
|
||||||
|
创建服务 → 触发 XCloudFlow
|
||||||
|
监控视图 → 来自 XScopeHub
|
||||||
|
|
||||||
|
所有功能最终收敛到 XControl:
|
||||||
|
|
||||||
|
换句话说:
|
||||||
|
|
||||||
|
XControl = CloudNeutral 的 AWS Console / GCP Console。
|
||||||
|
但世界里只有 CloudNeutral 的概念。
|
||||||
|
|
||||||
|
4. 最小 MVP 要素(你现在就能运行)
|
||||||
|
|
||||||
|
必须组件:
|
||||||
|
|
||||||
|
XLogin
|
||||||
|
XCloudFlow
|
||||||
|
XPlane
|
||||||
|
XScopeHub
|
||||||
|
XControl
|
||||||
|
|
||||||
|
必须定义:
|
||||||
|
|
||||||
|
Tenant
|
||||||
|
Project
|
||||||
|
Environment
|
||||||
|
Region
|
||||||
|
Service
|
||||||
|
|
||||||
|
必须动作:
|
||||||
|
|
||||||
|
XLogin → 发 JWT
|
||||||
|
XCloudFlow → 虚拟 YAML → Terraform → GitOps
|
||||||
|
XPlane → DNS/GSLB 控制
|
||||||
|
XScopeHub → 聚合 Prom/Loki
|
||||||
|
XControl → 提供统一 UI
|
||||||
|
|
||||||
|
最终结果:
|
||||||
|
|
||||||
|
底层变成节点,上层变成“统一的虚拟云”。
|
||||||
|
|
||||||
|
你不是替代 AWS/GCP,
|
||||||
|
你是把它们抽象成 CloudNeutral 背后的资源池。
|
||||||
Loading…
Reference in New Issue
Block a user