360 Secure SkillHub
360 安全技能中心

huawei-cloud-flexus-l-server-openhands-deployment

该技能支持新建或使用已有华为云 Flexus L 实例,通过华为云 COC 下发脚本,自动安装 Docker、配置国内镜像并生成 docker-compose.yaml 与 .env,完成 OpenHands 部署、验证、端口开通和生命周期管理。

分类:自动化
huaweicloudskill
huaweicloudskill
热度 39.37
最近更新 2026-12-04 12:03:02

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add huaweicloudskill/huawei-cloud-flexus-l-server-openhands-deployment
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
huawei-cloud-flexus-l-server-openhands-deployment
description
One-click production-grade deployment of OpenHands on Huawei Cloud Flexus L instances via Docker Compose with two resource modes (dedicated 90% / shared 60%). Supports two deployment paths: (1) buy a new Flexus L instance (Ubuntu 24.04) and deploy OpenHands with 90% resources, or (2) deploy on an existing server via COC script delivery with 60% (shared) or 90% (dedicated) resources. Includes Docker auto-install, domestic China mirror configuration, multi-source image pulling with automatic fallback, and generates production-grade docker-compose.yaml and .env files. Based on official deployment command: docker run -it --rm -p 8000:8000 -v "$HOME/.openhands:/home/openhands/.openhands" -v "$PROJECTS_PATH:/projects" ghcr.io/openhands/agent-canvas:1.35.0 Trigger keywords: Deploy OpenHands, OpenHands Docker, OpenHands 部署, Docker Compose OpenHands, 一键部署 OpenHands, OpenHands 容器化部署, OpenHands sandbox 配置, Flexus L 部署, COC 部署 OpenHands
tags
["OpenHands Deployment","Docker Compose","AI Agent Platform","Resource Allocation","China Mirror","Huawei Cloud Flexus L","COC Script Delivery"]
metadata
{"openhands":{"version":"1.35.0","requires":{"bins":["docker","docker-compose-plugin"]}}}
version
1.5.0

