huawei-cloud-flexus-l-server-openclaw-deployment

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
⚠️ 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 - this is a critical security requirement
  7. When using skill action=exec, credentials are automatically inherited from environment variables (HW_ACCESS_KEY, HW_SECRET_KEY, HW_SECURITY_TOKEN), no need to pass them as command line arguments
⚠️ 安全执行规则(最高优先级):
  1. 所有脚本必须通过skill action=exec执行,绝不能直接在shell中运行
  2. 绝不能在对话中打印包含AK/SK/Token的脚本内容或命令
  3. 绝不能创建临时脚本文件,优先使用内联执行方式(python -c)
  4. 执行失败时,仅返回错误信息,不要重写脚本或打印完整命令
  5. AK/SK/Token必须通过环境变量传递,绝不能出现在对话中
  6. 绝对不能以任何形式暴露、记录或打印AK/SK/Token的值——这是关键安全要求
  7. 使用skill action=exec时,凭据会自动从环境变量(HW_ACCESS_KEY、HW_SECRET_KEY、HW_SECURITY_TOKEN)继承,无需作为命令行参数传递

huawei-cloud-flexus-l-server-openclaw-deployment

huawei-cloud-flexus-l-server-openclaw-deployment

Overview

概述

This skill supports one-click deployment of the OpenClaw AI Agent platform to Huawei Cloud Flexus L Instance. It provides a complete OpenClaw instance management workflow, from initial deployment to post-deployment configuration, including:
  • Automated instance creation
  • Model installation via COC (Cloud Operations Center)
  • Channel installation via COC (WeCom, Feishu, DingTalk, QQ)
  • Automatic prerequisite checks before installation (Gateway and UniAgent status)
本技能支持一键将OpenClaw AI Agent平台部署到华为云Flexus L实例。它提供了完整的OpenClaw实例管理工作流,从初始部署到部署后的配置,包括:
  • 自动化实例创建
  • 通过COC(云运营中心)安装模型
  • 通过COC安装通道(企业微信、飞书、钉钉、QQ)
  • 安装前自动检查前置条件(Gateway和UniAgent状态)

Use Cases

使用场景

ScenarioDescription
Enterprise AI Assistant SetupEnterprises need to quickly deploy an AI Agent platform for internal Q&A, customer service, etc.
Multi-Channel Bot IntegrationNeed to integrate multiple messaging channels (WeCom, Feishu, DingTalk) into a unified AI assistant
Quick LLM IntegrationExisting OpenClaw instance needs to quickly switch or add different LLMs (DeepSeek, Qwen, etc.)
Automated Operations DeploymentNeed to automatically batch deploy OpenClaw instances to multiple regions via scripts
场景描述
企业AI助手搭建企业需要快速部署AI Agent平台用于内部问答、客户服务等场景
多渠道机器人集成需要将多个消息渠道(企业微信、飞书、钉钉)集成到统一的AI助手
快速大语言模型集成已有的OpenClaw实例需要快速切换或添加不同的大语言模型(DeepSeek、Qwen等)
自动化运维部署需要通过脚本自动批量在多个区域部署OpenClaw实例

Typical Use Cases

典型使用示例

User may say:
  1. "I want to install OpenClaw on a Flexus L instance"
  2. "I want to configure DeepSeek model on my deployed OpenClaw"
  3. "Help me deploy OpenClaw with Feishu channel configured"
用户可能会说:
  1. "我想在Flexus L实例上安装OpenClaw"
  2. "我想在已部署的OpenClaw上配置DeepSeek模型"
  3. "帮我部署已配置飞书通道的OpenClaw"

Prerequisites

前置条件

Account Requirements

账号要求

  • Huawei Cloud AK/SK credentials with the following permissions:
    • Create Flexus L Instances
    • Access COC (Cloud Operations Center) services
Credential Acquisition Methods:
This skill supports obtaining Huawei Cloud credentials through the following methods (in order of priority from high to low):
Credential Types:
  • Long-term AK/SK: Permanent credentials, no security_token required
  • Temporary AK/SK: Temporary credentials with limited validity period, security_token required
  1. Environment Variables (Default) (highest priority)
    • HW_ACCESS_KEY
      : Huawei Cloud Access Key AK
    • HW_SECRET_KEY
      : Huawei Cloud Access Key SK
    • HW_SECURITY_TOKEN
      : Security token (optional, only required for temporary credentials)
  2. User-specified Configuration File or Other Environment Variables (used when default environment variables are not available)
    • Configuration file path or other environment variables specified by user during interaction
  3. Interactive Input (when neither of the above methods is provided)
    • The program will prompt the user to enter AK/SK and other credential information
