← 返回 Skills 市场
huaweiclouddev

huawei-cloud-sac-yolo

作者 huaweicloud-skills-team · GitHub ↗ · v0.0.1 · MIT-0
cross-platform ⚠ suspicious
35
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install huawei-cloud-sac-yolo
功能描述
Deploy YOLO training platform on Huawei Cloud with GPU ECS via Terraform. Use when building or managing a YOLO GPU training environment. Trigger: deploy YOLO...
使用说明 (SKILL.md)

Huawei Cloud YOLO Training Platform

Overview

Deploy the "Quickly Build YOLO Visual Model Training Platform" solution end-to-end on Huawei Cloud. The platform provides GPU-accelerated ECS for YOLO model training, with full infrastructure provisioning via Terraform.

Architecture: ECS (GPU, P2s/Pi2) and VPC and Subnet and Security Group (ICMP/SSH/HTTP) and EIP (300 Mbit/s) and EVS (100 GB system + 500 GB data) and CBR (backup vault + policy). Cloud-init installs Docker and launches the YOLO container on GPU.

Tool chain: Playwright CLI (solution info extraction) + Python 3.8+ (helper scripts) + Terraform 1.15.4+ (declarative deployment). No KooCLI — all resource operations through Terraform.

Prerequisites

  • Python 3.8+, Playwright CLI, Terraform 1.15.4+ — see CLI Installation Guide
  • Huawei Cloud AK/SK via environment variables (HW_ACCESS_KEY, HW_SECRET_KEY); if not set, prompt user to manually edit terraform.auto.tfvars.json to fill in AK/SK
  • IAM user with sufficient permissions or rf_admin_trust agency — see IAM Policies

Security

  • 🚫 Never expose AK/SK in conversation or output
  • 🚫 Never ask user to type AK/SK in chat
  • ✅ Prefer IAM users over primary account
  • ✅ Modification ops (apply, destroy) require explicit user confirmation

Core Commands

Placeholder values (see Parameters for per-OS resolution):

Placeholder Linux / macOS Windows
\x3Cpython> python3 python
\x3Cscript_dir> ./scripts ./scripts
\x3Ctemp_dir> /tmp $env:TEMP
# 1. Extract solution info
\x3Cpython> \x3Cscript_dir>/extract_sac_deploy_info.py \
  --url "https://www.huaweicloud.com/solution/implementations/quickly-build-a-yolo-training-platform.html" \
  --out \x3Ctemp_dir>/sac_selected.json

# 2. Download and normalize template
\x3Cpython> \x3Cscript_dir>/download_tf_template_file.py \
  --url "https://documentation-samples.obs.cn-north-4.myhuaweicloud.com/solution-as-code-publicbucket/solution-as-code-moudle/quickly-build-a-yolo-training-platform/quickly-build-a-yolo-training-platform.tf" \
  --out-dir \x3Ctemp_dir>/yolo-workdir

\x3Cpython> \x3Cscript_dir>/normalize_tf_providers.py \x3Ctemp_dir>/yolo-workdir \
  --region "cn-north-4"

# 3. List variables for review
\x3Cpython> \x3Cscript_dir>/list_tf_variables.py \x3Ctemp_dir>/yolo-workdir

# 4. Deploy
terraform init
terraform plan
# ⛔ STOP — Review the plan output above. Do NOT auto-apply.
# Confirm with the user (AskUserQuestion or equivalent) before proceeding.
# Only after explicit user confirmation:
terraform apply

# 5. Add YOLO UI security group rule
# Prompt user to manually add an ingress rule for TCP port 8001
# via Huawei Cloud console (VPC > Security Groups > Add Rule).
# Use restricted CIDR — do NOT open to all addresses.
# Wait for user confirmation before continuing.

# 6. Verify
terraform state list
terraform output -json

# 7. Cleanup
terraform destroy

Workflow

1. Extract solution info

