Huawei Cloud CCE container migration planning skill using Python SDK dispatcher for read-only resource inventory, dependency mapping, migration batch design,...
文档
huawei-cloud-cce-env-assessment
试用为华为云 CCE 容器环境生成一份按维度打分的云原生评估报告,并给出分优先级的整改建议。
它能做什么
按照五步流程对华为云 CCE 容器环境进行评估:配置采集、环境检查、信息收集、指标打分、报告生成。它逐项读取 references/cloud-native-checklist.xlsx 中的评估指标,通过 hcloud 命令与本地 Python 脚本采集数据,围绕六个云原生维度(服务化、安全、自动化、弹性、可观测性、韧性)进行打分,最终输出 Excel 评分表与 HTML 评估报告,报告中包含一张雷达图与一张阶梯图。整改建议按 P0/P1/P2 优先级列出,优先级由指标得分决定。
什么时候用它
- 对 CCE 集群进行云原生成熟度评估
- 审计现有 CCE 工作负载的配置与运维状况
- 产出一份可分发的 HTML 评估报告
- 基于评估结果生成 P0/P1/P2 整改清单
技能文档
Huawei Cloud — CCE ENV Assessment Skill
Overview
Automatically collects evaluation metrics of the huawei cloud container environment, outputs metric scoring tables by dimension, and generates evaluation reports and improvement suggestions.
Prerequisites
Prerequisite check: Huawei Cloud CLI (hcloud) >= 7.2.2 required Run
hcloud versionto verify the version is >= 7.2.2, andhcloud configure listto confirm a profile exists. If it is not installed or the version is too low, see references/koocli-installation-guide.md for the installation guide.
hcloud version
hcloud configure list
Prerequisite check: Python >= 3.6 required Run
python --versionto verify the version is >= 3.6.0 If it is not installed or the version is too low, The skill execution is interrupted proactively, and the user is prompted to install Python 3.6 or later. If the Python version is 3.6.x, run the following command to upgrade pip to the latest versionpip3 install --user --upgrade 'pip<22'
⚠️ Mandatory Execution Rules
Rule 1: Step-by-step Confirmation
After each step, you MUST:
- Print the completion status of the current step
- Show the output produced by that step
- Every Skill run starts from Step 1 — do NOT skip Step 1 and jump into later steps
- Strictly follow this Skill's rules and wait for user confirmation after every step
- Strictly follow the described flow; do not perform extra operations. If anything errors, return the error to the user as-is — do not try to fix it yourself
- All execution rules take precedence over efficiency
Do NOT chain multiple steps in a single run!
Rule 2: Fixed Directories
After each step, you MUST:
- Save all intermediate files under the
data/directory
Rule 3: Permission Issues
- When you hit a permission problem, try
sudo. If that does not resolve it, error out and abort the Skill flow
Rule 4: Anti-skip Check
Before executing each step, verify that its prerequisites are satisfied:
| Step | Prerequisite |
|---|---|
| Step 2: Environment check | Step 1 is complete; Huawei Cloud AK/SK have been obtained |
| Step 3: Container environment collection | Step 2 is complete with no errors; data/ and artifacts/ are emptied |
| Step 4: Metric scoring | Step 3 is complete; data/cloud-native-collection.md has been generated |
| Step 5: Report generation | Step 4 is complete; artifacts/cloud-native-summary.xlsx has been generated |
Rule 5: Information Collection Method
- For every piece of information collected, prefer the Huawei Cloud KooCLI tool (
hcloudcommands)
Rule 6: Status Tracking
📋 Cloud-Native Container Assessment — Status Board
├────────────────────────────────────────────┤
│ Step 1: Configuration [⏳ In progress]│
│ Step 2: Environment check [○ Pending] │
│ Step 3: Information collect [○ Pending] │
│ Step 4: Metric scoring [○ Pending] │
│ Step 5: Report generation [○ Pending] │
└────────────────────────────────────────────┘
After each step, update the status board:
📋 Cloud-Native Container Assessment — Status Board
├────────────────────────────────────────────┤
│ Step 1: Configuration [✅ Done] │
│ Step 2: Environment check [✅ Done] │
│ Step 3: Information collect [✅ Done] │
│ Step 4: Metric scoring [✅ Done] │
│ Step 5: Report generation [⏳ In progress]│
└────────────────────────────────────────────┘
🔐 Permission Boundary
The AI is allowed to:
- Follow the SKILL steps exactly
- Invoke only the scripts specified in the SKILL
- Return errors as-is when problems occur
The AI is forbidden to:
- Temporarily modify or bypass the workflow
- Switch to an alternative approach (e.g. fall back to Markdown when html fails)
- Modify any script or configuration without user consent
- Perform any operation not explicitly listed in the SKILL
Handling out-of-bounds operations
Any out-of-bounds operation must stop immediately and wait for user confirmation. Continuing is forbidden.
Core Workflows
Step 1: Configuration
Prompt the user for the environment configuration.
| Item | Description | Example |
|---|---|---|
| Huawei Cloud AK/SK | Access Key and Secret Key for Huawei Cloud API | AK/SK = HPUAN3EWCG... / 1Bt5sdDU.. |
| Region | Region where the container cluster lives | region = cn-north-4 |
| Cluster name | CCE cluster name (Step 1 only) | cce_name = dify-cce-cluster |
| Dockerfile source | Source code repository (containing the Dockerfile) | Dockerfile = https://github.com/langgenius/dify |
Once the user supplies the configuration, save the values into environment variables HWC_AK, HWC_SK, CCE_Region, CCE_NAME, Dockerfile_REPO_URL respectively.
Diamond Gate 1: Get user confirmation before Step 2.
Step 2: Environment Check
Using the configuration provided in Step 1, verify that the environment is reachable and that local runtime dependencies are present.
- Use
hcloudwith AK/SK to access the Huawei Cloud CCE environment and confirm it is reachable, If it is not installed or the version is too low, see references/koocli-installation-guide.md for the installation guide. - Verify that the local Python environment is working correctly, Python version requirement is greater than 3.6, If the Python version is 3.6.x, run the following command to upgrade pip to the latest version
pip3 install --user --upgrade 'pip<22' - Check whether the Python dependency library is installed. Go to the references directory. If the Python version is 3.6.x, run the command
python3 -m pip install -r requirements.txt. If the Python version is later than 3.7, Execute commands using a Python virtual environmentpip3 install -r requirements.txt. - Empty any historical files inside
data/; ifdata/does not exist, create it - Empty any historical files inside
artifacts/; ifartifacts/does not exist, create it - Once the checks complete, return the result to the user and wait for confirmation on whether to install dependencies or to continue
Step 3: Container Environment Information Collection
For every metric listed in references/cloud-native-checklist.xlsx, collect the corresponding environment information.
- Every collection run MUST be driven by the actual metric items in
references/cloud-native-checklist.xlsxand MUST invokescripts/collect_all.pyto collect fresh data — do NOT reuse historical or cached data - Acceptance metric: the metric item being assessed
- Quantified target: the reference standard for that metric
- Acceptance method: how the environment information for that metric is collected
- During collection, if any required piece of information cannot be obtained, explore alternative ways to retrieve it and ask the user for confirmation
- Once collection is complete for every metric, fill the collection method (including, but not limited to, Python scripts and executed commands) and the collected data into
templates/cloud-native-assessment-template.md, write the result todata/cloud-native-collection.md, and show it to the user
Step 4: Metric Scoring
Based on the collection data in data/cloud-native-collection.md, score each metric:
- Compare the collected data against the quantified target to derive an acceptance verdict (Fully Satisfied / Mostly Satisfied / Partially Satisfied / Not Satisfied; metrics that cannot be compared are recorded as Not Satisfied; "Not Applicable" and "Not Evaluated" both roll up into Not Satisfied, and the basis field must state that the metric is N/A or Not Evaluated) and a scoring basis (describe based on the collected data — include the metric's environment information, the collection method used, and the reason for non-satisfaction)
- Convert the verdict to a score: Fully Satisfied = 3, Mostly Satisfied = 2, Partially Satisfied = 1, Not Satisfied = 0
- Invoke
scripts/score_and_excel.pyto produce a fresh scoring sheet, output as Excel containing the columns: number, cloud-native dimension, level, acceptance metric, quantified target, acceptance method, description, acceptance verdict, score, full score, scoring basis. Save toartifacts/cloud-native-summary.xlsx
Step 5: Report Generation
Using the contents of the scoring sheet artifacts/cloud-native-summary.xlsx, generate the final assessment report:
-
The final report uses
templates/report_template.mdas its base template -
The report title is fixed as "Cloud-Native Assessment Report"
-
The report contains 4 chapters; Chapter 1 and Chapter 2 reuse the content of
templates/report_template.mddirectly -
Chapter 3 of the final report is populated from the scoring sheet
artifacts/cloud-native-summary.xlsx -
Invoke
scripts/make_charts.pyagainst thecloud-native-summary.xlsxproduced in Step 4 to generate a radar chart and a staircase chartChart generation requirements:
- Radar chart: group metrics by cloud-native dimension. The score for each dimension = (sum of that dimension's metric scores / sum of that dimension's full scores) × 5. The radar has exactly six dimensions: Service-orientation, Security, Automation, Elasticity, Observability, Resilience. If a metric belongs to multiple dimensions (e.g. metric #1 belongs to both Service-orientation and Automation), it contributes to the scoring of every dimension it belongs to.
- Staircase chart: overall score = (sum of all metric scores / sum of all full scores) × 5. Stage thresholds — score ≤ 1: Traditional; 1 < score ≤ 2: Basic Cloud; 2 < score ≤ 3: Service-Oriented; 3 < score ≤ 4: Automated; score > 4: Intelligent. The chart must visually render as stairs.
-
Place the generated radar chart into report section 3.3.3 and the staircase chart into 3.3.4
-
Replace Chapter 4 of the final report with the actual remediation recommendations
-
Based on the assessment results, output remediation recommendations by P0/P1/P2 priority:
- P0: Not Satisfied (0 pts) — mandatory items
- P1: Partially Satisfied (1 pt) — items to fix
- P2: Mostly Satisfied (2 pts) — recommended improvements
-
Invoke
scripts/make_report_html.pyto generate the final report as a html, written toartifacts/cloud-native-report.html
Core Commands
Get cluster ID and basic info
hcloud cce ListClusters --cli-region=cn-north-4
Get cluster kubeconfig certificate
hcloud cce CreateKubernetesClusterCert \
--cli-region=cn-north-4 \
--cluster_id=a5659ec8-55b5........ \
--duration=1
Get detailed cluster info
hcloud cce ListClusters --cli-region=cn-north-4
Authentication parameters
| Auth mode | Required | Optional |
|---|---|---|
| AKSK | --cli-access-key, --cli-secret-key | --cli-security-token |
| Profile | --cli-profile | --cli-mode, --cli-region |
Output Format
- The final report is delivered as a html file
- The scoring sheet is delivered as an Excel file
- All output files are saved under the
artifacts/directory
Verification
Post-install verification
- Version check:
hcloud versionMUST return 7.2.2 or higher - Help check:
hcloud --helpMUST list the available services
Authentication verification
- Profile check:
hcloud configure listMUST show the configured profile
Best Practices
- Evaluate and analyze the container environment running on Huawei Cloud.
- Harden the configuration of existing container clusters and modify the cluster configuration based on the optimization suggestions.
References
report_template.md— Final report templatecloud-native-checklist.xlsx— Description of assessment metricsrequirements.txt— Python dependency library
Scripts
collect_all.py— Main assessment script; integrates all collection modulesmake_charts.py— Chart generation scriptmake_report.py— Report generation scriptscore_and_excel.py— Scoring sheet generation script
Templates
report_template.md— Final report templatecloud-native-assessment-template.md— Data collection template
Notes
- Make sure the Huawei Cloud container environment is reachable
- Make sure the Huawei Cloud credentials are valid and not expired
- If the Huawei Cloud Koocli tool and Python environment cannot be automatically installed using the skill, it is recommended that users install them manually.
- Currently only public-network access to the container environment is supported
- Output may be truncated during execution; clearing historical data and re-running the Skill is recommended in that case
相关技能
Huawei Cloud CCE cost optimization analysis skill. Identifies idle resources, oversized CPU/memory requests, low-utilization nodes, 24h/7d utilization trends...
查询华为云 CCE 集群 Pod/Node 指标及 ECS、ELB、EIP、NAT 资源指标,支持基于阈值的异常检测。
Query Huawei Cloud CCE (Cloud Container Engine) clusters and report their names, IDs, statuses, versions, and node information across a project. Use when listing CCE clusters, looking up a cluster name, showing cluster detail, or inspecting cluster status and nodes. Provides read-only inspection for daily operations, inventory reporting, and troubleshooting. Triggers include: CCE query, list CCE clusters, query CCE cluster names, CCE cluster inventory, show CCE cluster, list CCE nodes, check cluster status, CCE集群查询, 查询CCE集群, CCE集群名称, CCE集群列表, 查看CCE集群.
Queries Huawei Cloud monitoring and enterprise project resources (CES/EPS). Covers alarm rules, alarm histories, alarm templates, dashboards, notification ma...
Use when performing periodic, low-risk health checks on Huawei Cloud CCE clusters — daily inspection, quick health check, heartbeat summary, or continuous op...
huaweicloud-skills-team 的更多技能
浏览全部技能用自然语言控制华为昇腾 NPU,本地或 SSH 远程执行 npu-smi 命令。
在华为云昇腾 910B DevServer 上按单机或双机(16 卡)拓扑部署并测试 LLM、VL、Embedding、Rerank 模型。
面向华为云资源的只读查询能力,用于资源清点、核对与参数发现。
通过本地 Python SDK 只读查询华为云 IAM 资源(用户、用户组、策略、委托、AK/SK、MFA、安全设置)。
在华为云 Flexus L 实例上一键部署 OpenClaw AI Agent 平台,并完成模型与通道配置。
在华为云 Flexus L 实例上一键部署 Hermes AI Agent 平台,并完成大模型与机器人通道配置。