Logo Huawei Cloud Ecs Dsh Deploy

Huawei Cloud Ecs Dsh Deploy

Tổ chức
huaweicloud
huawei-cloud-ecs-dsh-deploy

Huawei Cloud Flexus X Instance Deployment - DeepSeek Harness (dsh). ⚠️ Deployment involves actual charges, must confirm region/flavor/billing mode with user before execution. Triggers include: "部署DeepSeek Harness", "部署dsh", "部署DeepSeek智能体", "创建AI智能体服务器", "Deploy DeepSeek Harness", "Deploy dsh", "Create AI Agent Server", "Deploy AI Harness", "DeepSeek Harness", "dsh", "Flexus X", "ECS部署", "AI智能体".

Tổng quan

Nhà phát hànhhuaweicloud
Kho mãhuaweicloud-skills
Tên kỹ nănghuawei-cloud-ecs-dsh-deploy
Sao
59
Bản fork
24
Tệp đi kèm
12
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 12 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được huaweicloud công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Huawei Cloud Ecs Dsh Deploy trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/huaweicloud/huaweicloud-skills/tree/master/skills/computing/flexus-x/huawei-cloud-ecs-dsh-deploy
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/huaweicloud/huaweicloud-skills.git /tmp/huaweicloud-skills
mkdir -p .claude/skills
cp -r /tmp/huaweicloud-skills/skills/computing/flexus-x/huawei-cloud-ecs-dsh-deploy .claude/skills/huawei-cloud-ecs-dsh-deploy
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Huawei Cloud Ecs Dsh Deploy trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Huawei Cloud Ecs Dsh Deploy ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Huawei Cloud Ecs Dsh Deploy với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Huawei Cloud Flexus X + DeepSeek Harness (dsh) One-Click Deployment

⚠️ Pre-Deployment Checklist (Highest Priority)

This skill involves actual charges (creating Huawei Cloud Flexus X instance), must confirm with user before execution!

Required Confirmations:

  • Region (default: cn-north-4)
  • Flavor (default: x1.2u.4g, 2 cores 4GB)
  • Billing Mode (default: pay-as-you-go)

Prohibited Actions:

  • ❌ Do NOT execute deployment before user explicitly confirms
  • ❌ Do NOT use default config for deployment without asking user
  • ❌ Do NOT assume user accepts default values
  • ❌ Do NOT fabricate or estimate prices (e.g., "≈ ¥0.2-0.3/hour"); always refer users to the official pricing page

Correct Process:

  1. Show user the default config (region, flavor, billing mode)
  2. Inform users that for pricing, use the official price calculator: https://www.huaweicloud.com/pricing/calculator.html#/hecs
  3. Ask if user confirms or needs modifications
  4. Execute deployment only after user inputs CONFIRM (uppercase)

Overview

This skill provides one-click deployment of DeepSeek Harness (dsh) — the open-source AI agent harness from DeepSeek AI — on Huawei Cloud Flexus X instances:

ModuleDescriptionCommand
List RegionsShow available regionspython3 scripts/deploy_dsh.py --list-regions
Test ConnectionVerify AK/SK credentialspython3 scripts/deploy_dsh.py --test
DeployPurchase Flexus X instance and deploy dshpython3 scripts/deploy_dsh.py

Components

ComponentDescriptionPortNotes
Node.jsJavaScript runtime-Node.js 22 LTS, installed to /opt/nodejs/current
@deepseek-ai/dshDeepSeek Harness CLI3080 (loopback)Official npm package, dsh web binds to 127.0.0.1 only
NginxReverse proxy80 (loopback)Local server proxy 80 → 127.0.0.1:3080 (public access does not use this port, see SSH tunnel below)
systemdService manager-dsh.service manages dsh lifecycle, auto-restart on failure
UFWFirewall-Allows 22 (SSH)/80/443 (80/443 blocked by security group, not reachable from public)

Deployed Applications

ApplicationDescriptionPortAccess URL
dsh Web UIAI agent harness web interface3080 (loopback)http://127.0.0.1:3080 (SSH tunnel required first, see Local Access Guide)

✅ Important: dsh web command intentionally binds to 127.0.0.1 only — the CLI rejects --host 0.0.0.0. Remote access goes through an SSH local port-forwarding tunnel: run ssh -L 3080:127.0.0.1:3080 root@{public_ip} on your machine, then open http://127.0.0.1:3080. Only port 22 needs to be open in the security group — dsh is never exposed to the public, which is more secure.

