feat: CI/CD 全链路(Drone pipeline + Helm chart + Dockerfile)
重大变更:
- .drone.yml: 4 步 pipeline(submodule init → build 12 镜像 → helm deploy → verify)
- mixingx-chart/: 手写 Helm chart(模式 3,替代 aspire publish)
- 独立 postgres(每服务一个,不再共享)
- 四胞胎架构(agent/edge: 后端+前端+DB podAffinity 同节点)
- pgAdmin(在 K3s 内,管理所有 postgres)
- Aspire Dashboard(OTLP 遥测接收端)
- Dockerfile: 全部服务已补齐(含 gateway/audit 新增)
- apphost.cs: opcua mock publish 模式改 AddDockerfile
- patch-persistence.sh: emptyDir → PVC patch(备用)
submodule 指针更新:
- mixingx.sso: Dockerfile 精准 COPY
- mixingx.edge: opcua Dockerfile 新增
- eau.ultra: MigrateAsync 无条件执行
- mixingx.audit: Dockerfile 新增
- mixingx.gateway: Dockerfile 新增
镜像 tag 规则: {分支}-{时间戳}-[{tag}]
This commit is contained in:
commit
f69c4161b5
19 files changed
+975
No files matched your search
+141
@@ -0,0 +1,141 @@
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
# MixingX Helm Chart — values
|
||||
# 架构:独立 DB + 四胞胎(agent/edge podAffinity) + 共享基础设施
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
|
||||
# ── 全局 ──
|
||||
registry: 192.168.1.105:8888/mixingx
|
||||
tag: latest
|
||||
|
||||
# ── 共享基础设施(所有服务连同一个) ──
|
||||
sharedInfra:
|
||||
postgres: # postgres 连接参数(每个独立 postgres 共用)
|
||||
username: postgres
|
||||
password: "Admin12345"
|
||||
port: 5432
|
||||
redis:
|
||||
host: redis-service
|
||||
port: 6379
|
||||
password: "Admin12345"
|
||||
rabbitmq:
|
||||
host: messaging-service
|
||||
port: 5672
|
||||
username: guest
|
||||
password: guest
|
||||
mongo:
|
||||
host: mongo-service
|
||||
port: 27017
|
||||
username: admin
|
||||
password: "Admin12345"
|
||||
database: mixingx_audit
|
||||
otlp:
|
||||
endpoint: http://k8s-dashboard-service:18889
|
||||
protocol: grpc
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
# 类型 A:四胞胎(agent/edge)— 后端+前端+独立DB,podAffinity 同节点
|
||||
# 每个实例生成:后端 Deployment + 前端 Deployment + 独立 postgres StatefulSet
|
||||
# 默认各 1 个,以后按需加(加一行 values + helm upgrade)
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
instances:
|
||||
- name: agent-0
|
||||
image: agent
|
||||
role: agent
|
||||
webImage: agent-web
|
||||
webBasePath: /agent-0/
|
||||
serviceId: agent-0
|
||||
database: agent-db-0
|
||||
pgStorage: 5Gi
|
||||
affinity: true # 前端和 DB 必须和后端同节点
|
||||
|
||||
- name: edge-0
|
||||
image: edge
|
||||
role: edge
|
||||
webImage: edge-web
|
||||
webBasePath: /edge-0/
|
||||
serviceId: edge-0
|
||||
database: edge-db-0
|
||||
pgStorage: 5Gi
|
||||
affinity: true
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
# 类型 B:独立不亲和(sso/ultra)— 后端+前端+独立DB,无亲和,多副本
|
||||
# 固定数量,不动态添加
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
standalones:
|
||||
- name: sso
|
||||
image: sso
|
||||
role: sso
|
||||
webImage: sso-web
|
||||
webBasePath: /sso/
|
||||
serviceId: sso
|
||||
database: sso-db
|
||||
pgStorage: 10Gi
|
||||
replicas: 2
|
||||
affinity: false
|
||||
|
||||
- name: ultra
|
||||
image: ultra
|
||||
role: ultra
|
||||
webImage: ultra-web
|
||||
webBasePath: /ultra/
|
||||
database: ultra-db
|
||||
pgStorage: 10Gi
|
||||
replicas: 2
|
||||
affinity: false
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
# 类型 C/D:无独立 DB 的服务
|
||||
# ═══════════════════════════════════════════════════════════════
|
||||
gateway:
|
||||
image: gateway
|
||||
port: 8080
|
||||
replicas: 2
|
||||
rbac: true # serviceAccountName: gateway-sa
|
||||
|
||||
audit:
|
||||
enabled: true
|
||||
image: audit
|
||||
port: 5600
|
||||
replicas: 2
|
||||
|
||||
# ── 共享数据层(非 postgres) ──
|
||||
sharedDatastores:
|
||||
- name: redis
|
||||
image: docker.io/library/redis:8.6
|
||||
port: 6379
|
||||
storage: 2Gi
|
||||
mountPath: /data
|
||||
- name: mongo
|
||||
image: docker.io/library/mongo:8.3
|
||||
port: 27017
|
||||
storage: 5Gi
|
||||
mountPath: /data/db
|
||||
- name: messaging
|
||||
image: docker.io/library/rabbitmq:4.3-management
|
||||
port: 5672
|
||||
storage: 2Gi
|
||||
mountPath: /var/lib/rabbitmq
|
||||
|
||||
# ── 协议模拟器(测试环境) ──
|
||||
mocks:
|
||||
- name: opcua-peripheral
|
||||
image: opcua
|
||||
port: 25006
|
||||
scene: /scenes/opcua/peripheral-plc.json
|
||||
- name: opcua-trimming
|
||||
image: opcua
|
||||
port: 25008
|
||||
scene: /scenes/opcua/trimming-machine.json
|
||||
- name: opcua-meter
|
||||
image: opcua
|
||||
port: 25010
|
||||
scene: /scenes/opcua/meter.json
|
||||
- name: s7-diecast
|
||||
image: s7-diecast
|
||||
port: 11021
|
||||
|
||||
# ── Ingress ──
|
||||
ingress:
|
||||
enabled: true
|
||||
domain: app.mixingx.local
|
||||
Reference in new issue
Block a user