121 lines
3.7 KiB
YAML
121 lines
3.7 KiB
YAML
|
|
# ============================================
|
|
# AI Agent Task Manifest
|
|
# DevOps + AI Flow 自动实施任务清单
|
|
# ============================================
|
|
|
|
metadata:
|
|
version: 1.0
|
|
author: LingJingWanXiang AI Infra Team
|
|
description: >
|
|
用于 Qwen / Claude / Cursor Agent 自动部署、验证、优化 devops-ai-stack。
|
|
包含初始化、配置验证、AI Flow 联调、任务注册、性能检测等阶段。
|
|
estimated_duration: 30min
|
|
|
|
tasks:
|
|
- name: ensure_environment_ready
|
|
description: 检查 Docker、Compose、mkcert 是否安装
|
|
action: shell
|
|
cmd: |
|
|
docker --version
|
|
docker compose version
|
|
mkcert -version
|
|
|
|
- name: generate_tls_certs
|
|
description: 生成本地 *.dev.lan 开发证书
|
|
action: shell
|
|
cmd: bash infra/scripts/mkcert-init.sh
|
|
|
|
- name: buildx_setup
|
|
description: 初始化 Docker 多架构 Builder
|
|
action: shell
|
|
cmd: bash infra/scripts/buildx-setup.sh
|
|
|
|
- name: start_core_services
|
|
description: 启动 Traefik、Gitea、Registry 核心服务
|
|
action: shell
|
|
cmd: docker compose -f infra/compose/core.yml up -d
|
|
|
|
- name: start_cache_and_observability
|
|
description: 启动缓存与监控模块
|
|
action: shell
|
|
cmd: |
|
|
docker compose -f infra/compose/dev-cache.yml up -d
|
|
docker compose -f infra/compose/observability.yml up -d
|
|
|
|
- name: start_ai_and_taskflow
|
|
description: 启动 AI Flow 与 Prefect 任务流
|
|
action: shell
|
|
cmd: |
|
|
docker compose -f infra/compose/ai.yml up -d
|
|
docker compose -f infra/compose/ai-visual.yml up -d
|
|
docker compose -f infra/compose/taskflow.yml up -d
|
|
|
|
- name: verify_routes
|
|
description: 检查 Traefik 路由是否生效
|
|
action: curl
|
|
urls:
|
|
- https://traefik.dev.lan
|
|
- https://git.dev.lan
|
|
- https://grafana.dev.lan
|
|
|
|
- name: verify_ai_services
|
|
description: 验证 LiteLLM / Langfuse / MLflow / Prefect 服务可用
|
|
action: curl
|
|
urls:
|
|
- https://ai.dev.lan/v1/models
|
|
- https://langfuse.dev.lan
|
|
- https://mlflow.dev.lan
|
|
- https://prefect.dev.lan
|
|
|
|
- name: test_ai_request
|
|
description: 测试 LiteLLM 模型接口调用
|
|
action: curl
|
|
cmd: >
|
|
curl -k -X POST https://ai.dev.lan/v1/chat/completions
|
|
-H "Authorization: Bearer dev_local_key"
|
|
-H "Content-Type: application/json"
|
|
-d '{"model":"qwen3-coder:32b","messages":[{"role":"user","content":"hello"}]}'
|
|
|
|
- name: check_langfuse_logs
|
|
description: 验证 Langfuse 是否记录了调用链
|
|
action: shell
|
|
cmd: docker logs $(docker ps -qf "name=langfuse") | tail -n 20
|
|
|
|
- name: run_prefect_demo_flow
|
|
description: 执行 Prefect 示例任务
|
|
action: shell
|
|
cmd: python tasks/example_health_flow.py
|
|
|
|
- name: verify_prefect_run
|
|
description: 在 UI 中确认 Flow 可视化执行成功
|
|
action: open_url
|
|
url: https://prefect.dev.lan
|
|
|
|
- name: validate_grafana_dashboards
|
|
description: 检查 Grafana 面板加载情况
|
|
action: curl
|
|
urls:
|
|
- https://grafana.dev.lan/api/health
|
|
- https://grafana.dev.lan/dashboards
|
|
|
|
- name: check_prometheus_targets
|
|
description: 验证 Prometheus 抓取目标状态
|
|
action: shell
|
|
cmd: curl -s http://localhost:9090/api/v1/targets | jq '.data.activeTargets | length'
|
|
|
|
- name: apply_bluebook_recommendations
|
|
description: 阅读并实施 DevOps 优化蓝皮书中标注为 HIGH 的项
|
|
action: read_and_execute
|
|
source: docs/bluebook/DevOps-Optimization-Bluebook.md
|
|
filter: priority=HIGH
|
|
|
|
- name: report_system_status
|
|
description: 生成运行状态汇总
|
|
action: summarize
|
|
outputs:
|
|
- running_containers
|
|
- failed_services
|
|
- log_summary
|
|
- optimization_recommendations
|