Use Cases

  1. AI Agent Development - Run and manage DeepSeek AI agent harness with a web UI
  2. Automation & Workflows - Build multi-step agent workflows with the "everything is a plugin" architecture
  3. Development & Testing - Quickly set up an AI agent development environment
  4. Team Collaboration - Share agent workspaces across a team
  5. Multi-Region Deployment - Provide nearby access for global users

Important Notes

⚠️ All scripts and environment check scripts are in the skill package. Must use skill action=exec for execution, do NOT run directly in shell.

Prerequisites

Before using this skill, ensure the following conditions are met:

1. Huawei Cloud Account

  • Valid Huawei Cloud account
  • Account has completed real-name authentication
  • Account has sufficient balance or bound payment method

2. AK/SK Credentials

  • Created Huawei Cloud access key (AK/SK)
  • AK/SK has the following permissions:
    • ECS: Elastic Cloud Server management
    • VPC: Virtual Private Cloud management
    • EIP: Elastic Public IP management
    • COC: Cloud Operations Center management
  • How to obtain: Huawei Cloud Console → My Credentials → Access Keys → Create Access Key

Credential Configuration Methods:

MethodDescriptionPriority
Environment VariablesHW_ACCESS_KEY, HW_SECRET_KEY, HW_SECURITY_TOKENHighest (Recommended)
Command Line Arguments--ak, --sk, --security-tokenLower (Accepted but not recommended)

Credential Types (By Recommendation Order):

PriorityTypeParametersDescription
First ChoiceTemporary AK/SKEnvironment Variables + HW_SECURITY_TOKENTemporary credentials with security token, higher security
Second ChoicePermanent AK/SKEnvironment Variables OnlyLong-term access keys from Huawei Cloud Console

Note: Credentials are prioritized from environment variables; users are never asked to directly input AK/SK. However, if the user voluntarily provides credentials through other methods (e.g., conversation input, configuration files), credential parsing is still supported.

3. IAM Permissions

ServicePolicyRequired Actions
ECSECS FullAccessecs:*
VPCVPC FullAccessvpc:*
EIPVPC FullAccessvpc:publicIps:*
COCCOC FullAccesscoc:*

📖 Detailed least-privilege policy: IAM Policies

4. Runtime Environment

  • Python 3.8 or higher

Required Dependencies:

PackageVersionDescription
requests≥2.31.0HTTP request library
huaweicloudsdkcore≥3.1.70Huawei Cloud SDK core library
huaweicloudsdkecs≥3.1.70Elastic Cloud Server SDK
huaweicloudsdkcoc≥3.1.70Cloud Operations Center SDK

Install command:

bash
pip install requests huaweicloudsdkcore huaweicloudsdkecs huaweicloudsdkcoc

5. Network Environment

  • Ability to access Huawei Cloud API endpoints
  • Required endpoints:
    • ecs.{region}.myhuaweicloud.com
    • vpc.{region}.myhuaweicloud.com
    • iam.myhuaweicloud.com
    • coc.myhuaweicloud.com

⚠️ Security Notes

⚠️ Security Execution Rules (Highest Priority)

RuleDescription
1All scripts must be executed through skill action=exec, prohibited from running directly in shell
2Prohibited from printing script content or commands containing AK/SK/Token in conversation
3Prohibited from creating temporary script files, prefer inline execution (python3 -c)
4On execution failure, return only error message, prohibited from rewriting script or printing complete commands
5AK/SK/Token must be passed through environment variables, prohibited from appearing in conversation
6⚠️ Absolutely prohibited from exposing, recording, or printing AK/SK/Token values in any form

⚠️ Security Group Policy (Critical - Read Before Deployment)

Deployment Strategy - Simple & Secure:

SettingValueDescription
Security Group StatusEmpty (no inbound rules)Script only creates security group, does not add any rules
Default AccessAll ports blockedBefore you configure rules, no IP can access the server
Ports to OpenOnly 22 (SSH)dsh Web UI is accessed via SSH tunnel; 80/443 do not need to be public

