Qwen Cloud Deploy
Quick Path
- Route the task — Match to one of 4 modes: Full-Stack Deploy · Hot Update · Delete · HTTPS Setup.
- Deploy (default) — Execute steps 1→13 in order; each step has a reference doc.
- Confirm cost before creating anything — Show hourly price in USD, get user confirmation.
- Record state — On success write
.qwencloud-deploy.
Scope
| In Scope |
Out of Scope |
| Local project / Git → Alibaba Cloud International |
China site → use qianwenai-deploy |
| Full-stack ROS, hot update, cleanup |
AWS/GCP/Azure/other clouds |
| ECS + optional RDS + OSS + public IP |
K8s/Serverless/container orchestration |
| OAuth/AK auth (no credential collection) |
— |
Assumptions
aliyun CLI 3.x installed; when no valid credential, follow reference/deploy/01_env_check.md.
- Default region
ap-southeast-1 (Singapore).
Task Routing
| Signal |
Mode |
.qwencloud-deploy exists + user says "update" |
Hot Update |
.qwencloud-deploy exists + "delete"/"cleanup" |
Delete |
| "bind domain"/"HTTPS"/"SSL" (deployment exists) |
HTTPS Setup |
| Git URL or local project (no existing deployment) |
Full-Stack Deploy |
On trigger, display welcome message first (see reference/rules/rule_interaction.md).
Full-Stack Deploy (Steps 1–13)
Phase 1 · Preparation
| Step |
Action |
Reference |
| 1 |
Environment check |
reference/deploy/01_env_check.md |
| 2 |
Git clone (if Git URL) |
reference/deploy/02_git_clone.md |
| 3 |
Project analysis |
reference/deploy/03_analyze_project.md |
Phase 2 · Resource Planning
| Step |
Action |
Reference |
| 4 |
Existing deployment scan |
reference/deploy/04_check_existing.md |
| 5 |
Database identification |
reference/deploy/05_database.md |
| 6 |
ECS instance type selection |
reference/deploy/06_instance_type.md |
| 7 |
Generate ROS template |
reference/deploy/07_generate_template.md |
| 8 |
Stock check |
reference/deploy/08_check_stock.md |
| 9 |
Template validation + cost estimate |
reference/deploy/09_estimate_cost.md |
Phase 3 · Execution
| Step |
Action |
Reference |
| 10 |
Upload artifacts + regenerate template |
reference/deploy/10_upload_artifacts.md |
| 11 |
Create stack |
reference/deploy/11_create_stack.md |
| 12 |
Wait for terminal state + health check |
reference/deploy/12_wait_stack.md |
| 13 |
Record state |
reference/deploy/13_record_state.md |
Hot Update
Trigger: .qwencloud-deploy exists + user wants to update code. IP unchanged.
| Step |
Action |
Reference |
| U1 |
Build + upload new artifacts |
reference/deploy/10_upload_artifacts.md |
| U2 |
Deliver update (Cloud Assistant) |
reference/hotfix/update_app.md |
| U3 |
Health check + update state |
reference/hotfix/update_app.md |
Update script template: reference/hotfix/update_recipe.md.
Delete / Cleanup
Trigger: User says "delete", "cleanup", "release resources".
⚠️ Irreversible — confirm twice. With RDS: warn about data loss.
🚫 Never manually delete individual resources — only use delete_stack.sh.
See reference/cleanup/delete_stack.md.
HTTPS Setup (Optional)
Trigger: User says "bind domain" / "HTTPS" / "SSL" after deployment exists.
See reference/https/https_setup.md.
Key Constraints
| Constraint |
Rule |
| Currency |
Always USD |
| Auth |
OAuth (recommended) or AK/SK; never collect credentials via chat |
| Template upload |
Must use --TemplateURL (WAF blocks TemplateBody) |
| Stack name retry |
Reuse — never regenerate |
| Resource deletion |
Always via delete_stack.sh |
| Region default |
ap-southeast-1 |
| Commands to user |
Never show underlying commands |
File Layout
scripts/
generate_template.py upload_artifacts.py
create_stack.sh record_state.py
delete_stack.sh update_app.sh
wait_and_probe.py setup_domain.sh
reference/
deploy/
01_env_check.md ~ 13_record_state.md
hotfix/
update_app.md update_recipe.md
cleanup/
delete_stack.md
https/
https_setup.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
1---2name: qwencloud-deploy3version: "2.2"4description: >-5 One-click deploy, publish, and update a local project or Git repository to Alibaba Cloud6 International (alibabacloud.com), producing an accessible online service with a public IP.7 Supports full-stack ROS orchestration, automatic cloud-resource provisioning, pre-deployment8 price confirmation, service health checks, deployment-state recording, hot updates, and9 optional domain + HTTPS setup.10 Use when: the user asks to deploy a project to the cloud, put an app online, publish a11 website, generate an access URL, deploy a Git repo, or update an online version and has NOT12 named a specific cloud platform; or the user mentions "Alibaba Cloud", "alibabacloud.com",13 or the international site.14 Do not use when: the user explicitly targets Aliyun China (aliyun.com), AWS, GCP, Azure, or15 another specific cloud platform.16trigger: >-17 Use when the user asks to deploy a project to the cloud, put an app online, publish a website,18 generate an access URL, deploy a Git repo, or update an online version — and has NOT specified19 a particular cloud platform. Also use when the user mentions "Alibaba Cloud", "alibabacloud.com",20 or the international site.21skip: >-22 Do NOT use when the user explicitly targets Aliyun China (aliyun.com), AWS, GCP, Azure,23 or another specific cloud platform.24prerequisites:25 - aliyun CLI 3.x configured with international-site credentials in OAuth mode26input: >-27 A local project directory, Git URL, or an existing deployment state file (.qwencloud-deploy).28 Optional: user preferences for instance type, region, database.29output: >-30 A running cloud service with public IP (or domain + HTTPS), deployment state file31 (.qwencloud-deploy), and success card with access URL, cost summary, and next-step guidance.32capability_tier: fed-multimodal-vision33ecology_state: WARM34---3536# Qwen Cloud Deploy3738## Quick Path39401. **Route the task** — Match to one of 4 modes: Full-Stack Deploy · Hot Update · Delete · HTTPS Setup.412. **Deploy (default)** — Execute steps 1→13 in order; each step has a reference doc.423. **Confirm cost before creating anything** — Show hourly price in USD, get user confirmation.434. **Record state** — On success write `.qwencloud-deploy`.4445## Scope4647| In Scope | Out of Scope |48|----------|--------------|49| Local project / Git → Alibaba Cloud International | China site → use `qianwenai-deploy` |50| Full-stack ROS, hot update, cleanup | AWS/GCP/Azure/other clouds |51| ECS + optional RDS + OSS + public IP | K8s/Serverless/container orchestration |52| OAuth/AK auth (no credential collection) | — |5354## Assumptions5556- `aliyun` CLI 3.x installed; when no valid credential, follow `reference/deploy/01_env_check.md`.57- Default region `ap-southeast-1` (Singapore).5859---6061## Task Routing6263| Signal | Mode |64|--------|------|65| `.qwencloud-deploy` exists + user says "update" | **Hot Update** |66| `.qwencloud-deploy` exists + "delete"/"cleanup" | **Delete** |67| "bind domain"/"HTTPS"/"SSL" (deployment exists) | **HTTPS Setup** |68| Git URL or local project (no existing deployment) | **Full-Stack Deploy** |6970On trigger, display welcome message first (see `reference/rules/rule_interaction.md`).7172---7374## Full-Stack Deploy (Steps 1–13)7576### Phase 1 · Preparation7778| Step | Action | Reference |79|------|--------|-----------|80| 1 | Environment check | `reference/deploy/01_env_check.md` |81| 2 | Git clone (if Git URL) | `reference/deploy/02_git_clone.md` |82| 3 | Project analysis | `reference/deploy/03_analyze_project.md` |8384### Phase 2 · Resource Planning8586| Step | Action | Reference |87|------|--------|-----------|88| 4 | Existing deployment scan | `reference/deploy/04_check_existing.md` |89| 5 | Database identification | `reference/deploy/05_database.md` |90| 6 | ECS instance type selection | `reference/deploy/06_instance_type.md` |91| 7 | Generate ROS template | `reference/deploy/07_generate_template.md` |92| 8 | Stock check | `reference/deploy/08_check_stock.md` |93| 9 | Template validation + cost estimate | `reference/deploy/09_estimate_cost.md` |9495### Phase 3 · Execution9697| Step | Action | Reference |98|------|--------|-----------|99| 10 | Upload artifacts + regenerate template | `reference/deploy/10_upload_artifacts.md` |100| 11 | Create stack | `reference/deploy/11_create_stack.md` |101| 12 | Wait for terminal state + health check | `reference/deploy/12_wait_stack.md` |102| 13 | Record state | `reference/deploy/13_record_state.md` |103104---105106## Hot Update107108**Trigger**: `.qwencloud-deploy` exists + user wants to update code. IP unchanged.109110| Step | Action | Reference |111|------|--------|-----------|112| U1 | Build + upload new artifacts | `reference/deploy/10_upload_artifacts.md` |113| U2 | Deliver update (Cloud Assistant) | `reference/hotfix/update_app.md` |114| U3 | Health check + update state | `reference/hotfix/update_app.md` |115116Update script template: `reference/hotfix/update_recipe.md`.117118---119120## Delete / Cleanup121122**Trigger**: User says "delete", "cleanup", "release resources".123124> ⚠️ Irreversible — confirm twice. With RDS: warn about data loss.125126> 🚫 Never manually delete individual resources — only use `delete_stack.sh`.127128See `reference/cleanup/delete_stack.md`.129130---131132## HTTPS Setup (Optional)133134**Trigger**: User says "bind domain" / "HTTPS" / "SSL" after deployment exists.135136See `reference/https/https_setup.md`.137138---139140## Key Constraints141142| Constraint | Rule |143|------------|------|144| Currency | Always USD |145| Auth | OAuth (recommended) or AK/SK; never collect credentials via chat |146| Template upload | Must use `--TemplateURL` (WAF blocks TemplateBody) |147| Stack name retry | Reuse — never regenerate |148| Resource deletion | Always via `delete_stack.sh` |149| Region default | `ap-southeast-1` |150| Commands to user | Never show underlying commands |151152---153154## File Layout155156```157scripts/158 generate_template.py upload_artifacts.py159 create_stack.sh record_state.py160 delete_stack.sh update_app.sh161 wait_and_probe.py setup_domain.sh162reference/163 deploy/164 01_env_check.md ~ 13_record_state.md165 hotfix/166 update_app.md update_recipe.md167 cleanup/168 delete_stack.md169 https/170 https_setup.md171 rules/172 rule_interaction.md rule_error_handling.md173templates/174 ros_single[_rds].yaml175 userdata/{systemd,docker,nginx_proxy,nginx_static,nginx_static_proxy}.sh176```