Important Notes:
  • Long-term AK/SK: Permanent credentials that never expire, no security_token needed
  • Temporary AK/SK: Obtained through IAM interface with limited validity period, must provide security_token
  • 具备以下权限的华为云AK/SK凭据:
    • 创建Flexus L实例
    • 访问COC(云运营中心)服务
凭据获取方式:
本技能支持通过以下方式获取华为云凭据(优先级从高到低):
凭据类型:
  • 长期AK/SK:永久凭据,无需security_token
  • 临时AK/SK:有效期有限的临时凭据,需要security_token
  1. 环境变量(默认)(最高优先级)
    • HW_ACCESS_KEY
      :华为云访问密钥AK
    • HW_SECRET_KEY
      :华为云访问密钥SK
    • HW_SECURITY_TOKEN
      :安全令牌(可选,仅临时凭据需要)
  2. 用户指定的配置文件或其他环境变量(当默认环境变量不可用时使用)
    • 交互过程中用户指定的配置文件路径或其他环境变量
  3. 交互式输入(当以上两种方式都未提供时)
    • 程序会提示用户输入AK/SK等凭据信息
重要说明:
  • 长期AK/SK:永久有效的凭据,无需security_token
  • 临时AK/SK:通过IAM接口获取,有效期有限,必须提供security_token

Architecture Diagram

架构图

This skill is built on multiple Huawei Cloud services, involving the following cloud services and components:
User/Agent      ──────▶│   Flexus L Instance   │──────▶│   OpenClaw App    │──────▶│ Model Config     │ ──────▶│  Channel Config     │ 
(Skill caller)           (Target Host)               (AI Agent Platform)          (API_BASE/KEY)       (WeCom/Feishu/DingTalk/QQ)            
Component Description:
  • User/Agent: Skill caller that triggers OpenClaw deployment operations via natural language or API
  • Flexus L Instance: Huawei Cloud Elastic Cloud Server, serving as the target host for OpenClaw deployment
  • OpenClaw App: AI Agent collaboration platform running on the Flexus L instance
  • Model Config: Configuration for external LLM services (API_BASE, API_KEY, MODEL_IDS, PROVIDER)
  • Channel Config: Messaging channel configuration (WeCom, Feishu, DingTalk, QQ)

本技能基于多个华为云服务构建,涉及以下云服务和组件:
User/Agent      ──────▶│   Flexus L Instance   │──────▶│   OpenClaw App    │──────▶│ Model Config     │ ──────▶│  Channel Config     │ 
(Skill caller)           (Target Host)               (AI Agent Platform)          (API_BASE/KEY)       (WeCom/Feishu/DingTalk/QQ)            
组件说明
  • User/Agent:通过自然语言或API触发OpenClaw部署操作的技能调用者
  • Flexus L Instance:华为云弹性云服务器,作为OpenClaw部署的目标主机
  • OpenClaw App:运行在Flexus L实例上的AI Agent协作平台
  • Model Config:外部大语言模型服务的配置(API_BASE、API_KEY、MODEL_IDS、PROVIDER)
  • Channel Config:消息通道配置(企业微信、飞书、钉钉、QQ)

How to Use This Skill

如何使用本技能

Command Execution and Instructions

命令执行与说明

1. Deploy OpenClaw Instance (Create Huawei Cloud Flexus L Instance and deploy OpenClaw AI Agent platform) - Two Command Modes:

1. 部署OpenClaw实例(创建华为云Flexus L实例并部署OpenClaw AI Agent平台)——两种命令模式:

Command 1: Interactive Mode (The program will prompt for required parameters step by step)
bash
python scripts/caller.py deploy
Command 2: Non-Interactive Mode
bash
undefined
命令1:交互式模式(程序会逐步提示所需参数)
bash
python scripts/caller.py deploy
命令2:非交互式模式
bash
undefined

Using long-term AK/SK (no security-token needed)

使用长期AK/SK(无需安全令牌)

python scripts/caller.py deploy --name openclaw-{timestamp} --region cn-north-4 --ak <AK> --sk <SK> --non-interactive
python scripts/caller.py deploy --name openclaw-{timestamp} --region cn-north-4 --ak <AK> --sk <SK> --non-interactive

Using temporary AK/SK (security-token required)

使用临时AK/SK(需要安全令牌)

python scripts/caller.py deploy --name openclaw-{timestamp} --region cn-north-4 --ak <Temporary AK> --sk <Temporary SK> --security-token <Security Token> --non-interactive

