qianwenai-deploy
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese千问 AI 云部署
Qwen AI Cloud Deployment
快速路径
Quick Path
- 路由任务 — 匹配到 3 种模式之一:全栈部署 · 热更新 · 删除/清理。
- 部署(默认) — 按步骤 1→13 执行,每步有对应 reference 文档。
- 创建资源前确认费用 — 人民币(¥)展示小时单价,取得用户确认。
- 记录状态 — 成功后写入 。
.qianwenai-deploy
- Route Task — Match one of three modes: Full-Stack Deployment · Hot Update · Delete/Cleanup.
- Deployment (Default) — Execute in steps 1→13, with corresponding reference documents for each step.
- Confirm Cost Before Resource Creation — Display hourly unit price in RMB (¥), obtain user confirmation.
- Record Status — Write to after success.
.qianwenai-deploy
范围
Scope
| 范围内 | 范围外 |
|---|---|
| 本地项目/Git → 阿里云国内站 | 国际站 → 用 |
| 全栈 ROS 编排、热更新、清理 | AWS/GCP/Azure/其他云 |
| ECS + 可选 RDS + OSS + 公网 IP | K8s/Serverless/容器编排 |
| OAuth/AK 认证(不收集凭证) | 域名/HTTPS(不涉及) |
| In Scope | Out of Scope |
|---|---|
| Local project/Git → Alibaba Cloud China site | International site → Use |
| Full-stack ROS orchestration, hot update, cleanup | AWS/GCP/Azure/other clouds |
| ECS + optional RDS + OSS + Public IP | K8s/Serverless/container orchestration |
| OAuth/AK authentication (no credential collection) | Domain/HTTPS (not involved) |
假设
Assumptions
- CLI 3.x 已安装;无有效凭证时按
aliyun引导认证。reference/deploy/01_env_check.md - 默认地域 。
cn-hangzhou
- CLI 3.x is installed; guide authentication according to
aliyunwhen no valid credentials exist.reference/deploy/01_env_check.md - Default region is .
cn-hangzhou
入口路由
Entry Routing
| 信号 | 模式 |
|---|---|
存在 | 热更新 |
存在 | 删除 |
| Git URL 或本地项目(无已有部署) | 全栈部署 |
触发时先展示欢迎话术(见 )。
reference/rules/rule_interaction.md| Signal | Mode |
|---|---|
| Hot Update |
| Delete |
| Git URL or local project (no existing deployment) | Full-Stack Deployment |
Display welcome message first when triggered (see ).
reference/rules/rule_interaction.md全栈部署(步骤 1–13)
Full-Stack Deployment (Steps 1–13)
阶段 1 · 准备
Phase 1 · Preparation
| 步骤 | 动作 | 参考文档 |
|---|---|---|
| 1 | 环境检查 | |
| 2 | Git clone(Git URL 时) | |
| 3 | 项目分析 | |
| Step | Action | Reference Document |
|---|---|---|
| 1 | Environment Check | |
| 2 | Git clone (for Git URL) | |
| 3 | Project Analysis | |
阶段 2 · 资源规划
Phase 2 · Resource Planning
| 步骤 | 动作 | 参考文档 |
|---|---|---|
| 4 | 存量部署扫描 | |
| 5 | 数据库识别 | |
| 6 | ECS 规格选择 | |
| 7 | 生成 ROS 模板 | |
| 8 | 库存检查 | |
| 9 | 模板验证 + 询价确认 | |
| Step | Action | Reference Document |
|---|---|---|
| 4 | Existing Deployment Scan | |
| 5 | Database Identification | |
| 6 | ECS Specification Selection | |
| 7 | Generate ROS Template | |
| 8 | Stock Check | |
| 9 | Template Validation + Cost Inquiry Confirmation | |
阶段 3 · 执行
Phase 3 · Execution
| 步骤 | 动作 | 参考文档 |
|---|---|---|
| 10 | 上传产物 + 重新生成模板 | |
| 11 | 创建栈 | |
| 12 | 等待终态 + 探活 | |
| 13 | 记录状态 | |
| Step | Action | Reference Document |
|---|---|---|
| 10 | Upload Artifacts + Regenerate Template | |
| 11 | Create Stack | |
| 12 | Wait for Final State + Health Check | |
| 13 | Record Status | |
热更新
Hot Update
触发:存在 + 用户想更新代码。IP 不变。
.qianwenai-deploy| 步骤 | 动作 | 参考文档 |
|---|---|---|
| U1 | 构建 + 上传新产物 | |
| U2 | 下发更新(Cloud Assistant) | |
| U3 | 探活 + 更新状态 | |
更新脚本模板见 。
reference/hotfix/update_recipe.mdTrigger: exists + user wants to update code. IP remains unchanged.
.qianwenai-deploy| Step | Action | Reference Document |
|---|---|---|
| U1 | Build + Upload New Artifacts | |
| U2 | Deliver Update (Cloud Assistant) | |
| U3 | Health Check + Update Status | |
Update script template is in .
reference/hotfix/update_recipe.md删除 / 清理
Delete / Cleanup
触发:用户说「删除」「清理」「释放资源」。
⚠️ 不可逆 — 二次确认。含 RDS 时警告数据丢失。
🚫 严禁手动逐个删资源,只用。delete_stack.sh
详见 。
reference/cleanup/delete_stack.mdTrigger: User says "delete", "cleanup", "release resources".
⚠️ Irreversible — Double confirmation. Warn about data loss when RDS is included.
🚫 Forbidden to delete resources one by one manually, only use.delete_stack.sh
See details in .
reference/cleanup/delete_stack.md关键约束
Key Constraints
| 约束 | 规则 |
|---|---|
| 币种 | 人民币(¥) |
| 认证 | OAuth(推荐)或 AK/SK,不通过聊天收集凭证 |
| 模板上传 | 必须 |
| 栈名重试 | 复用,绝不重新生成 |
| 资源删除 | 始终通过 |
| 敏感信息 | 分析后检查硬编码密钥并警告 |
| 命令展示 | 不向用户展示底层命令 |
| Constraint | Rule |
|---|---|
| Currency | RMB (¥) |
| Authentication | OAuth (recommended) or AK/SK, no credential collection via chat |
| Template Upload | Must use |
| Stack Name Retry | Reuse, never regenerate |
| Resource Deletion | Always use |
| Sensitive Information | Check for hardcoded keys after analysis and warn |
| Command Display | Do not show underlying commands to users |
文件布局
File Structure
scripts/
generate_template.py upload_artifacts.py
create_stack.sh record_state.py
delete_stack.sh update_app.sh
wait_and_probe.py
reference/
deploy/
01_env_check.md ~ 13_record_state.md
hotfix/
update_app.md update_recipe.md
cleanup/
delete_stack.md
rules/
rule_interaction.md rule_error_handling.md
templates/
ros_single[_rds].yaml
userdata/{systemd,docker,nginx_proxy,nginx_static,nginx_static_proxy}.shscripts/
generate_template.py upload_artifacts.py
create_stack.sh record_state.py
delete_stack.sh update_app.sh
wait_and_probe.py
reference/
deploy/
01_env_check.md ~ 13_record_state.md
hotfix/
update_app.md update_recipe.md
cleanup/
delete_stack.md
rules/
rule_interaction.md rule_error_handling.md
templates/
ros_single[_rds].yaml
userdata/{systemd,docker,nginx_proxy,nginx_static,nginx_static_proxy}.sh