alibabacloud-ecs-code-deploy
基于 aliyun appmanager 一键把项目代码部署到阿里云 ECS 云服务器,覆盖环境预检、询价、部署、日志验证、失败诊断重试全流程。支持 App / AI Agent(LangChain / AutoGen / AgentScope / MCP / FastAPI / Flask / Spring Boot 等),新建或已有 ECS 实例,自动处理分组冲突、zip 解压、余额不足、地域参数透传、重复部署免初始化。触发词:部署到ECS、部署项目到ECS、部署到云服务器、把这个项目部署上去、上线到ECS、把仓库部署到ECS、当前目录部署、阿里云ECS部署、appmanager部署、aliyun appmanager、一键部署App、部署AI Agent、deploy to ECS、code deploy、deploy app、deploy agent、appmanager deploy、ECS code deploy、跑一下这个项目、把代码跑到ECS上、ECS上线。 Skill: alibabacloud-ecs-code-deploy Owner: sdk-team Summary: 基于 aliyun appmanager 一键把项目代码部署到阿里云 ECS 云服务器,覆盖环境预检、询价、部署、日志验证、失败诊断重试全流程。支持 App / AI Agent(LangChain / AutoGen / AgentScope / MCP / FastAPI / Flask / Spring Boot 等),新建或已有 ECS 实例,自动处理分组冲突、zip 解压、余额不足、地域参数透传、重复部署免初始化。触发词:部署到ECS、部署项目到ECS、部署到云服务器、把这个项目部署上去、上线到ECS、把仓库部署到ECS、当前目录部署、阿里云ECS部署、appmanager部署、aliyun appmanager、一键部署App、部署AI Agent、deploy to ECS、code deplo
Rank
62
Safety
84
Downloads
1.1k
Updated
Oct 11, 2026
Version
1.0.3
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 11, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 11, 2026
- Adoption signal
- 1.1K downloadsadoption · observed Oct 11, 2026
- Latest release
- 1.0.3release · observed Aug 13, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s173swjet2yrebzqrp6hjkvmy583mxef:alibabacloud-ecs-code-deploy- Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-ecs-code-deploy/snapshot"
Documentation
CLAWHUB
145,718 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
--- name: alibabacloud-ecs-code-deploy description: 基于 aliyun appmanager 一键把项目代码部署到阿里云 ECS 云服务器,覆盖环境预检、询价、部署、日志验证、失败诊断重试全流程。支持 App / AI Agent(LangChain / AutoGen / AgentScope / MCP / FastAPI / Flask / Spring Boot 等),新建或已有 ECS 实例,自动处理分组冲突、zip 解压、余额不足、地域参数透传、重复部署免初始化。触发词:部署到ECS、部署项目到ECS、部署到云服务器、把这个项目部署上去、上线到ECS、把仓库部署到ECS、当前目录部署、阿里云ECS部署、appmanager部署、aliyun appmanager、一键部署App、部署AI Agent、deploy to ECS、code deploy、deploy app、deploy agent、appmanager deploy、ECS code deploy、跑一下这个项目、把代码跑到ECS上、ECS上线。 --- # Deploy to Alibaba Cloud ECS via aliyun appmanager ## Overview `aliyun appmanager` is an Agent-friendly CLI tool for one-click deployment of applications (App) and AI Agents to Alibaba Cloud ECS. It supports non-interactive mode (`--non-interactive`), structured JSON output (`--output json`), and streaming NDJSON responses. **Default behavior**: When user invokes `/alibabacloud-ecs-code-deploy` without specifying a project path or URL, deploy the **current working directory** project to Alibaba Cloud ECS. If user provides a git URL, clone it to the current directory first, then `cd` into the cloned directory and proceed with deployment. > **EXECUTION ORDER**: The Agent MUST follow the "Complete Deployment Workflow" section at the bottom of this document for the correct execution sequence. The Task sections below are organized by topic for reference — their numbering does NOT imply execution order. --- ## MANDATORY: Create Todo List Before Starting **Before executing any step**, the Agent MUST create a todo list with ALL of the following items. Do NOT omit any item. Do NOT start deployment until the todo list is created. ``` Todo list (Deploy to Alibaba Cloud ECS): [ ] 0. Resolve $SKILL_DIR (cross-platform path — MUST run first; see "Step 0" below) [ ] 1. Environment pre-check (MUST run deploy_toolkit.py check; manual commands FORBIDDEN as replacement) [ ] 2. Obtain project (clone git URL here if needed; skip for local projects) ── Check whether .appmanager/config.yaml already exists (repeat-deploy shortcut) ── │ Exists + new ECS (no instanceId) → skip 3-5, start from 5.5 (price check) │ Exists + existing ECS (has instanceId) → skip 3-5.5, jump to 6 (deploy) │ Does not exist → proceed normally from 3 ─────────────────────────────────────────────────────────────────────────────── [ ] 3. Read project (README.md -> quick-deploy method) + identify type (agent / app) [ ] 4. Ask user for deployment config (region + new ECS / existing ECS) [ ] 5. Init + generate scripts (appmanager init -> write start/stop scripts to config.yaml) [ ] 5.5. Pre-deploy price check + risk warning (MUST run deploy_toolkit.py price; confirm price / OSS billing / existing-ECS impact / group overwrite item by item) [ ] 6. Deploy (MUST run deploy_toolkit.py deploy; manual deploy command FORBIDDEN as replacement) [ ] 7. Verify (MUST run deploy_toolkit.py verify; manual status command FORBIDDEN as replacement) [ ] 8. Outp
_meta.json
{
"ownerId": "kn74p5w8ywv6prh40g0s82gmqh83nw54",
"slug": "alibabacloud-ecs-code-deploy",
"version": "1.0.3",
"publishedAt": 1786586602919
}references/deploy-output-and-management.md
# Deploy Output & Management Reference
## Common Deploy Options
| Flag | Description |
|------|-------------|
| `--config PATH` | Custom config file (default: `.appmanager/config.yaml`) |
| `--overwrite` | Force overwrite existing files in OSS |
| `--dry-run` | Validate only, do not execute deployment |
| `--output json` | Output NDJSON stream (Agent-friendly) |
| `--name TEXT` | Override app name |
| `--group_name TEXT` | Override group name |
| `--region TEXT` | Override deployment region |
| `--revision_id TEXT` | Redeploy using existing artifact |
### Deploy output format
`--overwrite --output json` is the **standard deploy invocation**. Always use both flags.
Output format (NDJSON, one JSON per line):
```
{"type":"step", "step":1, "total":9, "message":"Validating config..."}
{"type":"step", "step":2, "total":9, "message":"Uploading to OSS..."}
{"type":"result", "status":"success", "data":{"revision_id":"rev-xxx", ...}}
```
---
## MANDATORY: Post-deploy Output
When the self-check passes (all items OK), output the following to the user:
### 1. Deployment summary table
Includes app name, deployment region, group name, deployment status, Revision ID, and ECS instance ID.
### 2. Console link
Read the `console_url` field from the deploy result; if missing, build the URL with the formats below:
- On success: `https://computenest.console.aliyun.com/app/detail?tabKey=overview&appName=<APP_NAME>&groupName=<GROUP_NAME>`
- On failure / pending confirmation (ReleaseWaiting, script execution failure, etc.): `https://computenest.console.aliyun.com/app/detail?tabKey=flow&appName=<APP_NAME>&groupName=<GROUP_NAME>` (jumps to the execution-flow page)
### 3. Resource cost reminder (MUST include the delete command)
> Resource cost reminder: this deployment uses ECS instances and OSS storage (pay-as-you-go). Delete the resources when you no longer need them to avoid recurring charges:
> ```bash
> aliyun appmanager <agent|app> delete --name <APP_NAME> --group_name <GROUP_NAME>
> ```
### 4. Status query command
> ```bash
> aliyun appmanager <agent|app> status --name <APP_NAME> --group_name <GROUP_NAME>
> ```
### 5. Usage guidance
The Agent MUST tailor the usage guidance to the project type and the deploy log:
| Project usage type | Detection signal | Usage guidance |
|--------------------|------------------|----------------|
| **Web service** (HTTP listener) | Deploy log shows "Listening on port X"; project uses flask / fastapi / express / spring / django | Provide access URL: `http://<ECS_PUBLIC_IP>:<PORT>` (extract ECS public IP from `status` output) |
| **API service** | Project defines REST / GraphQL endpoints | Provide API base URL + sample `curl` command |
| **CLI tool / library** | Project is a command-line tool, SDK, or library (e.g. agentscope) | Provide SSH login command + a verification command |
| **Background service / worker** | Project is a queue consumer, scheduled job, or daemon | Inform the user the service is running in backgroreferences/init-and-credentials.md
# Init & Credentials Reference
## Observability: User-Agent Injection (MANDATORY before any CLI call)
> **⛔ Every `aliyun` CLI call MUST carry this skill's User-Agent** so all API requests are traceable in cloud-side logs. Export the UA env var ONCE at session start, before any `aliyun` / `deploy_toolkit.py` invocation.
**Full UA template:**
```
AlibabaCloud-Agent-Skills/alibabacloud-ecs-code-deploy/{session-id}
```
**session-id unified rules:**
- Generate ONCE per agent session: `SESSION_ID=$(uuidgen | tr '[:upper:]' '[:lower:]')` — lowercase UUID (any lowercase-hex random token ≥ 16 chars is equivalent).
- Reuse the SAME session-id for ALL CLI calls within the session — NEVER regenerate per command, otherwise one deployment scatters into untraceable fragments.
**Injection method (modern — env var):**
```bash
# Run ONCE per session (persistent shell); or prefix each command with the same literal value
export SESSION_ID=$(uuidgen | tr '[:upper:]' '[:lower:]')
export ALIBABA_CLOUD_USER_AGENT="AlibabaCloud-Agent-Skills/alibabacloud-ecs-code-deploy/${SESSION_ID}"
```
> ⛔ The legacy `aliyun configure ai-mode enable / set-user-agent / show / disable` mechanism is DEPRECATED — do NOT use it. Do NOT combine `ALIBABA_CLOUD_USER_AGENT` with ai-mode or per-command env prefixes for the same skill token: the CLI stacks these sources and produces duplicate UAs. Set the env var ONCE per session and leave it.
---
## CLI Install/Upgrade Method Priority
> Avoid the "repeated upgrade" pitfall: `/usr/local/bin/` is often shadowed by earlier PATH entries like `/opt/homebrew/bin`.
**On Linux/macOS (Unix):**
1. brew-managed (`check` prints "managed by Homebrew") -> `brew upgrade aliyun-cli`; do NOT overwrite `/usr/local/bin/` again.
2. sudo available -> overwrite into `/usr/local/bin/`, then verify: `hash -r && which -a aliyun && aliyun version`.
3. No sudo -> install to `~/bin/`, ask user to approve appending `export PATH="$HOME/bin:$PATH"` to `~/.zshrc` / `~/.bashrc`.
**On Windows (PowerShell)** — no `brew`/`sudo`/`.zshrc`; `check` auto-detects `os.name == "nt"` and prints PowerShell guidance:
1. Scoop/Chocolatey managed -> `scoop update aliyun-cli` or `choco upgrade aliyun-cli -y`.
2. Otherwise download the official zip and extract into `%USERPROFILE%\bin` (no admin rights), then persist the **User** PATH via `[Environment]::SetEnvironmentVariable("PATH", "$dest;$userPath", "User")` (full snippet in the "Windows (PowerShell) install" section below).
3. After install/upgrade, open a **NEW** terminal so the updated User PATH takes effect, then re-run check.
After install/upgrade, ALWAYS rerun `deploy_toolkit.py check` to confirm. On Unix, if `which -a aliyun` still shows the old binary first, fix PATH order — DO NOT repeat the same overwrite.
---
## Fallback: Manual CLI Verification & Install (only when deploy_toolkit.py unavailable)
**Version requirements**: aliyun CLI >= 3.3.19, appmanager-cli >= 1.1.1
> **🪟 Windows users**: The `curl | sudo tar references/lessons-learned.md
# Lessons Learned — Deployment Failure Patterns & Fixes
> This document is auto-populated by the batch deployment test (see `tests/batch-deploy-100.md`).
> When an Agent encounters a deployment issue, it SHOULD consult this file first for known
> patterns and proven fixes before attempting ad-hoc troubleshooting.
## How to Use This File
1. **Before deploying**: Skim the error signatures below. If the project matches a known
trigger scenario, apply the fix proactively.
2. **After a failure**: Search this file for the error message or signature. If found,
apply the documented fix and retry.
3. **Contributing new lessons**: When a new failure pattern is observed >= 2 times across
different projects, add a new entry following the format below.
## Entry Format
Each lesson follows this structure:
```markdown
### <Error Signature>
- **Phase**: check / init / deploy / verify
- **Trigger Scenario**: <what type of project or condition triggers this>
- **Symptom**: <exact error message or observable behavior>
- **Root Cause**: <why it happens>
- **Fix**: <what the Agent should do — specific commands or decision changes>
- **Affected Projects**: <list of test project numbers/names that hit this>
- **First Observed**: <date or test round>
```
---
## Lessons
(The following entries are auto-appended by the Agent during batch deployment testing.
Do not manually edit below this line unless correcting an inaccuracy.)
---
### `Java-Build-Use-Release-JAR`
- **Phase**: deploy / verify
- **Trigger Scenario**: Spring Boot or any Java/Gradle/Maven project on 2C4G ECS where `appmanager init` generated a default start script and the project requires `mvn package` / `gradle bootJar` to produce a runnable JAR.
- **Symptom**:
- Round 1: `Error: Unable to access jarfile *.jar` (default `java -jar *.jar` finds no JAR in the cloned source tree).
- Round 2 (if Agent retries with `gradle bootJar`): `ReleaseFailed` or `ReleaseCancelled` after the 15-minute deploy budget elapses; `gradle clean bootJar` typically OOM's or runs >15 min on 2 vCPU + 4 GiB RAM.
- **Root Cause**: 2C4G is too small to build large Java projects in the deploy window.
- **Fix**: Skip source build. Replace `common.scripts.start` with the pattern below. NOTE: `<app>.jar` and `<version>` are placeholders — substitute the target project's own release artifact name and version (validated concrete example: halo project, `<app>` = `halo`, `<version>` = `2.20.12`):
```yaml
common:
scripts:
start: |
: > /root/app.log
mkdir -p /root && cd /root
if [ ! -f <app>.jar ]; then
curl -fSL "https://github.com/<owner>/<repo>/releases/download/v<version>/<app>-<version>.jar" -o /root/<app>.jar
fi
pkill -f '<app>.jar' || true
nohup java -Xmx384m -jar /root/<app>.jar --server.port=8090 >> /root/app.log 2>&1 &
```
Always set `-Xmx` ≤ 384 m (heap > 50 % of 4 GiB triggers OOM-killer when paired with the JVM's other memory regions).
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/sdk-team/skills/alibabacloud-ecs-code-deploy",
"sourceUrl": "https://clawhub.ai/sdk-team/skills/alibabacloud-ecs-code-deploy",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T07:30:00.361Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-ecs-code-deploy/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-ecs-code-deploy/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-11T07:30:00.361Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.1K downloads",
"href": "https://clawhub.ai/sdk-team/alibabacloud-ecs-code-deploy",
"sourceUrl": "https://clawhub.ai/sdk-team/alibabacloud-ecs-code-deploy",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T07:30:00.361Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.0.3",
"href": "https://clawhub.ai/sdk-team/alibabacloud-ecs-code-deploy",
"sourceUrl": "https://clawhub.ai/sdk-team/alibabacloud-ecs-code-deploy",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-08-13T02:03:22.919Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-ecs-code-deploy/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-sdk-team-alibabacloud-ecs-code-deploy/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.0.3",
"description": "alibabacloud-ecs-code-deploy v1.0.3 - SKILL.md majorly updated: now features a full Chinese description and expanded trigger keywords. - Added mandatory User-Agent environment variable injection for all `aliyun` CLI calls (observability section). - Enhanced CLI upgrade method priority instructions for both Unix and Windows, detailing correct install/upgrade flows. - Updated documentation and references for clearer cross-platform path resolution and workflow compliance. - Removed the deprecated skill-card.md file.",
"href": "https://clawhub.ai/sdk-team/alibabacloud-ecs-code-deploy",
"sourceUrl": "https://clawhub.ai/sdk-team/alibabacloud-ecs-code-deploy",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-08-13T02:03:22.919Z",
"isPublic": true
}
]
}Record generated Oct 11, 2026.