**Parameter Description**:
| Parameter | Description | Required (Non-interactive) | Default (Interactive) | Example |
|-----------|-------------|----------------------------|-----------------------|---------|
| --name | OpenClaw instance name | No | openclaw-{timestamp} | `--name openclaw-1780689482000` |
| --region | Target region ID where L instance (OpenClaw deployed server) is located | No | cn-north-4 | `--region cn-north-4` |
| --ak | Huawei Cloud Access Key AK (supports both long-term and temporary) | Yes | Prompted | `--ak AXXX...` |
| --sk | Huawei Cloud Access Key SK (supports both long-term and temporary) | Yes | Prompted | `--sk SXXX...` |
| --security-token | Security token for temporary credentials (optional, only required for temporary AK/SK) | No | Prompted | `--security-token XXXX...` |
| --non-interactive | Enable non-interactive mode | No | false | `--non-interactive` |

Note: OpenClaw only supports deployment in the following regions before June 2026 (before deploying to other regions, you can remind users to check the official website for the latest supported regions): China North-Beijing-4 (cn-north-4), China East-Shanghai-1 (cn-east-3), China South-Guangzhou (cn-south-1), China Southwest-Guiyang-1 (cn-southwest-2)

**Command Examples**:
```bash
python scripts/caller.py deploy --name openclaw-{timestamp} --region cn-north-4 --ak <Temporary AK> --sk <Temporary SK> --security-token <Security Token> --non-interactive

**参数说明**:
| 参数 | 描述 | 非交互式模式是否必填 | 交互式模式默认值 | 示例 |
|-----------|-------------|----------------------------|-----------------------|---------|
| --name | OpenClaw实例名称 | 否 | openclaw-{timestamp} | `--name openclaw-1780689482000` |
| --region | L实例(部署OpenClaw的服务器)所在的目标区域ID | 否 | cn-north-4 | `--region cn-north-4` |
| --ak | 华为云访问密钥AK(支持长期和临时) | 是 | 提示输入 | `--ak AXXX...` |
| --sk | 华为云访问密钥SK(支持长期和临时) | 是 | 提示输入 | `--sk SXXX...` |
| --security-token | 临时凭据的安全令牌(可选,仅临时AK/SK需要) | 否 | 提示输入 | `--security-token XXXX...` |
| --non-interactive | 启用非交互式模式 | 否 | false | `--non-interactive` |

注意:2026年6月前,OpenClaw仅支持在以下区域部署(部署到其他区域前,可提醒用户查看官网最新支持区域):中国北方-北京四(cn-north-4)、中国东部-上海一(cn-east-3)、中国南方-广州(cn-south-1)、中国西南-贵阳一(cn-southwest-2)

**命令示例**:
```bash

Example 1: Deploy with default configuration (interactive, will prompt for required parameters)

示例1:使用默认配置部署(交互式,会提示输入所需参数)

python scripts/caller.py deploy
python scripts/caller.py deploy

Example 2: Non-interactive mode deployment (suitable for automation scripts, creates directly without user confirmation)

示例2:非交互式模式部署(适合自动化脚本,无需用户确认直接创建)

python scripts/caller.py deploy --name openclaw-1780689482000 --region cn-north-4 --ak <Temporary AK> --sk <Temporary SK> --security-token <Security Token> --non-interactive

**Default Configuration for Huawei Cloud Flexus L Instance when Deploying OpenClaw Instance**
| Configuration Item | Default Value | Description |
|--------------------|---------------|-------------|
| **Image** | OpenClaw 2026.1.30 | OpenClaw application image version |
| **Plan Spec** | hf.small.1.linux or ahf.small.1.linux | hf.small.1.linux for Beijing/Shanghai/Guangzhou, ahf.small.1.linux for Guiyang |
| **Charging Mode** | Monthly subscription | prePaid mode |
| **EVS Disk** | 50GB | System disk size |
| **CBR Backup** | 50GB | Cloud backup capacity |
| **HSS Host Security** | Enabled | Host security service |

**Execution Result and Status Code Description**:
- On success, returns order ID and instance ID (resource ID, used for subsequent model and channel installation)
- Instance creation takes approximately 2 minutes, progress can be viewed in Huawei Cloud console. During instance creation, the installation of models and channels will not be affected, and subsequent commands can be executed directly.
*Status Code Description*: Status codes "200", "201", "202" all indicate successful instance creation.
---
python scripts/caller.py deploy --name openclaw-1780689482000 --region cn-north-4 --ak <Temporary AK> --sk <Temporary SK> --security-token <Security Token> --non-interactive

**部署OpenClaw实例时华为云Flexus L实例的默认配置**
| 配置项 | 默认值 | 描述 |
|--------------------|---------------|-------------|
| **镜像** | OpenClaw 2026.1.30 | OpenClaw应用镜像版本 |
| **规格** | hf.small.1.linux 或 ahf.small.1.linux | 北京/上海/广州区域使用hf.small.1.linux,贵阳区域使用ahf.small.1.linux |
| **计费模式** | 包月订阅 | prePaid模式 |
| **EVS磁盘** | 50GB | 系统盘大小 |
| **CBR备份** | 50GB | 云备份容量 |
| **HSS主机安全** | 已启用 | 主机安全服务 |