\x3Cpython> \x3Cscript_dir>/extract_sac_deploy_info.py \
  --url "\x3Csolution_detail_page_url>" \
  --out \x3Ctemp_dir>/sac_selected.json

After extraction, display the results to the user:

  • Solution name: title field from output JSON
  • Estimated price: estimated_price_text field
  • Deploy links: list each text and url from deploy_links array
  • If title or estimated_price_text is empty, warn the user and suggest manual verification on the solution page

2. Download and normalize template

\x3Cpython> \x3Cscript_dir>/download_tf_template_file.py \
  --url "\x3Ctf_template_url>" \
  --out-dir \x3Ctemp_dir>/yolo-workdir

\x3Cpython> \x3Cscript_dir>/normalize_tf_providers.py \x3Ctemp_dir>/yolo-workdir \
  --region "cn-north-4"

normalize_tf_providers.py writes terraform.auto.tfvars.json (including region and other parameters). If environment variables HW_ACCESS_KEY/HW_SECRET_KEY are not set, AK/SK fields are left empty. Prompt the user to manually edit the file to fill in AK/SK, then continue to the next step.

3. Confirm variables

\x3Cpython> \x3Cscript_dir>/list_tf_variables.py \x3Ctemp_dir>/yolo-workdir

Review with user. Block apply if sensitive variables are empty/weak.

4. Deploy

STOP — Before running terraform apply, review the terraform plan output and confirm with the user (AskUserQuestion or equivalent). Do NOT auto-apply. Only proceed after explicit user confirmation.

5. Add YOLO UI security group rule

The Terraform template does not include an ingress rule for TCP port 8001, which is required for the YOLO training platform web UI. After deployment, prompt the user to manually add an ingress rule for TCP port 8001 via Huawei Cloud console (VPC > Security Groups > Add Rule). Use your own IP or a restricted CIDR — do NOT open to all addresses.

6. Verify

See Verification Method and Acceptance Criteria.

7. Cleanup

Parameters

Parameter Required Default Constraint
region Yes cn-north-4 Only supported region
AK/SK Yes Env vars HW_ACCESS_KEY/HW_SECRET_KEY; if absent, prompt user to edit tfvars.json
ecs_password Yes 8-26 chars, mixed case + digit + special
ecs_flavor No p2s.2xlarge.8
system_disk_size No 100 40-1024 GB
data_disk_size No 500 40-1024 GB
bandwidth_size No 300 1-300 Mbit/s
charging_unit No month month or year
charging_period No 1

Post-Deploy Output

  • terraform output -json — includes access_instructions with YOLO platform URL
  • YOLO UI: http://\x3CEIP>:8001 (allow ~10 min for cloud-init)
  • Verify: ssh root@\x3CEIP> "docker ps" and ssh root@\x3CEIP> "nvidia-smi"

Output Format

terraform output -json returns JSON with the following key fields:

{
  "access_instructions": { "value": "http://\x3CEIP>:8001" },
  "ecs_eip":             { "value": "\x3CElastic IP>" },
  "ecs_id":              { "value": "\x3CECS Instance ID>" },
  "vpc_id":              { "value": "\x3CVPC ID>" }
}

All script outputs are in JSON format: extract_sac_deploy_info.py outputs solution info JSON, list_tf_variables.py outputs variable list JSON.

Verification

Verify deployment results step by step:

  1. Template extraction — Check \x3Ctemp_dir>/sac_selected.json contains solution_name, price fields
  2. Template download — Confirm .tf files exist under \x3Ctemp_dir>/yolo-workdir and terraform validate passes
  3. Variable confirmation — Sensitive variables (AK/SK, password) are not empty in list_tf_variables.py output
  4. Deploymentterraform plan shows no errors; user confirmed deployment; after apply, terraform state list shows all expected resources
  5. Service reachability — Wait 10-15 min for cloud-init, then curl -s http://\x3CEIP>:8001 returns 200
  6. GPUssh root@\x3CEIP> "nvidia-smi" shows GPU device, ssh root@\x3CEIP> "docker ps" shows YOLO container running

