huaweicloud-devkit 1.1.2-next.0 → 1.1.2-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/plugins/marketplace.json +18 -18
- package/README.md +182 -38
- package/README.zh-CN.md +180 -36
- package/bin/dsh-postinstall.cjs +77 -0
- package/bin/setup.cjs +7 -4
- package/cordis.patch.yml +13 -0
- package/integrations/atomcode/hooks/huaweicloud-telemetry.js +181 -0
- package/integrations/atomcode/hooks.json +9 -0
- package/integrations/dsh/hook-plugin.mjs +148 -0
- package/integrations/hermes/hooks/huaweicloud-telemetry.py +238 -0
- package/integrations/hermes/manifest.yaml +43 -0
- package/integrations/opencode/hooks/skill-tracker.js +115 -0
- package/integrations/opencode/opencode.json +1 -4
- package/integrations/workbuddy/hooks/telemetry-tracker.py +226 -0
- package/package.json +74 -43
- package/plugins/huaweicloud-core/.claude-plugin/plugin.json +4 -17
- package/plugins/huaweicloud-core/.codex-plugin/plugin.json +23 -33
- package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +4 -17
- package/plugins/huaweicloud-core/.hermes-plugin/plugin.json +30 -0
- package/plugins/huaweicloud-core/.mcp.json +2 -5
- package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +4 -18
- package/plugins/huaweicloud-core/assets/icon.png +0 -0
- package/plugins/huaweicloud-core/assets/logo-dark.png +0 -0
- package/plugins/huaweicloud-core/assets/logo.png +0 -0
- package/plugins/huaweicloud-core/hooks/huaweicloud-safety.py +104 -28
- package/plugins/huaweicloud-core/openclaw.plugin.json +20 -0
- package/plugins/huaweicloud-core/safety/policy.json +75 -99
- package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +196 -35
- package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +38 -34
- package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +21 -20
- package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +19 -19
- package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +38 -32
- package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +30 -30
- package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +20 -20
- package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +31 -31
- package/plugins/huaweicloud-core/skills/huawei-deployment/SKILL.md +21 -20
- package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +40 -31
- package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +8 -1
- package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +6 -0
- package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +45 -37
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +57 -6
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +11 -9
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/hc-activity.md +27 -0
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +13 -13
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +44 -39
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +12 -10
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +21 -20
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +19 -19
- package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +20 -20
- package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +27 -23
- package/plugins/huaweicloud-core/skills/huawei-iac/SKILL.md +93 -0
- package/plugins/huaweicloud-core/skills/huawei-iac/references/architectures.md +83 -0
- package/plugins/huaweicloud-core/skills/huawei-iac/references/resource-catalog.md +107 -0
- package/plugins/huaweicloud-core/skills/huawei-iac/references/state-file.md +104 -0
- package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +30 -30
- package/plugins/huaweicloud-core/skills/huawei-iam/references/policy-examples.md +65 -39
- package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +9 -9
- package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +33 -25
- package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +46 -45
- package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-create.md +19 -19
- package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +12 -7
- package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +13 -12
- package/plugins/huaweicloud-core/skills/huawei-obs/references/single-file-share.md +4 -4
- package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +71 -61
- package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +776 -44
- package/plugins/huaweicloud-core/skills/huawei-sandbox/references/framework-commands.md +84 -0
- package/plugins/huaweicloud-core/skills/huawei-sandbox/references/nginx-templates.md +100 -0
- package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +36 -29
- package/plugins/huaweicloud-core/skills/huawei-voucher/SKILL.md +57 -0
- package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +39 -39
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +22 -15
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +20 -19
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/subnet.md +15 -15
- package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +23 -20
- package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/SKILL.md +13 -13
- package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/agents/openai.yaml +3 -3
- package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +21 -2
- package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +3 -3
- package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +30 -4
- package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +3 -3
- package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +68 -54
- package/plugins/huaweicloud-core/skills/huaweicloud-core/agents/openai.yaml +3 -3
- package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +6 -6
- package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +15 -1
- package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +0 -1
- package/plugins/huaweicloud-core/skills/huaweicloud-safety/agents/openai.yaml +3 -3
- package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +36 -34
- package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +3 -3
- package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +142 -5
- package/plugins/huaweicloud-core/src/auth/credentials.mjs +217 -5
- package/plugins/huaweicloud-core/src/auth/reconcile.mjs +174 -0
- package/plugins/huaweicloud-core/src/auth/service.mjs +57 -2
- package/plugins/huaweicloud-core/src/data/icons-manifest.v1.json +3517 -0
- package/plugins/huaweicloud-core/src/detect-framework.mjs +366 -0
- package/plugins/huaweicloud-core/src/hcloud-cli.mjs +203 -16
- package/plugins/huaweicloud-core/src/icon-library.mjs +176 -0
- package/plugins/huaweicloud-core/src/mcp-protocol.mjs +88 -0
- package/plugins/huaweicloud-core/src/mcp-server-remote.mjs +107 -0
- package/plugins/huaweicloud-core/src/mcp-server.mjs +154 -99
- package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +20 -102
- package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +11 -4
- package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +4 -1
- package/plugins/huaweicloud-core/src/safety-policy.mjs +123 -68
- package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +48 -12
- package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +25 -26
- package/plugins/huaweicloud-core/src/sandbox/sandbox-file-server.py +45 -0
- package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +943 -10
- package/plugins/huaweicloud-core/src/sandbox/uninstall-cleanup.mjs +50 -0
- package/plugins/huaweicloud-core/src/search-market.mjs +49 -14
- package/plugins/huaweicloud-core/src/setup-cli.mjs +3091 -498
- package/plugins/huaweicloud-core/src/telemetry/agent-detect.mjs +40 -0
- package/plugins/huaweicloud-core/src/telemetry/agent-registry.mjs +328 -0
- package/plugins/huaweicloud-core/src/telemetry/telemetry.mjs +378 -0
- package/plugins/huaweicloud-core/src/tools.mjs +1272 -146
- package/plugins/huaweicloud-core/src/update-check.mjs +383 -0
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +72 -38
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +10 -5
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +13 -16
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +12 -16
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +46 -31
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-tunnel-channel.mjs +268 -0
- package/plugins/huaweicloud-core/src/ws-exec/index.js +3 -0
- package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.js +40 -13
- package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +0 -190
- package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +0 -124
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: huawei-dew
|
|
3
|
-
description:
|
|
3
|
+
description: 'Use when managing secrets, credentials, encryption keys, certificates, or any sensitive data on Huawei Cloud. Covers CSMS (Cloud Secret Management Service) for secrets, KMS for encryption keys, and credential rotation. Triggers on: secret, credential, API key, token, password, encrypt, decrypt, KMS, CSMS, DEW, certificate, CSR, rotation. Activates for ANY task involving secrets or credentials — load this skill first before touching secrets.'
|
|
4
4
|
version: 1
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -16,64 +16,73 @@ Domain expertise for Huawei Cloud Data Encryption Workshop (DEW). Covers CSMS fo
|
|
|
16
16
|
|
|
17
17
|
## Critical Warnings
|
|
18
18
|
|
|
19
|
-
| Trap
|
|
20
|
-
|
|
21
|
-
| NEVER fetch secret values into agent context | Use {{resolve:csms:secret-id:SecretString:key}} runtime injection
|
|
22
|
-
| NEVER echo credentials in conversation
|
|
23
|
-
| KMS key deletion is irreversible
|
|
24
|
-
| Secret rotation requires automation
|
|
25
|
-
| Cross-account KMS needs grants
|
|
19
|
+
| Trap | Why |
|
|
20
|
+
| -------------------------------------------- | ------------------------------------------------------------------ |
|
|
21
|
+
| NEVER fetch secret values into agent context | Use {{resolve:csms:secret-id:SecretString:key}} runtime injection |
|
|
22
|
+
| NEVER echo credentials in conversation | AK/SK, passwords, tokens must never appear in chat |
|
|
23
|
+
| KMS key deletion is irreversible | 7-30 day pending deletion window. Once gone, data is unrecoverable |
|
|
24
|
+
| Secret rotation requires automation | Manual rotation risks stale credentials |
|
|
25
|
+
| Cross-account KMS needs grants | KMS keys are regional. Cross-region data needs grant setup |
|
|
26
26
|
|
|
27
27
|
## CSMS Operations
|
|
28
28
|
|
|
29
29
|
### Read-only (safe — metadata only)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
30
|
+
|
|
31
|
+
| Operation | Description |
|
|
32
|
+
| ------------------ | ------------------------------------------------------ |
|
|
33
|
+
| ListSecrets | List all secrets (names only, no values) |
|
|
34
|
+
| DescribeSecret | Get secret metadata (rotation config, KMS key, status) |
|
|
35
|
+
| ListSecretVersions | List version IDs and stages (no values) |
|
|
35
36
|
|
|
36
37
|
### Secret Value (blocked by policy — use runtime injection)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
|
38
|
+
|
|
39
|
+
| Operation | Safe Alternative |
|
|
40
|
+
| ----------------- | --------------------------------------------- |
|
|
41
|
+
| DownloadSecret | Use {{resolve:csms:secret-id}} in IaC or SDK |
|
|
40
42
|
| ShowSecretVersion | Use runtime injection, never in agent context |
|
|
41
|
-
| GetSecretValue
|
|
43
|
+
| GetSecretValue | Blocked. Use MCP proxy resolve pattern |
|
|
42
44
|
|
|
43
45
|
## KMS Operations
|
|
44
46
|
|
|
45
|
-
| Task
|
|
46
|
-
|
|
47
|
-
| List keys
|
|
48
|
-
| Create key | hcloud KMS CreateKey --key_alias=<name>
|
|
49
|
-
| Encrypt
|
|
50
|
-
| Decrypt
|
|
47
|
+
| Task | Command | Notes |
|
|
48
|
+
| ---------- | ------------------------------------------------------ | -------------------------- |
|
|
49
|
+
| List keys | hcloud KMS ListKeys | Read-only |
|
|
50
|
+
| Create key | hcloud KMS CreateKey --key_alias=<name> | Requires write approval |
|
|
51
|
+
| Encrypt | hcloud KMS EncryptData --key_id=<id> --plaintext=<b64> | Prefer SDK offline encrypt |
|
|
52
|
+
| Decrypt | hcloud KMS DecryptData (**BLOCKED**) | Use runtime injection |
|
|
51
53
|
|
|
52
54
|
## Runtime Injection Pattern
|
|
53
55
|
|
|
54
56
|
`ash
|
|
57
|
+
|
|
55
58
|
# Terraform / IaC
|
|
59
|
+
|
|
56
60
|
resource "huaweicloud_csms_secret" "db_password" {
|
|
57
|
-
|
|
61
|
+
secret_string = var.db_password # NEVER hardcode
|
|
58
62
|
}
|
|
59
63
|
|
|
60
64
|
# SDK
|
|
65
|
+
|
|
61
66
|
secret_value = client.get_secret(secret_id="my-secret")
|
|
67
|
+
|
|
62
68
|
# Use immediately, never print or store in context
|
|
63
69
|
|
|
64
70
|
# hcloud (for approved automation only)
|
|
65
|
-
|
|
71
|
+
|
|
72
|
+
hcloud CSMS DownloadSecretBlob --secret_name=<name>
|
|
73
|
+
|
|
66
74
|
# WARNING: Output goes to stdout. Pipe directly, never capture in agent.
|
|
75
|
+
|
|
67
76
|
`
|
|
68
77
|
|
|
69
78
|
## Troubleshooting
|
|
70
79
|
|
|
71
|
-
| Error
|
|
72
|
-
|
|
73
|
-
| Secret not found
|
|
74
|
-
| AccessDenied on CSMS | Missing IAM CSMS policy -> Add csms:DescribeSecret + kms:Decrypt
|
|
75
|
-
| KMS key disabled
|
|
76
|
-
| Rotation stuck
|
|
80
|
+
| Error | Root Cause -> Fix |
|
|
81
|
+
| -------------------- | --------------------------------------------------------------------------- |
|
|
82
|
+
| Secret not found | Wrong region or project -> Verify secret ARN includes region/project |
|
|
83
|
+
| AccessDenied on CSMS | Missing IAM CSMS policy -> Add csms:DescribeSecret + kms:Decrypt |
|
|
84
|
+
| KMS key disabled | Key scheduled for deletion or manually disabled -> Enable or create new key |
|
|
85
|
+
| Rotation stuck | Lambda/Python function error -> Check rotation function logs |
|
|
77
86
|
|
|
78
87
|
## Security Considerations
|
|
79
88
|
|
|
@@ -1,28 +1,35 @@
|
|
|
1
1
|
# CSMS Usage Guide
|
|
2
2
|
|
|
3
3
|
## Create Secret
|
|
4
|
+
|
|
4
5
|
hcloud CSMS CreateSecret --secret_name=prod-db-password --secret_string='{"password":"CHANGE_ME"}'
|
|
5
6
|
|
|
6
7
|
## List Secrets (metadata only)
|
|
8
|
+
|
|
7
9
|
hcloud CSMS ListSecrets
|
|
8
10
|
|
|
9
11
|
## Describe Secret
|
|
12
|
+
|
|
10
13
|
hcloud CSMS DescribeSecret --secret_name=prod-db-password
|
|
11
14
|
|
|
12
15
|
## List Versions
|
|
16
|
+
|
|
13
17
|
hcloud CSMS ListSecretVersions --secret_name=prod-db-password
|
|
14
18
|
|
|
15
19
|
## Runtime Injection (Terraform)
|
|
20
|
+
|
|
16
21
|
data "huaweicloud_csms_secret" "db" {
|
|
17
|
-
|
|
22
|
+
secret_name = "prod-db-password"
|
|
18
23
|
}
|
|
19
24
|
Use: data.huaweicloud_csms_secret.db.secret_string
|
|
20
25
|
|
|
21
26
|
## Rotation
|
|
27
|
+
|
|
22
28
|
- Enable auto-rotation: hcloud CSMS EnableSecretRotation --secret_name=<name> --rotation_interval=30
|
|
23
29
|
- Rotation function ARN: provide Lambda to generate new secret value
|
|
24
30
|
|
|
25
31
|
## Policy Rules
|
|
32
|
+
|
|
26
33
|
- hcloud CSMS DownloadSecret -> BLOCKED (use runtime injection)
|
|
27
34
|
- hcloud CSMS ShowSecretVersion -> BLOCKED
|
|
28
35
|
- hcloud CSMS ListSecrets -> ALLOWED (metadata only)
|
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
# KMS Usage Guide
|
|
2
2
|
|
|
3
3
|
## Create Key
|
|
4
|
+
|
|
4
5
|
hcloud KMS CreateKey --key_alias=app-encryption-key --key_description="Application data encryption"
|
|
5
6
|
|
|
6
7
|
## List Keys (metadata only)
|
|
8
|
+
|
|
7
9
|
hcloud KMS ListKeys
|
|
8
10
|
|
|
9
11
|
## Encrypt (offline preferred)
|
|
12
|
+
|
|
10
13
|
hcloud KMS EncryptData --key_id=<key-id> --plaintext=<base64-data>
|
|
11
14
|
|
|
12
15
|
## Decrypt (BLOCKED - use runtime)
|
|
16
|
+
|
|
13
17
|
DO NOT use hcloud KMS DecryptData directly.
|
|
14
18
|
Use SDK with KMS client in application runtime.
|
|
15
19
|
|
|
16
20
|
## Key Rotation
|
|
21
|
+
|
|
17
22
|
- Enable: hcloud KMS EnableKeyRotation --key_id=<key-id>
|
|
18
23
|
- Rotation period: 365 days (default)
|
|
19
24
|
|
|
20
25
|
## Key Deletion
|
|
26
|
+
|
|
21
27
|
- Schedule: hcloud KMS ScheduleKeyDeletion --key_id=<key-id> --pending_days=7
|
|
22
28
|
- Cancel during pending window: hcloud KMS CancelKeyDeletion --key_id=<key-id>
|
|
23
29
|
- WARNING: After deletion window passes, data encrypted with this key is UNRECOVERABLE
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: huawei-ecs
|
|
3
|
-
description:
|
|
3
|
+
description: 'Use when creating, configuring, managing, or troubleshooting ECS instances on Huawei Cloud. Covers instance creation (hcloud ECS CreateServers), flavor selection, image management, security groups, EIP binding, disk attachment, auto-scaling (AS), and troubleshooting. Triggers on: ECS, instance, flavor, image, security group, EIP, EVS, auto-scaling. NOT for: CCE container workloads (use huawei-cce), BMS bare metal servers.
|
|
4
|
+
|
|
5
|
+
HC活动场景(ECS+Nginx部署后端服务)触发词: HC活动, 华为HC, HC大会, 活动部署, HC ECS, 活动流程, 部署后端, Nginx部署, Nodejs部署, 上线后端服务, 部署个人网站, /hc-activity/.'
|
|
4
6
|
version: 1
|
|
5
7
|
---
|
|
6
8
|
|
|
@@ -17,47 +19,50 @@ Domain expertise for Huawei Cloud Elastic Cloud Server (ECS). Covers instance li
|
|
|
17
19
|
## Prerequisites
|
|
18
20
|
|
|
19
21
|
Before creating an ECS instance from scratch, you MUST have:
|
|
22
|
+
|
|
20
23
|
- A VPC (see `huawei-vpc`)
|
|
21
24
|
- A subnet with DNS configured (see `huawei-vpc`)
|
|
22
25
|
- A security group with application ports open (see `huawei-vpc`)
|
|
23
26
|
|
|
24
|
-
|
|
27
|
+
**Deployment routing guard**: if this skill was reached via a DEPLOYMENT intent (creating resources to host an application), load the `huawei-iac` skill FIRST and follow its orchestration flow - UNCONDITIONALLY. Reusing an existing VPC does NOT make it single-resource: the purchase still involves billable resources (ECS, system disk, EIP, keypair, SG rules) that must pass the cost+balance gate, batch approval, and state tracking. Only create directly here if the user explicitly declines the orchestration flow or the user only wants a lifecycle operation on an EXISTING instance (query/reboot/resize/delete). Discovery already done (flavors, images, AZs) carries over.
|
|
25
28
|
|
|
26
29
|
## Critical Warnings
|
|
27
30
|
|
|
28
|
-
| Trap
|
|
29
|
-
|
|
30
|
-
| Flavor not in region
|
|
31
|
-
| Security group denies all
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
31
|
+
| Trap | Why |
|
|
32
|
+
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
33
|
+
| Flavor not in region | Not all flavors available everywhere. Check with ECS ListFlavors first |
|
|
34
|
+
| Security group denies all | New SGs deny ALL inbound. Must explicitly add rules |
|
|
35
|
+
| Reusing existing security group | Existing SGs may have 0.0.0.0/0 rules. Before referencing, run hcloud VPC ListSecurityGroupRules --security_group_id.1=<id> to audit inbound rules |
|
|
36
|
+
| EIP bills when idle | Unattached EIP still incurs charges |
|
|
37
|
+
| Stopped instance still bills | Pay-per-use instances bill when stopped (unless shutdown-no-billing flavor) |
|
|
38
|
+
| Disk survives instance delete | Deleting instance does NOT delete system disk by default |
|
|
35
39
|
|
|
36
40
|
## Flavor Selection Guide
|
|
37
41
|
|
|
38
42
|
Flavor families are **region-dependent**. Always run `hcloud ECS ListFlavors --cli-region=<r>` to discover available flavors before recommending.
|
|
39
43
|
|
|
40
|
-
| Scenario
|
|
41
|
-
|
|
42
|
-
| Web app / microservices | General-purpose (ac, s, sn, c) | 2-4 vCPU, 4-8 GB RAM
|
|
43
|
-
| Database / big data
|
|
44
|
-
| AI inference
|
|
45
|
-
| HPC
|
|
44
|
+
| Scenario | Family | What to look for |
|
|
45
|
+
| ----------------------- | ------------------------------ | ------------------------- |
|
|
46
|
+
| Web app / microservices | General-purpose (ac, s, sn, c) | 2-4 vCPU, 4-8 GB RAM |
|
|
47
|
+
| Database / big data | Memory-optimized (m, r) | 4-8 vCPU, 16-64 GB RAM |
|
|
48
|
+
| AI inference | GPU (g, p) | 8+ vCPU, 64+ GB RAM + GPU |
|
|
49
|
+
| HPC | High-IO (h, ir, i) | 8+ vCPU, local SSD |
|
|
46
50
|
|
|
47
51
|
> See `references/flavors.md` for discovery workflow. **Do not hardcode flavor names** — availability changes by region and over time.
|
|
48
52
|
|
|
49
53
|
## Common Workflows
|
|
50
54
|
|
|
51
|
-
| Task
|
|
52
|
-
|
|
53
|
-
| List flavors
|
|
54
|
-
| Create instance
|
|
55
|
-
| Find by name
|
|
56
|
-
| Bind EIP
|
|
57
|
-
| Security group rule | hcloud VPC CreateSecurityGroupRule --security_group_id=<id> --direction=<direction> --protocol=<protocol>
|
|
58
|
-
| Attach disk
|
|
59
|
-
| Delete instance
|
|
60
|
-
| Reboot instance
|
|
55
|
+
| Task | Command | Steps |
|
|
56
|
+
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
|
57
|
+
| List flavors | hcloud ECS ListFlavors --cli-region=<region> | references/flavors.md |
|
|
58
|
+
| Create instance | hcloud ECS CreateServers --server.name=<n> --server.flavorRef=<id> --server.imageRef=<id> --server.nics.1.subnet_id=<id> --server.availability_zone=<az> | references/create-instance.md |
|
|
59
|
+
| Find by name | See "How to search for instances" below | |
|
|
60
|
+
| Bind EIP | hcloud EIP AssociatePublicips --publicip_id=<id> --publicip.associate_instance_id=<port-id> --publicip.associate_instance_type=PORT | Get port ID from `hcloud ECS ListServersDetails --server_id=<id>` → `OS-EXT-IPS:port_id` |
|
|
61
|
+
| Security group rule | hcloud VPC CreateSecurityGroupRule --security_group_id=<id> --direction=<direction> --protocol=<protocol> | references/sg.md |
|
|
62
|
+
| Attach disk | hcloud EVS AttachVolume --volume_id=<id> --server_id=<id> | references/evs.md |
|
|
63
|
+
| Delete instance | hcloud ECS DeleteServers --servers.1.id=<id> --delete_publicip=true --delete_volume=true | references/create-instance.md |
|
|
64
|
+
| Reboot instance | hcloud ECS BatchRebootServers --reboot.servers.1.id=<id> --reboot.type=SOFT | NOT `RebootServer` — that operation does not exist |
|
|
65
|
+
| HC活动部署 | 按量付费购买ECS+Nginx部署后端服务 | references/hc-activity.md |
|
|
61
66
|
|
|
62
67
|
## How to Search for Instances
|
|
63
68
|
|
|
@@ -112,6 +117,7 @@ ssh -o StrictHostKeyChecking=accept-new -i <key> root@<eip> 'command'
|
|
|
112
117
|
```
|
|
113
118
|
|
|
114
119
|
Example — re-run failed cloud-init setup manually:
|
|
120
|
+
|
|
115
121
|
```bash
|
|
116
122
|
ssh -o StrictHostKeyChecking=accept-new -i <key> root@<eip> 'dnf install -y nginx && systemctl enable --now nginx'
|
|
117
123
|
```
|
|
@@ -127,14 +133,14 @@ ssh -o StrictHostKeyChecking=accept-new -i <key> root@<eip> 'dnf install -y ngin
|
|
|
127
133
|
|
|
128
134
|
## Troubleshooting
|
|
129
135
|
|
|
130
|
-
| Error
|
|
131
|
-
|
|
132
|
-
| Cannot SSH
|
|
133
|
-
| Flavor unavailable
|
|
134
|
-
| Insufficient resources
|
|
135
|
-
| AuthFailure
|
|
136
|
-
| APIGW.0802 / region permission | IAM user has no access to this region -> IAM console → User → Permissions → add region, or switch to another region
|
|
137
|
-
| Cannot SSH (port 22 open)
|
|
136
|
+
| Error | Root Cause -> Fix |
|
|
137
|
+
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
138
|
+
| Cannot SSH | SG missing port 22 or no EIP -> Add ingress rule / Bind EIP |
|
|
139
|
+
| Flavor unavailable | Region limitation -> ListFlavors in target region |
|
|
140
|
+
| Insufficient resources | Stock depleted -> Change flavor or AZ |
|
|
141
|
+
| AuthFailure | Expired AK/SK -> re-run `npx huaweicloud-devkit auth init` |
|
|
142
|
+
| APIGW.0802 / region permission | IAM user has no access to this region -> IAM console → User → Permissions → add region, or switch to another region |
|
|
143
|
+
| Cannot SSH (port 22 open) | SCP policy may be blocking SSH. Check `SYS.0403` errors in command output -> Use cloud-init/user_data for initial setup instead. See `references/create-instance.md` §Bootstrap |
|
|
138
144
|
|
|
139
145
|
## Security Considerations
|
|
140
146
|
|
|
@@ -158,6 +164,7 @@ Prefer these tools over raw hcloud CLI — they enforce safety policies:
|
|
|
158
164
|
## Without MCP (Fallback)
|
|
159
165
|
|
|
160
166
|
If MCP tools are NOT available (new install, session not restarted):
|
|
167
|
+
|
|
161
168
|
- Raw hcloud commands WILL appear in shell history — passwords and secrets are at risk
|
|
162
169
|
- Always use key_name instead of adminPass
|
|
163
170
|
- Verify safety manually: no secret value reads, no credential file access
|
|
@@ -171,10 +178,10 @@ Fall back to hcloud CLI. State: "MCP unavailable, using local hcloud CLI."
|
|
|
171
178
|
|
|
172
179
|
Flexus is the lightweight ECS family. Two variants:
|
|
173
180
|
|
|
174
|
-
| Variant
|
|
175
|
-
|
|
176
|
-
| **Flexus L** | HCSS (hcss:lightInstances) |
|
|
177
|
-
| **Flexus X** | Standard ECS API
|
|
181
|
+
| Variant | API | CLI | Billing |
|
|
182
|
+
| ------------ | -------------------------- | :---------------------------------: | ------------------- |
|
|
183
|
+
| **Flexus L** | HCSS (hcss:lightInstances) | ❌ No hcloud — Python SDK only | Prepaid only |
|
|
184
|
+
| **Flexus X** | Standard ECS API | ✅ `hcloud ECS` with `x1.*` flavors | On-demand & prepaid |
|
|
178
185
|
|
|
179
186
|
For Flexus X, use standard ECS CreateServers flow with `x1.*` flavors. For Flexus L, manual console provisioning is recommended — no KooCLI path exists.
|
|
180
187
|
|
|
@@ -183,3 +190,4 @@ For Flexus X, use standard ECS CreateServers flow with `x1.*` flavors. For Flexu
|
|
|
183
190
|
- ECS Docs: https://support.huaweicloud.com/ecs/
|
|
184
191
|
- Flavor specs: references/flavors.md
|
|
185
192
|
- Create instance: references/create-instance.md
|
|
193
|
+
- HC活动 ECS+Nginx部署: references/hc-activity.md
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
**Before executing any command: If MCP tools are not available** (new session after install), restart your session or use hcloud CLI directly with caution. Commands using adminPass/password WILL appear in shell history — prefer key_name.
|
|
4
4
|
|
|
5
5
|
## 1. Discover flavors
|
|
6
|
+
|
|
6
7
|
hcloud ECS ListFlavors --cli-region=<region> --cli-output=json
|
|
7
8
|
Filter for `os_extra_specs.cond:operation:status == normal` — most results are abandoned. See references/flavors.md.
|
|
8
9
|
|
|
9
10
|
## 2. Find availability zones
|
|
11
|
+
|
|
10
12
|
hcloud ECS NovaListAvailabilityZones --cli-region=<region>
|
|
11
13
|
|
|
12
14
|
## 3. Find image
|
|
@@ -19,33 +21,78 @@ hcloud IMS ListImages --cli-region=<region> --__imagetype=gold --__isregistered=
|
|
|
19
21
|
If searching by name (e.g. --name="Ubuntu") returns empty: use broad search without name filter, pick from results. Some regions only offer Huawei Cloud EulerOS (HCE).
|
|
20
22
|
|
|
21
23
|
Common images (verify live per region):
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
|
|
25
|
+
| Image | Region | ID |
|
|
26
|
+
| ---------------- | ---------- | ------------------------------------ |
|
|
24
27
|
| HCE 2.0 Standard | cn-north-4 | 7d940784-ac0a-425f-b3fa-8478f1a1df70 |
|
|
25
|
-
| Ubuntu 22.04
|
|
26
|
-
| CentOS 8.2
|
|
28
|
+
| Ubuntu 22.04 | Query live | Query live |
|
|
29
|
+
| CentOS 8.2 | Query live | Query live |
|
|
27
30
|
|
|
28
31
|
## 4. Verify or create VPC/subnet
|
|
32
|
+
|
|
29
33
|
hcloud VPC ListVpcs --cli-region=<region>
|
|
30
34
|
hcloud VPC ListSubnets --vpc_id=<vpc-id> --cli-region=<region>
|
|
31
35
|
If no VPC/subnet exists: load `huawei-vpc` skill → create VPC → create subnet (with DNS) → create security group → return here.
|
|
32
36
|
|
|
33
37
|
## 5. Create keypair (recommended over adminPass)
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
|
|
39
|
+
**MCP 环境下必须用"本地生成 + 导入"流程**——`NovaCreateKeypair` 返回的 `private_key` 会被 MCP 脱敏管道替换为 `<redacted>`,而私钥仅此一次机会,读不到即作废:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# 1. 本地生成
|
|
43
|
+
ssh-keygen -t rsa -b 2048 -f ./<name> -N '""'
|
|
44
|
+
# 2. 导入公钥
|
|
45
|
+
hcloud ECS NovaCreateKeypair --keypair.name=<name> --keypair.public_key=<本地 .pub 文件内容>
|
|
46
|
+
# 3. 使用私钥文件 ./<name> 连接实例
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
> **陷阱**:删除密钥对的参数是 `--keypair_name=<name>`(path 风格),不是 `--keypair.name=<name>`(body 风格),混用报 USE_ERROR。
|
|
36
50
|
|
|
37
51
|
Password alternative:
|
|
52
|
+
|
|
38
53
|
- adminPass: 8-26 chars, must have uppercase + lowercase + digit + special char
|
|
39
54
|
- Passwords appear ONCE in creation output and are not retrievable
|
|
40
55
|
- Passwords are logged in shell history — this is a security risk
|
|
41
56
|
|
|
42
57
|
## 6. Create instance
|
|
58
|
+
|
|
43
59
|
hcloud ECS CreateServers --cli-region=<region> --server.name=<name> --server.flavorRef=<flavor-id> --server.imageRef=<image-id> --server.nics.1.subnet_id=<subnet-id> --server.root_volume.volumetype=<type> --server.root_volume.size=<minsize> --server.vpcid=<vpc-id> --server.availability_zone=<az> --server.key_name=<keypair-name> --server.count=1
|
|
44
60
|
|
|
45
61
|
### Bootstrap with user_data (cloud-init)
|
|
46
62
|
|
|
47
63
|
Use `--server.user_data` to run a cloud-init script at first boot. The value must be **base64-encoded**. This is also the recommended bootstrap path when SCP policies block SSH access — user_data serves as the full deployment path, no SSH needed.
|
|
48
64
|
|
|
65
|
+
**中国区镜像源强制规则**(实测:`deb.nodesource.com` 从北京四不可达,cloud-init 全链失败):
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
#!/bin/bash
|
|
69
|
+
set -eux
|
|
70
|
+
# Node: 用华为云镜像二进制直装,固定小版本,禁用 NodeSource/curl Nodesource 脚本
|
|
71
|
+
# ⚠️ ARCH 必须与实例架构一致:kc1/kc2 等鲲鹏 = arm64;s6/s7/c7 等 x86 = x64
|
|
72
|
+
NODE_VERSION=v22.14.0
|
|
73
|
+
ARCH=arm64 # x86 实例改为 x64
|
|
74
|
+
curl -fsSL "https://mirrors.huaweicloud.com/nodejs/${NODE_VERSION}/node-${NODE_VERSION}-linux-${ARCH}.tar.xz" -o /tmp/node.tar.xz
|
|
75
|
+
mkdir -p /usr/local/lib/nodejs && tar -xJf /tmp/node.tar.xz -C /usr/local/lib/nodejs
|
|
76
|
+
export PATH=/usr/local/lib/nodejs/node-${NODE_VERSION}-linux-${ARCH}/bin:$PATH
|
|
77
|
+
ln -sf /usr/local/lib/nodejs/node-${NODE_VERSION}-linux-${ARCH}/bin/{node,npm,npx} /usr/local/bin/
|
|
78
|
+
# npm registry 指向华为云
|
|
79
|
+
npm config set registry https://repo.huaweicloud.com/repository/npm/
|
|
80
|
+
# DNS 兜底(子网 dnsList 缺失时自救)
|
|
81
|
+
grep -q 100.125.0.20 /etc/resolv.conf || echo "nameserver 100.125.0.20" >> /etc/resolv.conf
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**可观测性模板**(实测教训:cloud-init 失败后无感知、固定 sleep 空等 ≈8 分钟):
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# 每阶段落 sentinel,收尾打标记;agent 侧轮询标记而非固定 sleep
|
|
88
|
+
touch /var/log/kit-step1-deps-done
|
|
89
|
+
# ... 构建完成后:
|
|
90
|
+
touch /var/log/kit-deploy-done # ← agent 轮询此文件出现即成功
|
|
91
|
+
# 失败时:cloud-init status --long + /var/log/cloud-init-output.log 定位
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
> **SSR/Next.js 项目强烈推荐"本地构建 + 上传产物"**(next standalone / `.next` + node_modules),服务器零构建可省 ~20 分钟且绕开服务器侧依赖解析风险。必须服务器构建时:先本地 `npm install` 验证 lockfile 再上传;已知坏组合黑名单——`isomorphic-dompurify@^2` 场景加 `overrides: {"html-encoding-sniffer":"4.0.0","jsdom":"25.0.1"}`(最新 jsdom→cssstyle→@csstools 链全 ESM-only,Next 14 构建期 CJS require 必挂,首个 `ERR_REQUIRE_ESM` 即跑 `npm ls <包>` 查依赖树,不要盲目重装)。
|
|
95
|
+
|
|
49
96
|
```bash
|
|
50
97
|
# Encode the script
|
|
51
98
|
user_data=$(cat << 'SCRIPT' | base64
|
|
@@ -63,6 +110,7 @@ hcloud ECS CreateServers ... --server.user_data=$user_data
|
|
|
63
110
|
> **Debugging**: If the script didn't run, check `/var/log/cloud-init-output.log` on the instance.
|
|
64
111
|
>
|
|
65
112
|
> **Recovery after failure**: user_data only executes on **first boot**. Restarting the instance will NOT re-run user_data scripts. If cloud-init fails (e.g., DNS missing → `yum`/`apt` cannot resolve repos):
|
|
113
|
+
>
|
|
66
114
|
> 1. Fix the root cause (e.g., update subnet DNS via `VPC UpdateSubnet`)
|
|
67
115
|
> 2. Either: SSH into the instance and run the setup commands manually (see `huawei-ecs` → SSH Connection Verification → Running Commands Inside the Instance)
|
|
68
116
|
> 3. Or: Delete the instance and recreate with corrected user_data (fresh boot)
|
|
@@ -70,6 +118,7 @@ hcloud ECS CreateServers ... --server.user_data=$user_data
|
|
|
70
118
|
## 7. EIP (two methods)
|
|
71
119
|
|
|
72
120
|
### Method A: Inline with CreateServers (Recommended)
|
|
121
|
+
|
|
73
122
|
Add EIP parameters to the `CreateServers` command in step 6:
|
|
74
123
|
|
|
75
124
|
```bash
|
|
@@ -84,6 +133,7 @@ hcloud ECS CreateServers \
|
|
|
84
133
|
> **Trap**: Parameter names differ from `EIP CreatePublicip`. Use `iptype` (not `type`), `sharetype` (not `share_type`), and `chargemode` (not `charging_mode`). Always verify with `hcloud ECS CreateServers --help`.
|
|
85
134
|
|
|
86
135
|
### Method B: Create and bind separately
|
|
136
|
+
|
|
87
137
|
hcloud EIP CreatePublicip --publicip.type=<type> --bandwidth.size=<size> --bandwidth.share_type=<share-type> --bandwidth.name=<name>
|
|
88
138
|
|
|
89
139
|
```bash
|
|
@@ -131,3 +181,4 @@ Warning: --delete_publicip and --delete_volume default to false. Set to true to
|
|
|
131
181
|
- Flavor: must be available in target region — always ListFlavors first
|
|
132
182
|
- Root volume: SSD 40GB min
|
|
133
183
|
- Keypair is safer than adminPass (passwords leak into shell history)
|
|
184
|
+
```
|
|
@@ -20,21 +20,23 @@ hcloud ECS ListFlavors --cli-region=<region> --cli-output=json \
|
|
|
20
20
|
|
|
21
21
|
## Step 2: Filter by scenario
|
|
22
22
|
|
|
23
|
-
| Scenario
|
|
24
|
-
|
|
25
|
-
| Web app / microservices | General-purpose families (ac, s, sn) | 2-4 vCPU, 4-8 GB RAM
|
|
26
|
-
| Database / big data
|
|
27
|
-
| AI inference / training | GPU families (g, p)
|
|
28
|
-
| HPC / high throughput
|
|
23
|
+
| Scenario | Look for | Preference |
|
|
24
|
+
| ----------------------- | ------------------------------------ | ---------------------- |
|
|
25
|
+
| Web app / microservices | General-purpose families (ac, s, sn) | 2-4 vCPU, 4-8 GB RAM |
|
|
26
|
+
| Database / big data | Memory-optimized families (m, r) | 4-8 vCPU, 16-64 GB RAM |
|
|
27
|
+
| AI inference / training | GPU families (g, p) | 8+ vCPU, 64+ GB RAM |
|
|
28
|
+
| HPC / high throughput | High-IO families (h, ir, i) | 8+ vCPU, local SSD |
|
|
29
29
|
|
|
30
30
|
## Step 3: Match spec from ListFlavors output
|
|
31
31
|
|
|
32
32
|
Common naming pattern: `<family><gen>.<type>x<ratio>`
|
|
33
|
+
|
|
33
34
|
- `ac6.2xlarge.2` = ac6 family, 2xlarge (8 vCPU), ratio 2 (vCPU:RAM = 1:2 → 16 GB)
|
|
34
35
|
|
|
35
36
|
## Do Not Hardcode
|
|
36
37
|
|
|
37
38
|
Flavor family names are region-dependent. Example discrepancies seen in testing:
|
|
39
|
+
|
|
38
40
|
- cn-south-1: ac6/ac7/kc/r-c7e (s6/m6/g6 NOT available)
|
|
39
41
|
- Other regions may have s6/m6/g6 families
|
|
40
42
|
|
|
@@ -44,10 +46,10 @@ Always run ListFlavors and pick from actual results.
|
|
|
44
46
|
|
|
45
47
|
`ListFlavors` returns ALL specs including abandoned ones. Before selecting a spec, check the `os_extra_specs` field in the JSON response:
|
|
46
48
|
|
|
47
|
-
| Field
|
|
48
|
-
|
|
49
|
+
| Field | Values | Meaning |
|
|
50
|
+
| -------------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
|
|
49
51
|
| `os_extra_specs.cond:operation:status` | `normal`, `abandon`, `sellout` | Only `normal` specs can be created. `abandon` = deprecated, `sellout` = out of stock |
|
|
50
|
-
| `os_extra_specs.cond:operation:az`
|
|
52
|
+
| `os_extra_specs.cond:operation:az` | e.g. `cn-north-4g(normal)` | Spec is available in this AZ. Multiple entries = multiple AZ support |
|
|
51
53
|
|
|
52
54
|
A flavor can be `normal` globally but `abandon` in specific AZs. Selecting an `abandon` or `sellout` spec will fail with **`Ecs.0019`** at creation time — there is no pre-flight validation in `ListFlavors`. If creation fails:
|
|
53
55
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# HC活动 ECS + Nginx/Node.js 部署后端服务
|
|
2
|
+
|
|
3
|
+
## 目标
|
|
4
|
+
|
|
5
|
+
在华为云 cn-north-4 区域,按量付费购买 ECS,部署后端代码仓的后端服务。
|
|
6
|
+
|
|
7
|
+
## 前置条件
|
|
8
|
+
|
|
9
|
+
- 后端代码仓 git 地址
|
|
10
|
+
- 账户已有默认 VPC 和子网(Agent 自动查询)
|
|
11
|
+
|
|
12
|
+
## 流程
|
|
13
|
+
|
|
14
|
+
1. 查询 VPC/子网,创建安全组,放通 SSH(22)仅本机IP、HTTP(80)全网
|
|
15
|
+
2. 查询镜像(推荐 HCE 2.0)和规格,直接购买1核2G
|
|
16
|
+
3. 创建 keypair,创建按量付费 ECS(系统盘 SSD 40GB),轮询等待 ACTIVE
|
|
17
|
+
4. 创建 5_bgp 按流量计费 EIP,绑定到 ECS 端口
|
|
18
|
+
5. SSH 登录,安装 Node.js 18,git clone 代码仓,npm install
|
|
19
|
+
6. Nginx反向代理:80->:3000
|
|
20
|
+
7. 验证 /hc-activity/api/title 和 /hc-activity/health
|
|
21
|
+
|
|
22
|
+
## 注意事项
|
|
23
|
+
|
|
24
|
+
- 后端3000仅监听回环
|
|
25
|
+
- Nginx修改后 nginx -t 再 reload
|
|
26
|
+
- 按量付费停机仍计费
|
|
27
|
+
- 删除实例时 --delete_publicip=true --delete_volume=true
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
## 错误码映射
|
|
6
6
|
|
|
7
|
-
| 错误
|
|
8
|
-
|
|
9
|
-
| `Ecs.0005` flavor-image 不匹配
|
|
10
|
-
| `[USE_ERROR]不正确的参数:imagetype`
|
|
11
|
-
| `[USE_ERROR]不正确的参数:chargingMode`
|
|
12
|
-
| `[USE_ERROR]不正确的参数:__support_amd` | 参数无效
|
|
13
|
-
| Cannot SSH
|
|
14
|
-
| Flavor unavailable
|
|
15
|
-
| Insufficient resources
|
|
16
|
-
| AuthFailure
|
|
7
|
+
| 错误 | 根因 | 修复 |
|
|
8
|
+
| --------------------------------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
|
9
|
+
| `Ecs.0005` flavor-image 不匹配 | 镜像虚拟化类型与规格不兼容 | 检查 image `__support_amd`/`__support_xen` 与 flavor `os_extra_specs`。BareMetal 镜像不兼容标准 ECS 规格 |
|
|
10
|
+
| `[USE_ERROR]不正确的参数:imagetype` | 参数名错误 | KooCLI 使用双下划线前缀:`--__imagetype=gold`(不是 `--imagetype`) |
|
|
11
|
+
| `[USE_ERROR]不正确的参数:chargingMode` | 参数路径错误 | 计费模式参数路径:`--server.extendparam.chargingMode=postPaid`。不传默认按需付费 |
|
|
12
|
+
| `[USE_ERROR]不正确的参数:__support_amd` | 参数无效 | `IMS ListImages` 某些版本不支持此过滤。去掉该参数,使用 client-side 过滤 |
|
|
13
|
+
| Cannot SSH | 安全组未开放22端口 或 未绑定EIP | 1) 添加入方向规则 tcp 22。2) `hcloud EIP BindPublicIp` |
|
|
14
|
+
| Flavor unavailable | 区域不支持该规格 | `hcloud ECS ListFlavors --cli-region=<r>` 先查。不硬编码 s6/m6 等规格名 |
|
|
15
|
+
| Insufficient resources | AZ 库存不足 | 换规格、换 AZ、或等待资源释放 |
|
|
16
|
+
| AuthFailure | AK/SK 过期或无效 | `npx huaweicloud-devkit auth init` 重新配置统一凭据 |
|
|
17
17
|
|
|
18
18
|
## 创建失败诊断流程
|
|
19
19
|
|
|
@@ -38,10 +38,10 @@ hcloud IMS ListImages --cli-region=<r> --__imagetype=gold --__isregistered=true
|
|
|
38
38
|
|
|
39
39
|
## 密钥对 vs 密码
|
|
40
40
|
|
|
41
|
-
| 方式
|
|
42
|
-
|
|
41
|
+
| 方式 | 安全 | 建议 |
|
|
42
|
+
| -------------------------- | ----- | -------------------------------------------------- |
|
|
43
43
|
| `--server.key_name=<name>` | ✅ 高 | **推荐**。先 `hcloud DEW CreateKeypair` 创建密钥对 |
|
|
44
|
-
| `--server.adminPass=<pw>`
|
|
44
|
+
| `--server.adminPass=<pw>` | ❌ 低 | 密码明文进入 shell 历史。仅测试用 |
|
|
45
45
|
|
|
46
46
|
密码要求:8-26 字符,含大写 + 小写 + 数字 + 特殊字符。
|
|
47
47
|
|