**执行结果与状态码说明**:
- 成功时,返回订单ID和实例ID(资源ID,用于后续模型和通道安装)
- 实例创建约需2分钟,进度可在华为云控制台查看。实例创建过程中,模型和通道的安装不会受影响,可直接执行后续命令。
*状态码说明*:状态码"200"、"201"、"202"均表示实例创建成功。
---

2. Configure (Install) Large Model Parameters on L Instance with OpenClaw Installed - Two Command Modes (Requires deploying OpenClaw instance first)

2. 在已安装OpenClaw的L实例上配置(安装)大语言模型参数——两种命令模式(需先部署OpenClaw实例)

Command 1: Interactive Mode (The program will prompt for resource ID, region, model and other parameters step by step)
bash
python scripts/caller.py maas
Command 2: Non-Interactive Mode
bash
undefined
命令1:交互式模式(程序会逐步提示资源ID、区域、模型等参数)
bash
python scripts/caller.py maas
命令2:非交互式模式
bash
undefined

Using long-term AK/SK (no security-token needed)

使用长期AK/SK(无需安全令牌)

python scripts/caller.py maas --resource-id <Instance Resource ID> --region-id cn-north-4 --model-params '<Model configuration parameters>' --ak <AK> --sk <SK> --non-interactive
python scripts/caller.py maas --resource-id <Instance Resource ID> --region-id cn-north-4 --model-params '<Model configuration parameters>' --ak <AK> --sk <SK> --non-interactive

Using temporary AK/SK (security-token required)

使用临时AK/SK(需要安全令牌)

python scripts/caller.py maas --resource-id <Instance Resource ID> --region-id cn-north-4 --model-params '<Model configuration parameters>' --ak <Temporary AK> --sk <Temporary SK> --security-token <Security Token> --non-interactive
**Parameter Description**:
| Parameter | Description | Required (Non-interactive) | Default (Interactive) | Example |
|-----------|-------------|----------------------------|-----------------------|---------|
| --resource-id | L instance resource ID (instance ID returned after deploying OpenClaw instance) | Yes | Prompted | `--resource-id 0e1234567890abcdef` |
| --region-id | Region ID where L instance is located, consistent with the region selected when deploying the instance | Yes | Prompted | `--region-id cn-north-4` |
| --model-params | Model configuration parameters (JSON format), note: parameters must use valid JSON format, keys and values must be wrapped in double quotes | Yes | Prompted | --model-params '{"provider":"huawei","api_key":"your_maas_api_key","model_ids":["deepseek-v3.2"]}' |
| --ak | Huawei Cloud Access Key AK (supports both long-term and temporary) | Yes | Prompted | `--ak AXXX...` |
| --sk | Huawei Cloud Access Key SK (supports both long-term and temporary) | Yes | Prompted | `--sk SXXX...` |
| --security-token | Security token for temporary credentials (optional, only required for temporary AK/SK) | No | Prompted | `--security-token XXXX...` |
| --timeout | Script execution timeout (seconds) | No | 600 | `--timeout 900` |
| --non-interactive | Enable non-interactive mode | No | false | `--non-interactive` |

**model-params Field Description**:
| Field | Description | Required |
|-------|-------------|----------|
| provider | Model provider name (e.g., "huawei") or API address (e.g., "https://api.openai.com/v1") | Yes |
| api_key | Model API key | Yes |
| model_ids | Array of model IDs to install (non-empty), e.g., ["gpt-4", "gpt-3.5-turbo"] | Yes |

**Command Examples**:

```bash
python scripts/caller.py maas --resource-id <Instance Resource ID> --region-id cn-north-4 --model-params '<Model configuration parameters>' --ak <Temporary AK> --sk <Temporary SK> --security-token <Security Token> --non-interactive
**参数说明**:
| 参数 | 描述 | 非交互式模式是否必填 | 交互式模式默认值 | 示例 |
|-----------|-------------|----------------------------|-----------------------|---------|
| --resource-id | L实例资源ID(部署OpenClaw实例后返回的实例ID) | 是 | 提示输入 | `--resource-id 0e1234567890abcdef` |
| --region-id | L实例所在区域ID,需与部署实例时选择的区域一致 | 是 | 提示输入 | `--region-id cn-north-4` |
| --model-params | 模型配置参数(JSON格式),注意:参数必须使用有效的JSON格式,键和值必须用双引号包裹 | 是 | 提示输入 | --model-params '{"provider":"huawei","api_key":"your_maas_api_key","model_ids":["deepseek-v3.2"]}' |
| --ak | 华为云访问密钥AK(支持长期和临时) | 是 | 提示输入 | `--ak AXXX...` |
| --sk | 华为云访问密钥SK(支持长期和临时) | 是 | 提示输入 | `--sk SXXX...` |
| --security-token | 临时凭据的安全令牌(可选,仅临时AK/SK需要) | 否 | 提示输入 | `--security-token XXXX...` |
| --timeout | 脚本执行超时时间(秒) | 否 | 600 | `--timeout 900` |
| --non-interactive | 启用非交互式模式 | 否 | false | `--non-interactive` |

**model-params字段说明**:
| 字段 | 描述 | 是否必填 |
|-------|-------------|----------|
| provider | 模型提供商名称(如"huawei")或API地址(如"https://api.openai.com/v1") | 是 |
| api_key | 模型API密钥 | 是 |
| model_ids | 要安装的模型ID数组(非空),例如["gpt-4", "gpt-3.5-turbo"] | 是 |

**命令示例**:

```bash