See Verification Method and Acceptance Criteria for details.

Best Practices

  • Always terraform plan before apply
  • Start with charging_unit=month; switch to year after validation
  • Allow 10-15 min post-deploy for cloud-init
  • Monitor GPU via nvidia-smi; adjust ecs_flavor if underutilized

Reference Documents

Document Description
CLI Installation Guide Install Python, Playwright CLI, Terraform
IAM Policies Permissions, agency setup, failure handling
Verification Method Step-by-step verification per workflow step
Acceptance Criteria Full deployment acceptance checklist
Related Commands Terraform, scripts, remote access reference

Notes

  • Only cn-north-4 region supported
  • terraform.auto.tfvars.json is sensitive — never commit to VCS
  • normalize_tf_providers.py writes region to tfvars; AK/SK left empty if env vars not set, user must fill manually
  • Tool chain: Playwright CLI + Python + Terraform — no KooCLI
安全使用建议
Review this skill carefully before installing. Use short-lived or least-privilege cloud credentials, avoid writing AK/SK values to terraform.auto.tfvars.json unless you explicitly intend to, add the file to ignore rules if generated, and require a manual review of terraform plan before any terraform apply that can create chargeable resources.
能力评估
Purpose & Capability
Terraform-based cloud provisioning is coherent with a GPU deployment skill, but the provider-normalization script reportedly also writes access_key and secret_key values, which is broader than simple provider normalization.
Instruction Scope
The referenced verification flow includes writing credentials and running terraform apply, but the supplied evidence does not show a clear consent checkpoint, cost warning, or secret-handling guidance before those high-impact actions.
Install Mechanism
No malicious installer, obfuscation, or deceptive package behavior is shown; the concern is in runtime scripts and deployment instructions rather than installation.
Credentials
Reading HW_ACCESS_KEY and HW_SECRET_KEY from the environment is expected for cloud deployment, but persisting them to terraform.auto.tfvars.json expands the exposure surface for sensitive credentials.
Persistence & Privilege
terraform.auto.tfvars.json is automatically consumed by Terraform, so plaintext credentials may persist silently in a workspace; terraform apply can also create billable cloud resources.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install huawei-cloud-sac-yolo
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /huawei-cloud-sac-yolo 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.0.1
Initial release of the Huawei Cloud SAC YOLO deployment skill. - Deploys a full YOLO GPU training environment on Huawei Cloud via Terraform, including ECS (GPU), VPC, EIP, EVS, and CBR. - Provides step-by-step workflow: solution info extraction, template download, variable confirmation, deployment, manual security group configuration, and verification. - Enforces best practices for security (never expose or ask AK/SK in chat), user confirmation before modifications, and restricted network rules. - Outputs all scripts and deployment results in structured JSON for easy review and automation compatibility. - Includes detailed prerequisites, parameter options, verification steps, and CLI instructions for Linux/macOS and Windows environments.
元数据
Slug huawei-cloud-sac-yolo
版本 0.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

huawei-cloud-sac-yolo 是什么?

Deploy YOLO training platform on Huawei Cloud with GPU ECS via Terraform. Use when building or managing a YOLO GPU training environment. Trigger: deploy YOLO... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 35 次。

如何安装 huawei-cloud-sac-yolo?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install huawei-cloud-sac-yolo」即可一键安装,无需额外配置。

huawei-cloud-sac-yolo 是免费的吗?

是的,huawei-cloud-sac-yolo 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

huawei-cloud-sac-yolo 支持哪些平台?

huawei-cloud-sac-yolo 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 huawei-cloud-sac-yolo?

由 huaweicloud-skills-team(@huaweiclouddev)开发并维护,当前版本 v0.0.1。

💬 留言讨论