How to Configure After Deployment:

  1. Access Huawei Cloud Console → ECS → Security Groups
  2. Find the security group named sg-dsh
  3. Manually add an inbound rule: protocol TCP, port 22, source IP = your public IP + /32 suffix (e.g., 203.0.113.10/32)
  4. Do not add broad 80/443 rules — dsh is accessed only through the SSH tunnel; no other ports need to be exposed

💡 Why Use Empty Security Group? Security First - You have full control over which IPs can access the server. Only port 22 + SSH tunnel — dsh Web UI is never exposed publicly, so even an API key leak cannot be accessed from the internet.

⚠️ AK/SK Security: See Prerequisites - AK/SK Credentials. Prohibited from exposing, recording, or printing AK/SK/Token values in any form.

⚠️ dsh Security (Critical)

RuleDescription
1dsh binds to 127.0.0.1 only — never force it to listen on 0.0.0.0 (CLI rejects it by design)
2Remote access via SSH local port forwarding: run ssh -L 3080:127.0.0.1:3080 root@{public_ip} locally, then open http://127.0.0.1:3080
3DEEPSEEK_API_KEY is injected via systemd drop-in with file mode 600 — never in the unit file, never in logs
4API key is optional at deploy time; users can also set it later in the Web UI (Settings → Models)
5dsh runs under a dedicated system user dsh (no-shell), not root
6Production use must enable HTTPS (e.g. Let's Encrypt, via Nginx local proxy)

🔐 SSL/TLS Verification

  • 🔒 SSL/TLS certificate verification is enabled by default for all Huawei Cloud API requests (verify=true).
  • The HW_VERIFY_SSL environment variable can override this — HW_VERIFY_SSL=false disables verification.
  • ⚠️ HW_VERIFY_SSL=false is for testing only. Never disable SSL verification in production; it exposes AK/SK credentials and API traffic to man-in-the-middle attacks.

Core Commands and Usage

💡 Note: When no operation options are provided, deployment operation is executed by default.

Command Options

Command/OptionFunctionDescription
python3 scripts/deploy_dsh.pyDeployPurchase Flexus X instance and deploy dsh
python3 scripts/deploy_dsh.py --list-regionsShow Available RegionsShow all available regions (19 regions)
python3 scripts/deploy_dsh.py --testTest ConnectionVerify AK/SK credentials
python3 scripts/deploy_dsh.py --list-serversList ServersShow all servers in specified region
python3 scripts/deploy_dsh.py --delete <ID>Delete ServerDelete server by ID or name
python3 scripts/deploy_dsh.py --status <ID>Check StatusCheck deployment status by server ID

Global Parameters

💡 Required Parameters: --ak, --sk (or set HW_ACCESS_KEY, HW_SECRET_KEY environment variables) 💡 Recommended Parameters: --security-token (or set HW_SECURITY_TOKEN for temporary credentials)

Execution Examples

Example 1: List available regions

bash
python3 scripts/deploy_dsh.py --list-regions

Example 2: Test AK/SK connection

bash
python3 scripts/deploy_dsh.py --test

Example 3: Deploy with default settings (requires user confirmation)

bash
python3 scripts/deploy_dsh.py

Example 4: Deploy with custom region and flavor

bash
python3 scripts/deploy_dsh.py --region cn-east-3 --flavor x1.4u.8g

Example 5: List existing servers

bash
python3 scripts/deploy_dsh.py --list-servers --region cn-north-4

Example 6: Check deployment status

bash
python3 scripts/deploy_dsh.py --status <server_id>

Example 7: Delete a server

bash
python3 scripts/deploy_dsh.py --delete <server_id_or_name>
ParameterDescriptionDefault
--regionTarget regioncn-north-4
--flavorInstance flavorx1.2u.4g
--nameServer nameAuto-generated
--passwordServer passwordAuto-generated
--charging-modeBilling modepostPaid
--bandwidthEIP bandwidth (Mbps)100
--volume-sizeSystem disk (GB)40
--coc-regionCOC service regioncn-north-4
--coc-timeoutCOC script execution timeout (seconds)1800

dsh Parameters

ParameterDescriptionDefault
--dsh-portdsh listening port (loopback only)3080
--api-keyDEEPSEEK_API_KEY to pre-seed into the dsh service (optional)Not set

💡 The dsh port is bound to 127.0.0.1 only — access it locally via SSH tunnel (ssh -L 3080:127.0.0.1:3080 root@{ip}). No security group rule is needed for the dsh port itself.

Advanced Parameters

💡 The following parameters are for advanced users, not needed for general scenarios

ParameterDescriptionDefault
--project-idHuawei Cloud project ID (optional)Auto-fetched
--imageImage IDDefault Ubuntu 22.04
--zoneSpecify availability zoneAuto-select
--random-zoneRandomly select availability zoneOff
--no-eipDo not create elastic public IPOff
--auto-confirmSkip interactive confirmation (use with caution!)Off

Credential Configuration Examples

Method 1: Using Environment Variables (First Choice - Strongly Recommended)

bash
python3 scripts/deploy_dsh.py

Method 2: Using Command Line Arguments (Second Choice - Accepted)

bash
# Temporary credentials
python3 scripts/deploy_dsh.py \
  --ak <AK> --sk <SK> --security-token <TOKEN> \
  --region cn-north-4 \
  --flavor x1.2u.4g

# Permanent credentials
python3 scripts/deploy_dsh.py \
  --ak <AK> --sk <SK> \
  --region cn-north-4 \
  --flavor x1.4u.8g

🔒 Anti-Duplicate Deployment Mechanism

System built-in lock file mechanism prevents duplicate deployments:

  • Lock file automatically created at deployment start: dsh_deploy.lock
  • Lock file validity: 30 minutes (auto-expires)
  • When lock file exists, new deployment automatically blocked
  • Lock file path: system temp directory (/tmp/dsh_deploy.lock on Linux, %TEMP%\dsh_deploy.lock on Windows)

⚠️ Important Notes:

  • ❌ Do NOT run multiple deployment tasks simultaneously
  • ❌ Duplicate deployments will create multiple servers, incurring double charges
  • Check if lock file was deleted after deployment failure

Failure Handling: On deployment failure, return failure reason and guide user to check console, no automatic retry or parameter modification

🚀 Domestic Mirror Acceleration

Built-in domestic mirror acceleration for faster deployment:

Mirror TypeMirror SourceDescription
Ubuntu APTUSTC (mirrors.ustc.edu.cn)System package updates
npm registrynpmmirror (registry.npmmirror.com)@deepseek-ai/dsh install + Node.js binary download
pip (local)Huawei Cloud (repo.huaweicloud.com)Python dependency installation on the operator side

Mirror configuration location: scripts/coc_deploy.py in COMBINED_INSTALL_SCRIPT

Module Details

Deploy DeepSeek Harness (dsh)

⏱️ Deployment Time: Entire process takes about 10 minutes (server creation 3-5 minutes + software deployment 5-8 minutes), please be patient

💡 See Credential Configuration Examples for deployment commands, and Global Parameters for all parameters

Deployment stages on the server (via COC script):

StageOperationDescription
0Domestic MirrorsConfigure USTC APT mirror + npmmirror npm registry
1Node.js 22 LTSInstall via official tarball (npmmirror mirror, fallback nodejs.org)
2@deepseek-ai/dshnpm install -g @deepseek-ai/dsh
3Dedicated UserCreate system user dsh, prepare DSH_HOME (/home/dsh/.dsh)
4systemd ServiceWrite dsh.service (restart=on-failure, ProtectSystem, ReadWritePaths)
5Nginx Reverse Proxy80 → 127.0.0.1:3080, WebSocket upgrade headers (loopback only)
6FirewallUFW allow 22/80/443 (80/443 blocked by security group, not reachable from public)
7Start & VerifyStart dsh, wait for loopback HTTP 200, print deployment info

Available Regions

Common Regions (more regions run --list-regions):

Region IDRegion NameSupported Flexus X Instance Types
cn-north-4North China-Beijing 4x1, x1e, x1i, x2e
cn-east-3East China-Shanghai 1x1, x1e, x1i, x2e
cn-south-1South China-Guangzhoux1, x1e, x1i, x2e
ap-southeast-1China-Hong Kongx1, x2e
ap-southeast-3Asia Pacific-Singaporex1, x1e, x2e

💡 Complete region list (19) run: python3 scripts/deploy_dsh.py --list-regions

Output Format Specification

⛔ CRITICAL — The SSH tunnel command MUST be output verbatim, never omitted, summarized, or paraphrased:

After deployment, the reply MUST include a copy-paste-ready SSH tunnel command line, with {public_ip} replaced by the actual public IP from the script output. For example, if the script outputs Public IP: 121.36.x.x, the reply must contain:

ssh -L 3080:127.0.0.1:3080 root@121.36.x.x

NEVER write only "please establish an SSH tunnel" without the full command — users need to copy-paste it; missing the command makes the Web UI inaccessible.

After successful deployment, must return results in the following format:

🎉 Deployment Successful!

| Item | Value |
|------|-----|
| Server Name | {server_name} |
| Public IP | {public_ip} |
| SSH Password | {password} |
| Region | {region_id} ({region_name}) |

🌐 Access URL (SSH tunnel required first):
- Run on your local machine (Windows PowerShell / macOS Terminal), replacing {public_ip} with the Public IP from the table above:

ssh -L 3080:127.0.0.1:3080 root@{public_ip}

- Enter the SSH password (from the table above), keep the terminal window open
- Then open in your browser: http://127.0.0.1:3080

🔑 SSH Login: `ssh root@{public_ip}` (password: {password})

📦 Installed Components:
- Node.js 22 LTS ({node_version})
- @deepseek-ai/dsh ({dsh_version}, systemd service 'dsh')
- Nginx reverse proxy (80 → 127.0.0.1:{dsh_port}, loopback only)

📋 Post-deployment TODO:
1. Configure security group: Console → ECS → Security Groups → sg-dsh → Add inbound rule (TCP 22, source your_ip/32)
2. Establish SSH tunnel locally (see command above), then open Web UI: http://127.0.0.1:3080
3. In the Web UI: Settings → Models, enter your DeepSeek API key and save
4. Choose a workspace directory, then start a session

📖 [DeepSeek Harness GitHub](https://github.com/deepseek-ai/deepseek-harness) | [Flexus X Docs](https://support.huaweicloud.com/productdesc-flexusx/pd_01_0002.html)

Variables: {server_name} server name | {public_ip} public IP | {password} SSH password | {region_id}/{region_name} region | {dsh_port} dsh loopback port | {node_version} Node.js version | {dsh_version} dsh CLI version

🔐 Local Access Guide (SSH Port Forwarding)

⚠️ You MUST follow this section after deployment, otherwise the browser cannot open the dsh Web UI. dsh only listens on the server's loopback address 127.0.0.1:3080 — you need to establish an SSH tunnel on your local machine to forward local port 3080 to the server's 3080 port.

How it works: ssh -L 3080:127.0.0.1:3080 root@{public_ip} means — forward all traffic on your local 3080 port through the encrypted SSH channel to 127.0.0.1:3080 on the cloud server (where dsh runs). Data is fully encrypted, dsh Web UI is never exposed publicly, and only someone who can SSH can access it.

Windows Users (PowerShell)

  1. Open PowerShell: Press Win key → type powershell → Enter (or press Win+X → select "Windows PowerShell" / "Windows Terminal")
  2. Run the tunnel command (replace {public_ip} with the public IP from the deployment output):
    powershell
    ssh -L 3080:127.0.0.1:3080 root@{public_ip}
  3. First-time fingerprint confirmation: if prompted Are you sure you want to continue connecting (yes/no)?, type yes and press Enter
  4. Enter the password: type the SSH password from the deployment output (characters are not displayed while typing — this is normal), press Enter
  5. Keep the window open: once you see the remote shell prompt (e.g., root@xxx:~#), the tunnel is established. Do not close this window
  6. Open your browser: visit http://127.0.0.1:3080 to open the dsh Web UI

💡 Windows 10/11 ships with the OpenSSH client — no extra installation needed. If you get "'ssh' is not recognized", go to Settings → Apps → Optional Features → add "OpenSSH Client".

macOS Users (Terminal)

  1. Open Terminal: press Command + Space → type Terminal → Enter (or Finder → Applications → Utilities → Terminal)
  2. Run the tunnel command (replace {public_ip} with the public IP from the deployment output):
    bash
    ssh -L 3080:127.0.0.1:3080 root@{public_ip}
  3. First-time fingerprint confirmation: if prompted Are you sure you want to continue connecting (yes/no)?, type yes and press Enter
  4. Enter the password: type the SSH password from the deployment output (characters are not displayed while typing — this is normal), press Enter
  5. Keep the window open: once you see the remote shell prompt, the tunnel is established. Do not close this window
  6. Open your browser: visit http://127.0.0.1:3080 to open the dsh Web UI

💡 macOS ships with the OpenSSH client — no extra installation needed.

Closing the Tunnel & Advanced Usage

ScenarioAction
Close the tunnelPress Ctrl+C in the PowerShell/Terminal window, or type exit and press Enter
Forward only, no shellssh -N -L 3080:127.0.0.1:3080 root@{public_ip} (-N runs no remote command; no shell prompt — recommended)
macOS backgroundssh -f -N -L 3080:127.0.0.1:3080 root@{public_ip} (-f runs in background; stop with pkill -f "ssh -f -N" or killall ssh)
Local port 3080 in useUse another local port: ssh -L 18080:127.0.0.1:3080 root@{public_ip}, then open http://127.0.0.1:18080
Passwordless login (recommended)Run ssh-copy-id root@{public_ip} (macOS/Linux) or use an SSH key in PowerShell for passwordless connections later

⚠️ Note: after the tunnel is closed, http://127.0.0.1:3080 becomes unreachable — this is normal; just re-run the tunnel command. After every machine reboot you must re-establish the tunnel.

dsh Initial Setup

After establishing the SSH tunnel, open the dsh Web UI (http://127.0.0.1:3080):

SettingDescription
API KeyGo to Settings → Models, enter your DeepSeek API key and save (if not pre-seeded via --api-key)
WorkspaceChoose a workspace directory to store sessions and artifacts
Start SessionStart a session in the web UI and the harness will respond

⚠️ Important: dsh can read/write files and run commands — only port 22 should be open in the security group (source your_ip/32); dsh is accessed via SSH tunnel; never open 80/3080 to the public, never use 0.0.0.0/0.

Deployment Architecture

This skill uses COC (Cloud Operations Center) for secure deployment, replacing traditional SSH method:

┌─────────────────────────────────────────────────────────────┐
│                    Flexus Cloud Server X Instance                     │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  ┌─────────────────────────────────────────────────────┐    │
│  │              Ubuntu 22.04 Server                    │    │
│  ├─────────────────────────────────────────────────────┤    │
│  │                                                     │    │
│  │   SSH tunnel ──► dsh (127.0.0.1:3080)              │    │
│  │   (port 22)       (loopback only)                   │    │
│  │                                                     │    │
│  │  ┌───────────────┐      ┌───────────────┐          │    │
│  │  │    Nginx      │      │    systemd    │          │    │
│  │  │   (port 80)   │      │  dsh.service  │          │    │
│  │  │   loopback    │      └───────┬───────┘          │    │
│  │  └───────────────┘              │                   │    │
│  │                                 ▼                   │    │
│  │                            dsh web (Node.js 22)     │    │
│  │                             user: dsh (no-shell)   │    │
│  │                             DSH_HOME: /home/dsh/.dsh│    │
│  └───────────┬──────────────────────┬──────────────────┘    │
│              │                      │                       │
│              │              ┌───────┴───────┐              │
│              │              │ Security Group │             │
│              │              │    sg-dsh     │             │
│              │              │ allow 22 /32  │             │
│              │              └───────┬───────┘             │
│              │                      │                      │
│              └──────────────────────┼──────────────────────┘
│                                     ▼                       │
│                           ┌─────────────┐                  │
│                           │    EIP      │  SSH only (22)   │
│                           └─────────────┘                  │
│                                     ▲                       │
│                                     │                       │
│                           ┌─────────┴─────────┐            │
│                           │  COC (Cloud       │           │
│                           │  Operations       │           │
│                           │  Center)          │           │
│                           │  Secure Script    │           │
│                           │  Execution        │           │
│                           └───────────────────┘            │
└─────────────────────────────────────────────────────────────┘

              ┌─────────────────────────────┐
              │  User machine (Windows/macOS) │
              │  ssh -L 3080:127.0.0.1:3080 root@{ip} │
              │  Browser → http://127.0.0.1:3080      │
              └─────────────────────────────┘

Deployment Flow

StageOperationDescription
1Create ServerCreate Flexus X instance via Huawei Cloud SDK
2Configure Security GroupCreate sg-dsh security group (empty rules, manual config needed)
3Wait for UniAgentWait for COC UniAgent to come online
4Create COC ScriptCreate installation script in Cloud Operations Center
5Execute ScriptExecute script on target instance via COC
6Verify DeploymentCheck dsh service and loopback port status

COC Deployment Advantages

Compared to SSH method, COC deployment has the following advantages:

FeatureSSH MethodCOC Method
SecurityRequires open SSH port, security riskSecure execution via Cloud Operations Center, no SSH port needed
Permission ControlRequires SSH password or keyUses Huawei Cloud IAM permission control
Audit LogsRequires manual loggingCOC automatically records execution logs
Batch DeploymentRequires sequential SSH connectionsSupports batch deployment of multiple servers
Error HandlingRequires manual processingCOC provides standardized error handling

Log Files

File PathDescription
/var/log/dsh-bootstrap.logDeployment script execution log
/home/dsh/.dsh/dsh data directory (sessions, workspaces, artifacts)
/etc/systemd/system/dsh.servicedsh systemd unit file
/etc/systemd/system/dsh.service.d/10-credentials.confDEEPSEEK_API_KEY drop-in (mode 600, only if --api-key used)
/etc/nginx/conf.d/dsh.confNginx reverse proxy config

File Structure

skills/huawei-cloud-ecs-dsh-deploy/
├── SKILL.md                    # English version
├── scripts/
│   ├── deploy_dsh.py           # Main deployment script
│   ├── pyproject.toml          # Dependency list
│   ├── huawei_cloud_ecs.py     # Huawei Cloud SDK wrapper
│   ├── coc_deploy.py           # COC deployment module (includes install script)
│   ├── config.py               # Configuration constants
│   ├── utils.py                # Utility functions
│   └── query_regions.py        # Region query helper
└── references/
    ├── acceptance-criteria.md     # Acceptance criteria
    ├── cli-installation-guide.md  # CLI installation guide (KooCLI & dependencies)
    ├── iam-policies.md            # IAM policies
    ├── verification-method.md     # Verification methods
    └── conversation-examples.md   # Natural-language conversation examples

Error Handling

Known Limitations

LimitationDescriptionSolution
dsh binds loopback onlydsh web refuses --host 0.0.0.0 by designEstablish SSH tunnel locally: ssh -L 3080:127.0.0.1:3080 root@{ip}, then open http://127.0.0.1:3080
Status Check Method--status checks the server instance state; dsh health check requires the SSH tunnelVerify by opening http://127.0.0.1:3080 after tunneling, or run curl http://127.0.0.1:3080 on the server

Common Errors

Error CodeDescriptionSolution
401 UnauthorizedAK/SK invalidVerify AK/SK is correct and valid
403 ForbiddenPermission deniedAdd required IAM policies
QuotaExceededResource quota exceededCheck ECS/VPC/EIP quotas
ServerLimitExceededInstance count limitRelease unused instances
FlavorNotFoundFlavor unavailableTry other region or flavor
TimeoutServer creation timeoutCheck actual status in console
Node.js < 22dsh requires Node.js >= 22Install script auto-installs Node 22 LTS

References

Skill Reference Documents

External References

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Huawei Cloud Ecs Dsh Deploy làm được gì?

Huawei Cloud Flexus X Instance Deployment - DeepSeek Harness (dsh). ⚠️ Deployment involves actual charges, must confirm region/flavor/billing mode with user before execution. Triggers include: "部署DeepSeek Harness", "部署dsh", "部署DeepSeek智能体", "创建AI智能体服务器", "Deploy DeepSeek Harness", "Deploy dsh", "Create AI Agent Server", "Deploy AI Harness", "DeepSeek Harness", "dsh", "Flexus X", "ECS部署", "AI智能体".

Vì sao nên dùng Huawei Cloud Ecs Dsh Deploy trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Huawei Cloud Ecs Dsh Deploy là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Huawei Cloud Ecs Dsh Deploy trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/huaweicloud/huaweicloud-skills/tree/master/skills/computing/flexus-x/huawei-cloud-ecs-dsh-deploy. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Huawei Cloud Ecs Dsh Deploy?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Huawei Cloud Ecs Dsh Deploy với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Huawei Cloud Ecs Dsh Deploy với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Huawei Cloud Ecs Dsh Deploy có miễn phí không?

Có. Kỹ năng này được huaweicloud phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