Example 1: Install Huawei Cloud MaaS platform models with long-term AK/SK

示例1:使用长期AK/SK安装华为云MaaS平台模型

python scripts/caller.py maas
--resource-id 0e1234567890abcdef
--region-id cn-north-4
--model-params '{"provider":"huawei","api_key":"your_maas_api_key","model_ids":["deepseek-v3.2","qwen3-235b-a22b"]}'
--ak <Temporary AK> --sk <Temporary SK> --security-token <Security Token> --non-interactive
python scripts/caller.py maas
--resource-id 0e1234567890abcdef
--region-id cn-north-4
--model-params '{"provider":"huawei","api_key":"your_maas_api_key","model_ids":["deepseek-v3.2","qwen3-235b-a22b"]}'
--ak <Temporary AK> --sk <Temporary SK> --security-token <Security Token> --non-interactive

Example 2: Install Huawei Cloud MaaS platform models with temporary AK/SK

示例2:使用临时AK/SK安装华为云MaaS平台模型

python scripts/caller.py maas
--resource-id 0e1234567890abcdef
--region-id cn-north-4
--model-params '{"provider":"huawei","api_key":"your_maas_api_key","model_ids":["deepseek-v3.2","qwen3-235b-a22b"]}'
--ak <Temporary AK> --sk <Temporary SK> --security-token <Security Token> --non-interactive
python scripts/caller.py maas
--resource-id 0e1234567890abcdef
--region-id cn-north-4
--model-params '{"provider":"huawei","api_key":"your_maas_api_key","model_ids":["deepseek-v3.2","qwen3-235b-a22b"]}'
--ak <Temporary AK> --sk <Temporary SK> --security-token <Security Token> --non-interactive

Example 3: Install custom OpenAI compatible models with long-term AK/SK

示例3:使用长期AK/SK安装自定义OpenAI兼容模型

python scripts/caller.py maas
--resource-id 0e1234567890abcdef
--region-id cn-north-4
--model-params '{"provider":"https://api.openai.com/v1","api_key":"your_openai_key","model_ids":["gpt-4"]}'
--ak <Temporary AK> --sk <Temporary SK> --security-token <Security Token> --non-interactive

**Status Code Description**: Status codes "200", "201", "202" all indicate successful model installation.
python scripts/caller.py maas
--resource-id 0e1234567890abcdef
--region-id cn-north-4
--model-params '{"provider":"https://api.openai.com/v1","api_key":"your_openai_key","model_ids":["gpt-4"]}'
--ak <Temporary AK> --sk <Temporary SK> --security-token <Security Token> --non-interactive

**状态码说明**:状态码"200"、"201"、"202"均表示模型安装成功。

3. channel - Configure (Install) Channels on L Instance with OpenClaw Installed - Two Command Modes (Requires deploying OpenClaw instance first)

3. channel - 在已安装OpenClaw的L实例上配置(安装)通道——两种命令模式(需先部署OpenClaw实例)

Command 1: Interactive Mode
bash
python scripts/caller.py channel
Command 2: Non-Interactive Mode
bash
undefined
命令1:交互式模式
bash
python scripts/caller.py channel
命令2:非交互式模式
bash
undefined

Using long-term AK/SK (no security-token needed)

使用长期AK/SK(无需安全令牌)

python scripts/caller.py channel --resource-id <Instance Resource ID> --region-id cn-north-4 --channel-list '<JSON array>' --ak <AK> --sk <SK> --non-interactive
python scripts/caller.py channel --resource-id <Instance Resource ID> --region-id cn-north-4 --channel-list '<JSON array>' --ak <AK> --sk <SK> --non-interactive

Using temporary AK/SK (security-token required)

使用临时AK/SK(需要安全令牌)

python scripts/caller.py channel --resource-id <Instance Resource ID> --region-id cn-north-4 --channel-list '<JSON array>' --ak <Temporary AK> --sk <Temporary SK> --security-token <Security Token> --non-interactive

