Commit Graph

191 Commits

Author SHA1 Message Date
mac 6ddba9aa03 feat(delivery): restore active MySQL tasks 2026-07-27 15:20:03 +08:00
Hungerdream 41b2f45420 feat(delivery): support multi-instance scheduling on a single host
- Per-host instance limit (DELIVERY_HOST_INSTANCE_LIMIT, default 4)
- Optional target_host to pin a host from the candidate pool
- Regenerate swagger docs
2026-07-27 15:19:44 +08:00
mac e0ee36cadb feat(delivery): switch AWX delivery to callbacks 2026-07-27 15:19:18 +08:00
Hungerdream bfb4f0df4d feat(delivery): complete MySQL version-to-package mapping
- 8.0 from Ubuntu archive, 8.4 from MySQL official APT repo
- 5.6/5.7 not supported for now; enforce one MySQL series per host
- Sync Go version whitelist with the playbook package map
2026-07-27 15:18:54 +08:00
Hungerdream e8e9612527 fix(ansible): use dict-form shell tasks with explicit bash
Free-form split_args breaks on quotes/Jinja at AWX runtime,
and default dash rejects pipefail.
2026-07-27 15:17:46 +08:00
Hungerdream 3c3645f8d5 feat(delivery): extend MySQL delivery parameters and tighten resource bounds
- Add topology/port/data_disk, DB options and 8 advanced parameters
  with whitelist validation, rendered via extra_vars into the playbook