Important Notes:

  1. All scripts in the scripts directory have implemented all functions. Do not create additional py/sh files.
  2. Do not modify the script files in the scripts directory.
  3. Please operate directly according to the provided code and documentation. No need to check Huawei Cloud official API documentation.
  4. All script files (.sh, .py) first line must be a valid shebang (#!/bin/bash or #!/usr/bin/env python3), never insert comment lines before the shebang.
  5. All Python scripts must use UTF-8 without BOM encoding. Windows editors may default to UTF-8 with BOM, causing SyntaxError on the shebang line.
  6. Use python -m pip install instead of pip install to avoid Windows PATH issues.
  7. NEVER use chmod 777 in any script or documentation — security scan DES002 will block deployment. Use chown -R 1000:1000 <dir> followed by chmod 750 <dir> for restrictive permissions.

security Execution Rules (Highest Priority):

  1. All scripts MUST be executed via skill action=exec, NEVER run directly in shell
  2. NEVER print script contents or commands containing AK/SK/Token in conversation
  3. NEVER create temporary script files, prefer inline execution (python -c)
  4. On execution failure, only return error info, do NOT rewrite scripts or print full commands
  5. AK/SK/Token MUST be passed via environment variables, NEVER appear in conversation
  6. ABSOLUTELY NEVER expose, log, or print AK/SK/Token values in any form
  7. Scripts MUST NOT provide --ak, --sk, --token command-line parameter entry points. Credentials are read exclusively from environment variables (os.environ.get).
  8. NEVER check, detect, ask, prompt, or hint for AK/SK/Token at any point during deployment. Credentials are assumed to be already configured in environment variables. Do NOT run commands like echo $HW_ACCESS_KEY or Get-ChildItem Env: to check credentials. If scripts fail due to missing credentials, simply report the error — do NOT ask the user to provide credentials.
  9. NEVER use chmod 777 in scripts or documentation — security scan DES002 will block deployment. Use chown -R 1000:1000 <dir> to set ownership to container user UID, then chmod 750 <dir> for restrictive access.
  10. Docker socket access is restricted via docker-socket-proxy. The OpenHands container does NOT mount /var/run/docker.sock directly. Instead, a docker-socket-proxy service whitelists only the Docker API endpoints needed (containers, exec, images). This prevents the container from gaining host-root-equivalent access through the full Docker API.

Interaction Rules (Avoid Reload Cycles)

Avoid Reload Cycles After User Interaction

After each user response via ask_user, do NOT repeat the following reload sequence:

  1. memory_search (search skill memory)
  2. skill_tool (reload skill)
  3. ttse_consult (repeatedly consult experience)

Correct approach: After the initial load, all context is already in the conversation. Proceed directly with bash or ask_user for the next step. Only execute the above load steps on first deployment startup or when the user explicitly requests a restart.

This applies to ALL interactions: region/flavor selection, confirmation, resource mode selection, or any ask_user response — proceed to the next phase immediately. Reloading after every response wastes tokens, causes repeated questions, and loses prior selections.

Credential detection must NEVER be part of any reload or checklist sequence. Do not list "Credential environment variable detection" as a step — listing it causes the agent to actively detect and prompt for credentials.

Script Execution Feedback

  • When executing deployment scripts, always display script stdout/stderr output to the user in real-time — never run scripts silently and only show results after completion.
  • For long-running operations (COC tasks, Docker pulls), provide periodic progress updates so the user knows the process is alive.
  • If a script fails, immediately show the full error output in a code block with a clear header (e.g., Error Output:) before any analysis or next steps.
  • Do not summarize errors vaguely — show the actual error lines from the script output so the user can see the real failure reason.

Function Signature Confirmation Before Calling Scripts

  • Before calling any function in the scripts directory, first use read_file to view the target function's parameter definitions.
  • Common function signature: do_set_security_group_rule(ak, sk, region, security_token, group_name, security_group_id, port)
  • For deploy_openhands_via_coc, the region parameter name is region_id (not region). Other key parameters: resource_id (instance ID), script_content (script content), timeout (timeout duration).
  • Avoid parameter mismatches that cause repeated edit_file debugging, wasting interaction rounds.

Windows Environment Compatibility

  • The execution environment may be Windows (e.g., D:\Tools\ path). Avoid using Linux-specific commands such as sleep.
  • For waiting/delay, use python -c "import time; time.sleep(N)" instead of sleep N to ensure cross-platform compatibility.
  • Windows TIMEOUT command syntax differs from Linux — do not use it as a direct replacement.
  • For Python timeout handling, use threading.Timer or subprocess.run(timeout=N) instead of signal.alarm / signal.SIGALRM (not available on Windows).

OpenHands Deployment Skill for Huawei Cloud Flexus L Instance

Overview

This skill deploys OpenHands on Huawei Cloud Flexus L instances via Docker Compose with intelligent dynamic resource allocation. It supports two deployment paths:

  • Path A — Buy a new L instance and deploy: Call create_flexus_l_instance to purchase a Flexus L instance (Ubuntu 24.04), then chain-call deploy_openhands_via_coc with resource_mode=dedicated (90% resources).
  • Path B — Deploy on an existing server: User provides an existing Flexus L instance, skip instance creation, directly call deploy_openhands_via_coc with user-selected shared (60%) or dedicated (90%) mode.

Both paths ultimately use COC script delivery to push openhands.sh to the target instance. The script automatically: detects host resources, installs/upgrades Docker, configures domestic mirrors, pulls images from multiple sources, generates production-grade docker-compose.yaml and .env, and starts OpenHands.

Based on the official OpenHands deployment command:

docker run -it --rm -p 8000:8000 \
  -v "$HOME/.openhands:/home/openhands/.openhands" \
  -v "$PROJECTS_PATH:/projects" \
  ghcr.io/openhands/agent-canvas:1.35.0

Prerequisites

1. Huawei Cloud Account Requirements

  • A valid Huawei Cloud account with active subscription
  • Sufficient balance for subscription (Flexus L is prePaid only)
  • Flexus L instance quota available in target region

2. IAM Credentials

  • Huawei Cloud Access Key (AK) and Secret Key (SK) with appropriate permissions
  • Temporary Security Credentials (STS Token): Supports temporary security credentials. When HW_SECURITY_TOKEN environment variable is set along with AK/SK, the skill will use temporary credentials for authentication.
  • Required IAM permissions: hcss:lightInstances:*, coc:commands:*, iam:projects:list, vpc:securityGroupRules:*
  • See references/iam-policies.md for detailed policy configuration
  • Credentials are read silently from environment variables; the agent MUST NOT check, detect, or ask for them at any phase.

3. Environment Requirements

  • Python 3.8+ installed with pip
  • It is recommended to use a Python virtual environment to avoid system package conflicts:
    python3 -m venv .venv && source .venv/bin/activate
    
  • Required Python SDK packages: huaweicloudsdkcore, huaweicloudsdkcoc, huaweicloudsdkvpc, huaweicloudsdkecs, requests, pyyaml
    python -m pip install huaweicloudsdkcore huaweicloudsdkcoc huaweicloudsdkvpc huaweicloudsdkecs requests pyyaml
    

4. Network Requirements

  • Internet access to Huawei Cloud APIs
  • Domestic China: Script auto-configures 7 Docker Hub mirrors + DNS in /etc/docker/daemon.json
  • Port 8000 available for OpenHands Web UI (open in security group after deployment)
  • Outbound access to LLM API endpoints

5. Resource Requirements

  • Flexus L instance with minimum specifications:
    • Flavor: 2U4G (2 vCPUs, 4GB RAM) or higher; 4U8G+ recommended for dedicated mode
    • Network: Public IP required (auto-provisioned with EIP)
  • Supported flavors (Ubuntu 24.04):
Flavor Code CPU RAM System Disk Bandwidth Traffic Package
hf.medium.1.linux 2U 4G 70GB 5Mbps 1000GB
hf.medium.2.linux 2U 4G 80GB 6Mbps 1200GB
hf.medium.3.linux 2U 4G 100GB 8Mbps 1200GB
hf.large.1.linux 2U 4G 120GB 10Mbps 2000GB
hf.xlarge.1.linux 4U 8G 180GB 6Mbps 1200GB
hf.xlarge.3.linux 4U 16G 180GB 10Mbps 2000GB

Note: Flexus L instances bundle system disk + EIP bandwidth + traffic package. Network (VPC/subnet/SG) is auto-provisioned.

6. Configuration Requirements

  • LLM provider API keys for OpenHands AI agent functionality (configured post-deployment via Web UI Settings, never stored in .env)
  • Optional: OPENHANDS_RESOURCE_MODE for resource allocation mode selection
  • OS compatibility: openhands.sh is tested on Ubuntu 24.04. Other Linux distributions (CentOS/RHEL/Alpine/etc.) may fail due to SELinux, firewalld, or package manager differences. Path A (new instance) defaults to Ubuntu 24.04 and is unaffected.

Architecture Diagram

┌─────────────────────────────────────────────────────────────┐
│                Host System Resources                         │
├─────────────────────────────────────────────────────────────┤
│                                                              │
│  Mode = shared (default, co-resident):                       │
│  ┌───────────────────┐  ┌───────────────────┐               │
│  │  OpenHands Service │  │  OpenHands Sandbox │               │
│  │    (20% CPU/Mem)   │  │    (40% CPU/Mem)   │               │
│  └───────────────────┘  └───────────────────┘               │
│  ┌─────────────────────────────────────────────────────┐     │
│  │           System Reserved (40%)                     │     │
│  │   OS + Docker Daemon + other co-resident services   │     │
│  └─────────────────────────────────────────────────────┘     │
│                                                              │
│  Mode = dedicated (exclusive):                               │
│  ┌───────────────────┐  ┌───────────────────┐               │
│  │  OpenHands Service │  │  OpenHands Sandbox │               │
│  │    (30% CPU/Mem)   │  │    (60% CPU/Mem)   │               │
│  └───────────────────┘  └───────────────────┘               │
│  ┌─────────────────────────────────────────────────────┐     │
│  │           System Reserved (10%)                     │     │
│  │   OS + Docker Daemon (no co-resident services)      │     │
│  └─────────────────────────────────────────────────────┘     │
└─────────────────────────────────────────────────────────────┘

Component Description:

  • User/Agent: Skill caller that triggers OpenHands deployment operations via natural language or CLI
  • Flexus L Instance: Huawei Cloud Flexus L server (Ubuntu 24.04), serving as the target host
  • OpenHands Service: Main container running Agent Canvas + Web UI + API Server on port 8000
  • OpenHands Sandbox: Sandbox containers created via Docker socket for code execution
  • Resource Allocation: 60% shared (co-resident) or 90% dedicated (new instance), controlled by OPENHANDS_RESOURCE_MODE env var

Skill Responsibilities

Core Functions

  1. Flexus L Instance Creation - Call HCSS API to create instances with 6 flavor options, auto-provisioned network
  2. Instance Status Query - List all Flexus L instances in a region via caller.py list
  3. COC Remote Deployment - Use COC to remotely deliver and execute the OpenHands deployment script on instances
  4. Docker Auto-Install/Upgrade - Detects Docker presence and version; auto-installs or upgrades if missing or outdated
  5. Domestic China Mirror Configuration - Auto-configures 7 domestic Docker Hub mirrors + DNS settings in daemon.json
  6. Dynamic Resource Allocation - Two modes: shared (60% co-resident) or dedicated (90% exclusive); auto-detects host resources
  7. Security Group Management - Asks user for confirmation and source CIDR before opening port 8000 (does NOT default to 0.0.0.0/0)
  8. Public IP Retrieval - Auto-retrieves instance public IP via COC script execution and outputs access URL
  9. OpenHands Lifecycle Management - Start, stop, restart, status, logs, reconfigure, validate, cleanup all supported

Typical Use Cases

English Examples:

  1. "Help me deploy OpenHands to Huawei Cloud"
  2. "I want to install OpenHands on Flexus L instance"
  3. "Deploy OpenHands with Docker Compose on my existing server"
  4. "I want to configure OpenHands to use domestic China mirrors"
  5. "Help me deploy OpenHands with one click on a new Flexus L instance"

Workflow

This skill executes deployment in 7 phases. Each phase must complete before the next begins.

Phase 1: Environment Preparation

  1. Set environment variable: PYTHONIOENCODING=utf-8
  2. Check dependency modules: huaweicloudsdkcore, huaweicloudsdkcoc, huaweicloudsdkvpc, huaweicloudsdkecs, requests, pyyaml
  3. Proceed directly to Phase 2 — credentials (HW_ACCESS_KEY, HW_SECRET_KEY) are assumed to be already configured in environment variables. Do NOT check, verify, or ask the user about credentials. If credentials are missing, scripts will error out automatically.

Phase 2: Create Flexus L Instance

⚠️ Requires customer confirmation before execution!

  1. If region not provided, interactively prompt user to select a region from supported options
  2. Display instance configuration to customer (name, flavor, region, estimated cost)
  3. Wait for customer confirmation (reply "confirm" or "yes")
  4. After confirmation: Call HCSS API (POST /v1/light-instances) → Save order_id → Poll instance status until ACTIVE (2-5 minutes for COC registration) → Get instance_id, public_ip

Phase 3: COC Remote Dependency Installation

  1. Deliver and execute dependency installation script via COC on the target L instance
  2. Install/upgrade Docker Engine (if missing or version < 20.10) — apt-based installation only for Ubuntu 24.04; no curl | sh fallback (see Security Considerations SC2)
  3. Install Docker Compose v2 plugin (if missing, tries multiple GitHub proxy sources with auto-fallback)
  4. Configure /etc/docker/daemon.json with 7 domestic Docker Hub mirrors + DNS settings + log rotation
  5. Restart Docker daemon to apply changes
  6. Wait for completion (~8 minutes). Only retry if script execution errors occur.

Phase 4: COC Remote OpenHands Service Deployment

  1. Read deployment script (openhands.sh) with OPENHANDS_RESOURCE_MODE env var injected
  2. Execute complete deployment script on instance via COC (must use background execution due to 10-30 min duration)
  3. Generate docker-compose.yaml with OpenHands app + sandbox configuration
  4. Generate .env with resource limits, port mapping, and volume mounts
  5. Start OpenHands via docker compose up -d
  6. Wait for completion (~15 minutes). Only retry if script execution errors occur.

Phase 5: Deep Deployment Verification

  1. Query COC deployment task status (poll every 30s until finished)
  2. Verify OpenHands container is running and healthy (docker ps + docker inspect --format='{{.State.Health.Status}}')
  3. Check port 8000 responds with HTTP 200 (curl -s -o /dev/null -w "%{http_code}" http://localhost:8000)
  4. Verify Web UI returns HTML content containing "openhands" (curl -s http://localhost:8000 | grep -i "openhands") to avoid ISP proxy false positives
  5. Check container logs are free of ERROR/Exception (docker logs openhands 2>&1 | grep -iE "error|exception" | head -20)
  6. Verify container restart count is 0 (docker inspect --format='{{.RestartCount}}' openhands)
  7. Security group port 8000 opening: In interactive mode, use ask_user to ask user for confirmation and source CIDR before opening (does NOT default to 0.0.0.0/0). In non-interactive mode: if --remote-ip is provided, open with that CIDR; if not provided, skip security group opening entirely (do NOT call the security group API) and inform the user to open port 8000 manually.
  8. Retrieve instance public IP via COC script execution (fallback chain: ifconfig.me → ipinfo.io → hostname -I)
  9. Output web access URL: http://{public_ip}:8000
  10. Remind user to configure LLM API key in Web UI Settings

Do NOT report success based solely on docker ps. Run all checks (1-6) in one pass and present comprehensive results to avoid user follow-up asking for deeper validation.

Phase 6: Model Configuration

  1. Access http://<public-ip>:8000 in browser
  2. Configure LLM provider in Settings → LLM
  3. Enter API key in Web UI (stored securely, never in config files)
  4. API keys are NEVER stored in .env file — always configured via Web UI

Phase 7: Post-Deployment Configuration

  1. Resource mode selection: OPENHANDS_RESOURCE_MODE=dedicated (90%) or shared (60% default)
  2. Custom port: Set OPENHANDS_PORT in .env (default 8000)
  3. Custom version: Set OPENHANDS_VERSION (default 1.35.0)
  4. Mirror toggle: Set DOMESTIC_MIRROR=false for overseas deployment
  5. Timezone: Set TZ (default Asia/Shanghai)
  6. Service management: Use bash scripts/openhands.sh for start/stop/restart/status/logs/reconfigure/validate/cleanup

COC Task Status Query

Query COC execution status by UUID. Supports single query, verbose output, wait-for-completion, and file loading. See references/verification-method.md for details.

Status Description
READY Ready
PROCESSING Running, waiting required
FINISHED Completed successfully
ABNORMAL Execution abnormal, failed
CANCELED Canceled

Deploy on an Existing Instance

If the Flexus L instance is already created, skip instance creation and deploy OpenHands directly onto it: run python scripts/caller.py deploy --deploy-mode existing-server → provide instance ID → select resource mode → COC deploys OpenHands. Keep the customer confirmation step before any COC execution.

# Deploy on existing instance (interactive)
python scripts/caller.py deploy --deploy-mode existing-server

# Deploy on existing instance (non-interactive, shared mode)
python scripts/caller.py deploy --deploy-mode existing-server \
  --region cn-north-4 --resource-id instance-xxxx \
  --resource-mode shared --non-interactive

# Independent COC deployment call
python scripts/caller.py deploy-openhands \
  --region cn-north-4 --resource-id instance-xxxx \
  --resource-mode dedicated

Resource Cleanup

Deployed Flexus L instances keep being billed (esp. prePaid / annual-monthly subscription). When no longer needed, release via Flexus L Console (Release/Delete, or Unsubscribe for prePaid) after customer confirmation. OpenHands data volumes under openhands-deploy/ directory should be backed up before cleanup.

OpenHands service cleanup (keeps data):

bash scripts/openhands.sh cleanup    # Remove all containers but keep data volumes

Full cleanup (removes everything):

bash scripts/openhands.sh cleanup    # Remove containers
# Then release the Flexus L instance via Huawei Cloud Console

Core Commands

Environment Setup

# Install Python SDK dependencies
python -m pip install huaweicloudsdkcore huaweicloudsdkcoc huaweicloudsdkvpc huaweicloudsdkecs requests pyyaml

Credentials: HW_ACCESS_KEY and HW_SECRET_KEY environment variables must be configured before deployment. Do NOT check, set, or prompt for credentials during deployment — they are assumed to be already present.

Deployment Commands

# 1. Deploy on new L instance (Path A, 90% dedicated)
python scripts/caller.py deploy --deploy-mode new-instance

# Non-interactive mode
python scripts/caller.py deploy --deploy-mode new-instance \
  --name my-openhands --region cn-north-4 \
  --plan-spec hf.medium.1.linux --period-type month --period-num 1 \
  --deploy-openhands --non-interactive

# 2. Deploy on existing server (Path B, shared or dedicated)
python scripts/caller.py deploy --deploy-mode existing-server

# Non-interactive mode (shared, 60%)
python scripts/caller.py deploy --deploy-mode existing-server \
  --region cn-north-4 --resource-id instance-xxxx \
  --resource-mode shared --non-interactive

# 3. Independent COC deployment
python scripts/caller.py deploy-openhands \
  --region cn-north-4 --resource-id instance-xxxx \
  --resource-mode dedicated

# 4. List existing instances
python scripts/caller.py list --region cn-north-4

OpenHands Service Management Commands

# On the L instance via SSH — manage OpenHands directly
bash scripts/openhands.sh deploy        # One-click deployment
bash scripts/openhands.sh install-docker  # Docker setup only
bash scripts/openhands.sh status        # Check status and resource usage
bash scripts/openhands.sh logs -f       # View real-time logs
bash scripts/openhands.sh restart       # Restart service
bash scripts/openhands.sh stop          # Stop service
bash scripts/openhands.sh start         # Start service
bash scripts/openhands.sh reconfigure   # Re-detect resources after upgrade
bash scripts/openhands.sh validate      # Validate docker-compose.yaml syntax
bash scripts/openhands.sh cleanup       # Clean up (remove containers, keep data)

Custom Port and Version

# Deploy on custom port with specific OpenHands version
OPENHANDS_PORT=8001 OPENHANDS_VERSION=1.35.0 bash scripts/openhands.sh deploy

# Use official Docker Hub image source instead of domestic mirror
DOMESTIC_MIRROR=false bash scripts/openhands.sh deploy

# Override resource mode
OPENHANDS_RESOURCE_MODE=dedicated bash scripts/openhands.sh deploy  # 90%
OPENHANDS_RESOURCE_MODE=shared bash scripts/openhands.sh deploy     # 60% (default)

Parameter Confirmation & User-Configurable Parameters

See references/parameters-and-output.md for the full parameter confirmation template, user-configurable parameters (caller.py, openhands.sh, docker-compose.yaml), and directory structure.

Web UI Access

Web UI access requires two conditions:

  1. OpenHands service running and bound to port 8000 (auto-configured by deployment script)
  2. Security group allows port 8000 (opened by sg_rule.py after user confirmation and CIDR input — does NOT default to 0.0.0.0/0)

.env Configuration (Service-side)

The .env file at openhands-deploy/.env on the target instance contains auto-generated configuration:

.env Variable Purpose Default Value
OPENHANDS_PORT Web UI access port 8000
OPENHANDS_RESOURCE_MODE Resource allocation mode shared
TZ Timezone setting Asia/Shanghai

Important: When updating config items in .env, first use sed to delete the old line, then use echo to append the new line, to avoid variable accumulation during repeated deployments. Correct approach: sed -i '/^OPENHANDS_IMAGE=/d' .env && echo "OPENHANDS_IMAGE=xxx" >> .env

Security: LLM API keys are NEVER stored in .env. Always configure via OpenHands Web UI Settings.

Security Group Configuration (Cloud-side)

  1. After deployment, the skill asks the user to confirm opening port 8000 and provide a source CIDR
  2. The skill opens inbound port 8000 (TCP) via VPC API with the user-specified CIDR (does NOT default to 0.0.0.0/0)
  3. Alternatively, login to Flexus L Console
  4. Find your OpenHands instance → instance details → Security/Network
  5. Configure security group rules to open port 8000 (TCP inbound) with your desired CIDR

Access URL: http://<instance_public_ip>:8000 Security Warning: After opening the port, OpenHands Web interface will be accessible. For production, place behind a reverse proxy with authentication. Docker socket access is restricted via docker-socket-proxy — the OpenHands container connects through a proxy that whitelists only containers/exec/images API endpoints, preventing host-root-equivalent access.


Huawei Cloud Credential Configuration

Credential priority: environment variables (primary method for this skill).

Critical: The agent MUST NOT check, detect, or ask for AK/SK/Token at any point. The following documentation is for the user to configure their environment before invoking the skill — the agent never executes these commands.

Option 1: Environment Variables (Recommended)

Credentials are passed via environment variables. Set them before running caller.py:

# Permanent credentials
export HW_ACCESS_KEY=<your-access-key>
export HW_SECRET_KEY=<your-secret-key>

# Temporary credentials (STS Token)
export HW_ACCESS_KEY=<your-access-key>
export HW_SECRET_KEY=<your-secret-key>
export HW_SECURITY_TOKEN=<your-security-token>
Environment Variable Description Required
HW_ACCESS_KEY Access Key (permanent or temporary) Yes
HW_SECRET_KEY Secret Key (permanent or temporary) Yes
HW_SECURITY_TOKEN Security Token (STS only; required for security group operations with STS) No

Option 2: OpenHands API Key Configuration (Post-Deployment)

LLM provider API keys are configured separately from Huawei Cloud credentials:

Method Description
Web UI Settings Configure in Settings → LLM within OpenHands interface (stored securely, never in config files)

API keys are NEVER stored in .env file. Always configure via Web UI Settings.


Key API Endpoints & Output Standards

See references/parameters-and-output.md for the full API endpoints table, Docker mirror sources, success/error output templates, and error handling rule.

References

The following reference documents provide detailed information for this skill:

Document Description
references/iam-policies.md IAM permission policies and policy JSON for deployment
references/verification-method.md Verification methods and COC task status query procedures
Flexus L Instance Purchase Guide Purchasing a Flexus L Instance
HCSS API Reference HCSS API for Flexus L management
Huawei Cloud COC Cloud Operations Center
OpenHands Official OpenHands GitHub Repository
OpenHands Docs OpenHands Documentation
OpenHands Docker Image ghcr.io/openhands/agent-canvas
Docker Compose Reference Docker Compose Documentation
DaoCloud Mirror DaoCloud Image Mirror

Troubleshooting & Security Details

See references/troubleshooting-and-security.md for the full troubleshooting table, security considerations (SC2, PE4, DES002, SG1), API parameter notes, and platform compatibility guide.