**Parameter Description**:
| Parameter | Description | Required (Non-interactive) | Default (Interactive) | Example |
|-----------|-------------|----------------------------|-----------------------|---------|
| --resource-id | L instance resource ID (instance ID returned after deploying OpenClaw instance) | Yes | Prompted | `--resource-id 0e1234567890abcdef` |
| --region-id | Region ID where instance is located, consistent with the region selected when deploying the instance | Yes | Prompted | `--region-id cn-north-4` |
| --channel-list | Channel configuration (JSON array format) | Yes | Prompted | '[{"channel":"wecom","id":"xxx","secret":"xxx"},{"channel":"feishu","id":"yyy","secret":"yyy"}]' |
| --ak | Huawei Cloud Access Key AK (supports both long-term and temporary) | Yes | Prompted | `--ak AXXX...` |
| --sk | Huawei Cloud Access Key SK (supports both long-term and temporary) | Yes | Prompted | `--sk SXXX...` |
| --security-token | Security token for temporary credentials (optional, only required for temporary AK/SK) | No | Prompted | `--security-token XXXX...` |
| --timeout | Script execution timeout (seconds) | No | 600 | `--timeout 900` |
| --non-interactive | Enable non-interactive mode | No | false | `--non-interactive` |

**channel JSON Object Field Description**:
| Field | Description | Required |
|-------|-------------|----------|
| channel | Channel type: `wecom` (WeCom), `feishu` (Feishu), `dingtalk` (DingTalk), `qqbot` (QQ) | Yes |
| id | Bot ID/APP ID/Client ID | Yes |
| secret | Bot secret/APP secret/Client secret | Yes |



**Command Examples**:
```bash
python scripts/caller.py channel --resource-id <Instance Resource ID> --region-id cn-north-4 --channel-list '<JSON array>' --ak <Temporary AK> --sk <Temporary SK> --security-token <Security Token> --non-interactive

**参数说明**:
| 参数 | 描述 | 非交互式模式是否必填 | 交互式模式默认值 | 示例 |
|-----------|-------------|----------------------------|-----------------------|---------|
| --resource-id | L实例资源ID(部署OpenClaw实例后返回的实例ID) | 是 | 提示输入 | `--resource-id 0e1234567890abcdef` |
| --region-id | 实例所在区域ID,需与部署实例时选择的区域一致 | 是 | 提示输入 | `--region-id cn-north-4` |
| --channel-list | 通道配置(JSON数组格式) | 是 | 提示输入 | '[{"channel":"wecom","id":"xxx","secret":"xxx"},{"channel":"feishu","id":"yyy","secret":"yyy"}]' |
| --ak | 华为云访问密钥AK(支持长期和临时) | 是 | 提示输入 | `--ak AXXX...` |
| --sk | 华为云访问密钥SK(支持长期和临时) | 是 | 提示输入 | `--sk SXXX...` |
| --security-token | 临时凭据的安全令牌(可选,仅临时AK/SK需要) | 否 | 提示输入 | `--security-token XXXX...` |
| --timeout | 脚本执行超时时间(秒) | 否 | 600 | `--timeout 900` |
| --non-interactive | 启用非交互式模式 | 否 | false | `--non-interactive` |

**channel JSON对象字段说明**:
| 字段 | 描述 | 是否必填 |
|-------|-------------|----------|
| channel | 通道类型:`wecom`(企业微信)、`feishu`(飞书)、`dingtalk`(钉钉)、`qqbot`(QQ) | 是 |
| id | 机器人ID/APP ID/客户端ID | 是 |
| secret | 机器人密钥/APP密钥/客户端密钥 | 是 |



**命令示例**:
```bash

Example 1: Install multiple channels (WeCom + Feishu) using long-term AK/SK

示例1:使用长期AK/SK安装多个通道(企业微信+飞书)

python scripts/caller.py channel
--resource-id 0e1234567890abcdef
--region-id cn-north-4
--channel-list '[{"channel":"wecom","id":"xxx","secret":"xxx"},{"channel":"feishu","id":"yyy","secret":"yyy"}]'
--ak <AK> --sk <SK> --non-interactive
python scripts/caller.py channel
--resource-id 0e1234567890abcdef
--region-id cn-north-4
--channel-list '[{"channel":"wecom","id":"xxx","secret":"xxx"},{"channel":"feishu","id":"yyy","secret":"yyy"}]'
--ak <AK> --sk <SK> --non-interactive

Example 2: Install multiple channels (WeCom + Feishu) using temporary AK/SK

示例2:使用临时AK/SK安装多个通道(企业微信+飞书)