- Hybrid port allocation over pool 13306-13999
- Tighten bounds: memory 2048-65536 MiB, storage 20-2000 GiB
2026-07-27 15:16:57 +08:00
ztkkOip e4596d5662 Merge pull request #106 from 1024XEngineer/feat/base-service-delivery
Fix(base service delivery)任务日志
2026-07-27 09:47:46 +08:00
mac 97f0de16bc chore: tighten authserver docker context 2026-07-23 18:36:40 +08:00
mac a934380c9c feat: switch base delivery to awx task logs 2026-07-23 18:36:24 +08:00
ztkkOip c2a3bbbdc0 Merge pull request #104 from Hungerdream/fix/delivery-review-feedback
fix(delivery): address review feedback on idempotency, crash recovery, and security (#97)
2026-07-23 14:56:24 +08:00
mac f91df3be3d fix(delivery): address review feedback on idempotency, crash recovery, and security
- Idempotency: verify RequestedBy matches caller to prevent cross-user key reuse
- Crash recovery: persist ExecutionJob (launching) before AWX Launch, update to running after
- Terminal state: finish ExecutionJob on success/cancel/failure; failTask accepts canceling
- Reservation TTL: filter expired reservations in quota aggregation
- Ansible heredoc: use <<'EOF' to prevent shell expansion of secrets; escape single quotes
- Validation: align Go resource ranges with playbook (mem 1024-4096, storage 10-100)
- Version whitelist: only allow 8.0, pass mysql_version to AWX extra_vars; playbook selects package via map

Relates-to: #97
2026-07-23 14:39:09 +08:00
ztkkOip b34ebcea83 Merge pull request #102 from Hungerdream/feat/mysql-service-delivery
feat: MySQL 一键交付 (#97)
2026-07-23 14:21:23 +08:00
ztkkOip 96aa493034 Merge branch 'main' into feat/mysql-service-delivery 2026-07-23 14:21:06 +08:00
ztkkOip 22eaa3001e Merge pull request #98 from ztkkOip/auth-login
fix(Auth login) 增加了一些主系统数据抽取
2026-07-23 14:17:53 +08:00
mac c421be3ae9 docs(delivery): add Swagger annotations and regenerate API docs
Add Swagger annotations to all 7 delivery handlers. Fix existing
test.go type references (Response -> response.Response). Add swaggo
dependencies to go.mod. Regenerate swagger.json/yaml/docs.go with
delivery endpoints visible in /swagger/index.html.

Relates-to: #97
2026-07-23 13:50:21 +08:00
mac 5ddb434b74 feat(delivery): add Ansible playbook for native MySQL provisioning
Add mysql-deploy.yml playbook for bare-metal MySQL 8.0 delivery via
AWX: parameter validation, resource preflight checks, apt install,
AppArmor adaptation, per-instance directory layout, Jinja2 config
template (buffer pool sizing, binlog, GTID), systemd template unit
(mysql-delivery@.service), admin account setup, and TCP health
verification. Includes example inventory.

Relates-to: #97
2026-07-23 12:05:07 +08:00
mac 699eaa5225 feat(delivery): add HTTP handlers and route registration
Add DeliveryHandler (7 endpoints under /auth/api/v1/delivery/*):
CreateMySQL, List, Get, Cancel, Targets, CreateTarget, UpsertQuota.
Add ExecutionHandler for internal service callback. Register routes
with JWT auth middleware and start scheduler goroutine when enabled.

Relates-to: #97
2026-07-23 12:04:51 +08:00
mac e11bc6f3d6 feat(delivery): implement delivery scheduler and state machine
Core delivery service with: task creation (idempotent, validated),
background scheduler (claimAndReserve with SELECT FOR UPDATE SKIP
LOCKED), 4-level concurrency control, resource quota enforcement,
host allocation from candidate pool, AWX job dispatch, polling,
TCP health check, instance registration, CloudDM integration
(optional), and cancel support. 11-state machine with optimistic
locking and full event audit trail.

Relates-to: #97
2026-07-23 12:04:37 +08:00
mac 81a94322f7 feat(delivery): add AWX API client
Implement AWXClient with Launch, GetJob, and Cancel methods for
orchestrating Ansible job templates via AWX REST API. Uses Bearer
token auth with 30s timeout. Includes unit tests with mock transport.

Relates-to: #97
2026-07-23 12:04:15 +08:00
mac 76583c6766 feat(delivery): add delivery configuration and environment variables
Add 10 config fields: AWX connection (AWX_BASE_URL, AWX_TOKEN),
scheduler controls (DELIVERY_SCHEDULER_ENABLED, DELIVERY_POLL_SECONDS,
DELIVERY_RESERVATION_TTL_MINUTES), concurrency limits (GLOBAL/TARGET/
BUSINESS), service token, and CloudDM registration (CLOUDDM_REGISTER_URL,
CLOUDDM_API_TOKEN). Update .env.example with new variables.

Relates-to: #97
2026-07-23 12:04:02 +08:00
mac 8676963bac feat(delivery): add delivery data models and auto-migration
Add 8 GORM models for MySQL one-click delivery: DeploymentTarget,
ResourceQuota, DeliveryTask, ResourceReservation, ResourceUsage,
MySQLInstance, ExecutionJob, TaskEvent. Register them in AutoMigrate.

Relates-to: #97
2026-07-23 12:03:47 +08:00
Gmarker689 d191948f6d Merge pull request #99 from Gmaker689/fix/dependabot-alerts-7-8-vite-upgrade
fix: upgrade vite to 6.4.3 to fix launch-editor command injection and…
2026-07-22 17:00:26 +08:00
Gmarker689 a974dd03cb fix: upgrade vite to 6.4.3 to fix launch-editor command injection and fs.deny bypass vulnerabilities
- Fixes Dependabot alert #7 (GHSA-c27g-q93r-2cwf): launch-editor command injection via crafted request on Windows, patched in vite >= 5.4.9
- Fixes Dependabot alert #8 (GHSA-fx2h-pf6j-xcff): server.fs.deny bypass on Windows alternate paths, patched in vite >= 6.4.3
- Upgraded @vitejs/plugin-vue to ^5.2.4 for vite 6 compatibility
- Upgraded vue-tsc to ^2.2.12 for vite 6 compatibility
2026-07-22 16:22:01 +08:00
mac 64f6bf6cea fix(container): avoid duplicate Wayne workload rows 2026-07-22 15:20:33 +08:00
mac c8762619fb chore(frontend): clarify namespace auto binding prompts 2026-07-22 15:05:42 +08:00
mac d150d0f0dd feat(business-line): auto bind Wayne namespace on create 2026-07-22 15:05:41 +08:00
mac 7f6f6fa41e feat(container): show business line workloads from Wayne 2026-07-22 15:05:41 +08:00
ztkkOip 89a23ef60d Merge pull request #95 from ztkkOip/feat/base-service-delivery
Feat(base service delivery)基础服务部署在主系统的初始化
2026-07-22 14:55:44 +08:00
qudder ebf7577e7e Merge pull request #92 from 2311719626/docs/README
docs: 重写 README.md,完善项目文档
2026-07-22 10:55:15 +08:00
ztkkOip 75e1177b70 Merge pull request #94 from 2311719626/fix/upgrade-golang-x-crypto
修复: 升级 golang.org/x/crypto 修复多个 Critical 安全漏洞
2026-07-22 10:29:13 +08:00
wonder 5e47dee022 fix: upgrade golang.org/x/crypto to fix critical security vulnerabilities
- 升级 golang.org/x/crypto 从 v0.40.0 到 v0.54.0
- 修复 FIDO/U2F 安全密钥物理存在检查绕过漏洞
- 修复服务器意外响应导致的死锁问题
- 修复未强制执行 @revoked 状态导致的认证绕过漏洞
- 修复大通道写入导致的无限循环漏洞
- 修复未强制执行调用密钥约束问题
- 修复未删除调用代理约束转发密钥问题
- 修复 VerifiedPublicKeyCallback 权限跳过强制执行问题
- 同步升级相关依赖: x/net v0.56.0, x/sys v0.47.0, x/text v0.40.0, x/sync v0.22.0, x/mod v0.37.0, x/tools v0.47.0
2026-07-22 10:23:33 +08:00
wonder 55addea694 docs: 重写 README.md,完善项目文档
- 新增项目徽章(License、Go、Vue、Element Plus、PRs Welcome)
- 重写核心能力板块:资源纳管、基础服务部署、业务交付、统一认证与审计
- 完善技术栈表格,增加说明列
- 扩充项目结构目录,覆盖前后端完整模块
- 优化快速开始指南,新增构建与部署说明
- 补充 API 文档、开发指南、Git 提交规范
- 新增参与贡献、路线图、许可证等板块
2026-07-22 10:13:57 +08:00
mac 2db8264c8e feat(service): add deployment task integration 2026-07-21 18:26:50 +08:00
mac c324e2ec59 feat(auth): use Wayne native role APIs 2026-07-21 17:05:48 +08:00
ztkkOip b1fa41c24f Merge pull request #90 from ztkkOip/auth-login 子系统赋权初始化
feet(子系统赋权)初始化
2026-07-17 19:35:51 +08:00
mac 981e9557fe feat(frontend): make mock panels follow business line 2026-07-17 19:28:19 +08:00
mac a112cf742c feat(frontend): add Wayne subsystem authorization page 2026-07-17 19:27:33 +08:00
mac 8d49230247 feat(server): add Wayne subsystem authorization APIs 2026-07-17 19:26:40 +08:00
mac add4b1566e chore: refresh generated component types 2026-07-17 16:32:46 +08:00
mac 02716de73a Merge remote-tracking branch 'origin/main' into auth-login 2026-07-17 16:31:46 +08:00
ztkkOip fbe2407217 Merge pull request #86 from 2311719626/feature/modify-frontend-content
feat(frontend): 新增服务管理入口并统一按钮样式
2026-07-17 16:22:24 +08:00
wonder a31f274153 feat(frontend): 新增服务管理入口并统一按钮样式
- 侧边栏「机器管理」下方新增「服务管理」导航项(图标 ◈,badge Consul)
- 服务管理页同步按钮文案改为「同步」,添加 type=primary
- 监控看板刷新按钮改为 el-button type=primary,与全局风格统一
2026-07-17 16:00:06 +08:00
mac a10d4a5921 fix: require Wayne user ID for role binding 2026-07-17 15:47:32 +08:00
wonder c1480f3219 feat(frontend): 将"资源管理"更名为"机器管理"
- 路由路径: resource/management → machine/management
- 路由名称: ResourceManagement → MachineManagement
- 页面标题: 资源管理 → 机器管理
- 侧边栏文案: 资源管理 → 机器管理
- 文件物理路径未改动(views/resource/Management.vue)
2026-07-17 15:46:03 +08:00
ztkkOip bb6b7c0009 Merge pull request #85 from ztkkOip/auth-login
feet(business_line):初始化
2026-07-17 15:17:57 +08:00
mac d9d93fcd20 chore: update generated component types 2026-07-17 15:08:32 +08:00
mac f49b948023 Merge remote-tracking branch 'origin/main' into auth-login 2026-07-17 15:02:47 +08:00
mac d264924d1e feat: add business line permissions and Wayne namespace mapping 2026-07-17 15:02:18 +08:00
ztkkOip edf97eba70 Merge pull request #84 from 2311719626/feature/frontend-page-optimization
feat(frontend): 前端页面整体优化
2026-07-17 14:58:30 +08:00
wonder 3842a81cb2 refactor(router): 统一前端路由命名与层级
## 背景
前端路由存在层级不一致、英文缩写混用、name 与 sidebar 文本不匹配等问题。

## 变更内容
- 统一使用全称命名(Mgmt → Management, Ops → Operation)
- 统一带前缀路径(/cluster → /infrastructure/cluster)
- 合并可观测性模块(/monitor、/alert → /observable/*)
- 修正 router name 与侧边栏中文标题对应关系

## 路由对照
- /tasks → /task/log (TaskLog)
- /resource/mgmt → /resource/management (ResourceManagement)
- /service/mgmt → /service/management (ServiceManagement)
- /audit/ops → /audit/operation (OperationAudit)
- /cluster → /infrastructure/cluster (InfrastructureCluster)
- /tenants → /business/quota (BusinessQuota)
- /monitor → /observable/monitoring (MonitoringDashboard)
- /alert → /observable/alert (AlertInformation)
- /subsystem/authz → /subsystem/authorization (SubsystemAuthorization)
2026-07-17 14:50:41 +08:00