python scripts/caller.py channel
--resource-id 0e1234567890abcdef
--region-id cn-north-4
--channel-list '[{"channel":"wecom","id":"xxx","secret":"xxx"},{"channel":"feishu","id":"yyy","secret":"yyy"}]'
--ak <Temporary AK> --sk <Temporary SK> --security-token <Security Token> --non-interactive
**Status Code Description**: Status codes "200", "201", "202" all indicate successful channel installation.
python scripts/caller.py channel
--resource-id 0e1234567890abcdef
--region-id cn-north-4
--channel-list '[{"channel":"wecom","id":"xxx","secret":"xxx"},{"channel":"feishu","id":"yyy","secret":"yyy"}]'
--ak <Temporary AK> --sk <Temporary SK> --security-token <Security Token> --non-interactive
**状态码说明**:状态码"200"、"201"、"202"均表示通道安装成功。

Web UI Access

Web UI访问

Web UI access needs to be manually enabled in Huawei Cloud console, operation steps:
  1. Log in to Huawei Cloud Flexus Application Server L Instance Console
  2. Find your OpenClaw instance in the instance list
  3. Click the instance name to enter the details page
  4. In the left menu of the details page, find and click "Application Details" option, then enter the "Basic Configuration" tab
  5. In the "Basic Configuration" tab, find the "Access OpenClaw Web Interface" option at the top left, click the "Enable" button. You will then get the URL address to access the OpenClaw Web interface.
Web UI访问需在华为云控制台手动启用,操作步骤:
  1. 登录华为云Flexus应用服务器L实例控制台
  2. 在实例列表中找到你的OpenClaw实例
  3. 点击实例名称进入详情页
  4. 在详情页左侧菜单中找到并点击「应用详情」选项,然后进入「基础配置」标签页
  5. 在「基础配置」标签页的左上方找到「访问OpenClaw Web界面」选项,点击「启用」按钮。随后你将获得访问OpenClaw Web界面的URL地址。

Code Structure, File Responsibilities and Key Functions

代码结构、文件职责与核心函数

This skill uses a modular architecture for easier maintenance:
scripts/
├── caller.py          # Main entry - command line argument parsing, parameter parsing, command routing
├── lib.py             # Core library - L instance creation, COC script management
├── utils.py           # Utility functions - input prompts, credential configuration, region information
├── deploy.py          # Deployment module - `do_deploy_openclaw()` function for OpenClaw instance creation
├── models.py          # Model module - remote COC large model installation (with prerequisite checks), related functions `do_install_maas()`, `_check_prerequisites()`
├── channels.py        # Channel module - remote COC channel installation (with prerequisite checks), related functions `do_install_channel()`, `_check_prerequisites()`
├── gateway.py         # Gateway module - gateway status query (only for prerequisite checks), related functions `do_check_gateway()`
└── uniagent.py        # UniAgent module - UniAgent status query (only for prerequisite checks), `do_check_uniagent()`
本技能采用模块化架构,便于维护:
scripts/
├── caller.py          # 主入口 - 命令行参数解析、参数处理、命令路由
├── lib.py             # 核心库 - L实例创建、COC脚本管理
├── utils.py           # 工具函数 - 输入提示、凭据配置、区域信息
├── deploy.py          # 部署模块 - `do_deploy_openclaw()`函数用于创建OpenClaw实例
├── models.py          # 模型模块 - 远程COC大语言模型安装(含前置检查),相关函数`do_install_maas()`、`_check_prerequisites()`
├── channels.py        # 通道模块 - 远程COC通道安装(含前置检查),相关函数`do_install_channel()`、`_check_prerequisites()`
├── gateway.py         # 网关模块 - 网关状态查询(仅用于前置检查),相关函数`do_check_gateway()`
└── uniagent.py        # UniAgent模块 - UniAgent状态查询(仅用于前置检查),`do_check_uniagent()`

Parameter Confirmation

参数确认

Deployment Parameters

部署参数

  • --name: OpenClaw instance name, optional parameter, default is
    openclaw-{timestamp}
  • --region: Target region ID, optional parameter, default is
    cn-north-4
  • --ak: Huawei Cloud temporary Access Key AK, required parameter
  • --sk: Huawei Cloud temporary Access Key SK, required parameter
  • --security-token: Security token for temporary credentials (required), required parameter
  • --non-interactive: Enable non-interactive mode, optional parameter
  • --name:OpenClaw实例名称,可选参数,默认值为
    openclaw-{timestamp}
  • --region:目标区域ID,可选参数,默认值为
    cn-north-4
  • --ak:华为云临时访问密钥AK,必填参数
  • --sk:华为云临时访问密钥SK,必填参数
  • --security-token:临时凭据的安全令牌(必填),必填参数
  • --non-interactive:启用非交互式模式,可选参数

Model Configuration Parameters

模型配置参数

  • --resource-id: L instance resource ID (instance ID returned after deploying OpenClaw instance), required parameter
  • --region-id: Region ID where L instance is located, consistent with the region selected when deploying the instance, required parameter
  • --model-params: Model configuration parameters (JSON format), required parameter
    • provider
      : Model provider name (e.g., "huawei") or API address (e.g., "https://api.openai.com/v1")
    • api_key
      : Model API key
    • model_ids
      : Array of model IDs to install (non-empty)
  • --ak: Huawei Cloud temporary Access Key AK, required parameter
  • --sk: Huawei Cloud temporary Access Key SK, required parameter
  • --security-token: Security token for temporary credentials (required), required parameter
  • --timeout: Script execution timeout (seconds), optional parameter, default 600 seconds
  • --resource-id:L实例资源ID(部署OpenClaw实例后返回的实例ID),必填参数
  • --region-id:L实例所在区域ID,需与部署实例时选择的区域一致,必填参数
  • --model-params:模型配置参数(JSON格式),必填参数
    • provider
      :模型提供商名称(如"huawei")或API地址(如"https://api.openai.com/v1")
    • api_key
      :模型API密钥
    • model_ids
      :要安装的模型ID数组(非空)
  • --ak:华为云临时访问密钥AK,必填参数
  • --sk:华为云临时访问密钥SK,必填参数
  • --security-token:临时凭据的安全令牌(必填),必填参数
  • --timeout:脚本执行超时时间(秒),可选参数,默认600秒

Channel Configuration Parameters

通道配置参数

  • --resource-id: L instance resource ID (instance ID returned after deploying OpenClaw instance), required parameter
  • --region-id: Region ID where L instance is located, consistent with the region selected when deploying the instance, required parameter
  • --channel-list: Channel configuration (JSON array format), optional parameter
    • channel
      : Channel type:
      wecom
      (WeCom),
      feishu
      (Feishu),
      dingtalk
      (DingTalk),
      qqbot
      (QQ), required
    • id
      : Bot ID, required
    • secret
      : Bot secret, required
  • --ak: Huawei Cloud temporary Access Key AK, required parameter
  • --sk: Huawei Cloud temporary Access Key SK, required parameter
  • --security-token: Security token for temporary credentials (required), required parameter
  • --timeout: Script execution timeout (seconds), optional parameter, default 600 seconds
  • --resource-id:L实例资源ID(部署OpenClaw实例后返回的实例ID),必填参数
  • --region-id:L实例所在区域ID,需与部署实例时选择的区域一致,必填参数
  • --channel-list:通道配置(JSON数组格式),可选参数
    • channel
      :通道类型:
      wecom
      (企业微信)、
      feishu
      (飞书)、
      dingtalk
      (钉钉)、
      qqbot
      (QQ),必填
    • id
      :机器人ID,必填
    • secret
      :机器人密钥,必填
  • --ak:华为云临时访问密钥AK,必填参数
  • --sk:华为云临时访问密钥SK,必填参数
  • --security-token:临时凭据的安全令牌(必填),必填参数
  • --timeout:脚本执行超时时间(秒),可选参数,默认600秒

Environment Variable Support

环境变量支持

All parameters can also be provided through environment variables:
  • HW_ACCESS_KEY
    : Huawei Cloud AK (corresponds to --ak parameter)
  • HW_SECRET_KEY
    : Huawei Cloud SK (corresponds to --sk parameter)
  • HW_SECURITY_TOKEN
    : Temporary credential security token (corresponds to --security-token parameter)
  • HW_PROJECT_ID
    : Huawei Cloud Project ID (optional)
所有参数也可通过环境变量提供:
  • HW_ACCESS_KEY
    :华为云AK(对应--ak参数)
  • HW_SECRET_KEY
    :华为云SK(对应--sk参数)
  • HW_SECURITY_TOKEN
    :临时凭据安全令牌(对应--security-token参数)
  • HW_PROJECT_ID
    :华为云项目ID(可选)

Common Issues Quick Solutions

常见问题快速解决方案

IssueSolution
Instance creation failedCheck AK/SK permissions, ensure permission to create Flexus L instances
Model installation failedCheck if UniAgent status is ONLINE, if API Key is correct, if model-params parameter strictly uses JSON format
Channel installation failedCheck if bot parameters are correct, if bot is created on platform, if channel-list parameter strictly uses JSON array format
问题解决方案
实例创建失败检查AK/SK权限,确保具备创建Flexus L实例的权限
模型安装失败检查UniAgent状态是否为ONLINE,API Key是否正确,model-params参数是否严格使用JSON格式
通道安装失败检查机器人参数是否正确,机器人是否已在平台创建,channel-list参数是否严格使用JSON数组格式