huaweicloud-devkit 1.0.2-next.7 → 1.0.2-next.9
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/bin/setup.cjs +5 -3
- package/integrations/opencode/opencode.json +1 -4
- package/package.json +13 -3
- package/plugins/huaweicloud-core/.claude-plugin/plugin.json +1 -1
- package/plugins/huaweicloud-core/.codex-plugin/plugin.json +1 -1
- package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +1 -1
- package/plugins/huaweicloud-core/.mcp.json +1 -3
- package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +1 -1
- package/plugins/huaweicloud-core/safety/policy.json +75 -100
- package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +41 -13
- package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +34 -34
- package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +18 -18
- package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +19 -19
- package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +32 -32
- package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +30 -30
- package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +12 -11
- package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +64 -17
- 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 +20 -20
- package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +39 -30
- 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 +39 -36
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +15 -4
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +11 -9
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +13 -13
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +40 -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-iam/SKILL.md +27 -27
- 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 +25 -25
- package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +44 -44
- 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 +63 -58
- package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +39 -39
- package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +26 -26
- package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +39 -39
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +13 -12
- 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 +18 -18
- 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 +6 -1
- package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +3 -3
- package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +11 -1
- package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +3 -3
- package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +53 -53
- 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 +3 -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 +33 -33
- package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +3 -3
- package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +5 -3
- package/plugins/huaweicloud-core/src/auth/credentials.mjs +12 -4
- package/plugins/huaweicloud-core/src/auth/service.mjs +1 -1
- package/plugins/huaweicloud-core/src/data/icons-manifest.v1.json +3517 -0
- package/plugins/huaweicloud-core/src/hcloud-cli.mjs +16 -7
- package/plugins/huaweicloud-core/src/icon-library.mjs +171 -0
- package/plugins/huaweicloud-core/src/mcp-server.mjs +0 -1
- package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +1 -2
- package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +4 -1
- package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +4 -1
- package/plugins/huaweicloud-core/src/safety-policy.mjs +122 -68
- package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +2 -7
- package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +10 -22
- package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +30 -9
- package/plugins/huaweicloud-core/src/search-market.mjs +46 -12
- package/plugins/huaweicloud-core/src/setup-cli.mjs +435 -167
- package/plugins/huaweicloud-core/src/tools.mjs +407 -114
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +54 -34
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +1 -5
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +3 -15
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +3 -16
- package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +37 -31
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: huawei-rds
|
|
3
|
-
description:
|
|
3
|
+
description: 'Use when creating, configuring, managing, or troubleshooting RDS instances on Huawei Cloud. Covers MySQL, PostgreSQL, SQL Server. Triggers: RDS, MySQL, PostgreSQL, database instance, backup, read replica. NOT for: GaussDB (use huawei-gaussdb), DDS (use huawei-dds-dcs).'
|
|
4
4
|
version: 1
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -13,6 +13,7 @@ Always run `hcloud RDS <Operation> --help` before constructing commands to disco
|
|
|
13
13
|
## Prerequisites
|
|
14
14
|
|
|
15
15
|
Before creating an RDS instance, you MUST have:
|
|
16
|
+
|
|
16
17
|
- A VPC and subnet (see `huawei-vpc`)
|
|
17
18
|
- A security group with database port open (MySQL=3306, PostgreSQL=5432, SQL Server=1433)
|
|
18
19
|
- Run `hcloud RDS ListFlavors --database_name=<engine> --cli-region=<r>` to get spec codes
|
|
@@ -23,32 +24,33 @@ Before creating an RDS instance, you MUST have:
|
|
|
23
24
|
hcloud RDS <Operation> --cli-region=<region> [--key=value ...]
|
|
24
25
|
```
|
|
25
26
|
|
|
26
|
-
| Rule
|
|
27
|
-
|
|
28
|
-
| Service name
|
|
29
|
-
| Operation
|
|
30
|
-
| Params
|
|
31
|
-
| Array params
|
|
27
|
+
| Rule | Detail |
|
|
28
|
+
| -------------- | --------------------------------------------------------------------------------- |
|
|
29
|
+
| Service name | `RDS` (uppercase) |
|
|
30
|
+
| Operation | PascalCase: `ListInstances`, `CreateManualBackup` |
|
|
31
|
+
| Params | `--key=value` format. JSON params: `--key='{"k":"v"}'` |
|
|
32
|
+
| Array params | 1-based: `--instance_ids.1=xxx` |
|
|
32
33
|
| Password param | Conflicts with KooCLI system param; use `--cli-jsonInput` (see Critical Warnings) |
|
|
33
34
|
|
|
34
35
|
## Critical Warnings
|
|
35
36
|
|
|
36
|
-
| Trap
|
|
37
|
-
|
|
38
|
-
| Engine version immutable
|
|
39
|
-
| Automated backups use OBS
|
|
40
|
-
| Storage auto-scaling off by default | Enable before storage runs out or instance goes read-only
|
|
41
|
-
| `--password` conflicts with KooCLI
|
|
42
|
-
| Volume type must match flavor
|
|
43
|
-
| Flavor not in region
|
|
44
|
-
| `database_name` is case-sensitive
|
|
45
|
-
| Instance creation takes 3–8 min
|
|
46
|
-
| Body `--region` is required
|
|
47
|
-
| Restore creates new instance
|
|
37
|
+
| Trap | Why |
|
|
38
|
+
| ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
39
|
+
| Engine version immutable | Cannot change MySQL to PostgreSQL in-place |
|
|
40
|
+
| Automated backups use OBS | Backup storage incurs separate charges. Set retention period explicitly |
|
|
41
|
+
| Storage auto-scaling off by default | Enable before storage runs out or instance goes read-only |
|
|
42
|
+
| `--password` conflicts with KooCLI | Use `--cli-jsonInput=<file>` with JSON file (see `--cli-jsonInput` section below). The `printf "b\n"` workaround is broken in KooCLI 7.2.12+ |
|
|
43
|
+
| Volume type must match flavor | General→CLOUDSSD; Dedicated→CLOUDSSD\|ESSD; ARM→ULTRAHIGH |
|
|
44
|
+
| Flavor not in region | Always `ListFlavors` first. Spec codes vary by region |
|
|
45
|
+
| `database_name` is case-sensitive | Use `MySQL` / `PostgreSQL` / `SQLServer` / `MariaDB` — NOT lower-case `mysql` |
|
|
46
|
+
| Instance creation takes 3–8 min | Status: BUILD→MODIFYING→ACTIVE. Poll every 15s: `hcloud RDS ListInstances --cli-region=<r> --instance_id=<id> \| jq '.instances[0].status'` |
|
|
47
|
+
| Body `--region` is required | CreateInstance body requires `--region=<r>` (same as `--cli-region`) or `DBS.280243` |
|
|
48
|
+
| Restore creates new instance | No in-place restore. Verify target flavor before restoring |
|
|
48
49
|
|
|
49
50
|
## Instance Management
|
|
50
51
|
|
|
51
52
|
### List
|
|
53
|
+
|
|
52
54
|
```bash
|
|
53
55
|
hcloud RDS ListInstances --cli-region=<r>
|
|
54
56
|
hcloud RDS ListFlavors --database_name=<engine> --cli-region=<r>
|
|
@@ -57,6 +59,7 @@ hcloud RDS ListEngineFlavors --instance_id=<id> --cli-region=<r>
|
|
|
57
59
|
```
|
|
58
60
|
|
|
59
61
|
### Create Instance
|
|
62
|
+
|
|
60
63
|
```bash
|
|
61
64
|
hcloud RDS CreateInstance --cli-region=<r> \
|
|
62
65
|
--region=<r> \
|
|
@@ -101,21 +104,22 @@ hcloud RDS CreateInstance --cli-region=<r> \
|
|
|
101
104
|
|
|
102
105
|
> Save as `rds-create.json` then: `hcloud RDS CreateInstance --cli-jsonInput=rds-create.json`. For `project_id`, run `hcloud IAM KeystoneListProjects`.
|
|
103
106
|
|
|
104
|
-
| Param
|
|
105
|
-
|
|
106
|
-
| `--name`
|
|
107
|
-
| `--datastore`
|
|
108
|
-
| `--flavor_ref`
|
|
109
|
-
| `--volume`
|
|
110
|
-
| `--vpc_id`
|
|
111
|
-
| `--subnet_id`
|
|
112
|
-
| `--security_group_id` | Yes
|
|
113
|
-
| `--availability_zone` | Yes
|
|
114
|
-
| `--charge_info`
|
|
115
|
-
| `--password`
|
|
116
|
-
| `--port`
|
|
107
|
+
| Param | Required | Note |
|
|
108
|
+
| --------------------- | -------- | -------------------------------------------------------------------------------------------- |
|
|
109
|
+
| `--name` | Yes | Instance name |
|
|
110
|
+
| `--datastore` | Yes | `--datastore.type=<engine> --datastore.version=<version>` |
|
|
111
|
+
| `--flavor_ref` | Yes | From `ListFlavors` output |
|
|
112
|
+
| `--volume` | Yes | Type matching: General→CLOUDSSD, Dedicated→CLOUDSSD\|ESSD, ARM→ULTRAHIGH |
|
|
113
|
+
| `--vpc_id` | Yes | Must exist in target region |
|
|
114
|
+
| `--subnet_id` | Yes | Must exist in target region |
|
|
115
|
+
| `--security_group_id` | Yes | Must have DB port open |
|
|
116
|
+
| `--availability_zone` | Yes | Use AZ code from `NovaListAvailabilityZones` |
|
|
117
|
+
| `--charge_info` | No | `--charge_info.charge_mode=<mode>`. Default postPaid (pay-per-use). Run `--help` for options |
|
|
118
|
+
| `--password` | Yes | 8-32 chars, uppercase+lowercase+digit+special |
|
|
119
|
+
| `--port` | No | Default 3306 (MySQL) / 5432 (PG) / 1433 (SQL Server) |
|
|
117
120
|
|
|
118
121
|
### Modify / Resize
|
|
122
|
+
|
|
119
123
|
```bash
|
|
120
124
|
hcloud RDS StartInstanceRestartAction --instance_id=<id> --cli-region=<r>
|
|
121
125
|
hcloud RDS StartResizeFlavorAction --instance_id=<id> --flavor_ref=<new-id> --cli-region=<r>
|
|
@@ -125,6 +129,7 @@ hcloud RDS UpdateInstanceAlias --instance_id=<id> --alias=<new-name> --cli-regio
|
|
|
125
129
|
```
|
|
126
130
|
|
|
127
131
|
### Delete
|
|
132
|
+
|
|
128
133
|
```bash
|
|
129
134
|
hcloud RDS DeleteInstance --instance_id=<id> --cli-region=<r>
|
|
130
135
|
```
|
|
@@ -172,41 +177,41 @@ psql -h <private_ip> -p 5432 -U root -d postgres
|
|
|
172
177
|
|
|
173
178
|
If a database client is not installed on the agent's machine, install one:
|
|
174
179
|
|
|
175
|
-
| Platform
|
|
176
|
-
|
|
177
|
-
| **Linux**
|
|
178
|
-
| **macOS**
|
|
179
|
-
| **Windows**
|
|
180
|
+
| Platform | MySQL | PostgreSQL |
|
|
181
|
+
| ---------------- | ------------------------------------------------------------ | -------------------------------------------------------------- |
|
|
182
|
+
| **Linux** | `apt install mysql-client` / `yum install mysql` | `apt install postgresql-client` |
|
|
183
|
+
| **macOS** | `brew install mysql-client` | `brew install libpq` |
|
|
184
|
+
| **Windows** | Download MySQL Workbench or `winget install Oracle.MySQL` | Download pgAdmin or `winget install PostgreSQL.PostgreSQL` |
|
|
180
185
|
| **Python (any)** | `pip install pymysql` then `python -c "import pymysql; ..."` | `pip install psycopg2` then `python -c "import psycopg2; ..."` |
|
|
181
|
-
| **Docker (any)** | `docker run -it --rm mysql:8 mysql -h <ip> -u root -p`
|
|
186
|
+
| **Docker (any)** | `docker run -it --rm mysql:8 mysql -h <ip> -u root -p` | `docker run -it --rm postgres:16 psql -h <ip> -U root` |
|
|
182
187
|
|
|
183
188
|
> If no client can be installed, use the Huawei Cloud **Data Studio** console: https://console.huaweicloud.com/dms/
|
|
184
189
|
|
|
185
190
|
## Mutating Operations (Require Approval)
|
|
186
191
|
|
|
187
|
-
| Operation
|
|
188
|
-
|
|
189
|
-
| `CreateInstance`
|
|
190
|
-
| `DeleteInstance`
|
|
191
|
-
| `StartResizeFlavorAction`
|
|
192
|
-
| `StartInstanceEnlargeVolumeAction` | Online, but irreversible
|
|
193
|
-
| `StartFailover`
|
|
194
|
-
| `CreateRestoreInstance`
|
|
195
|
-
| `CreateManualBackup`
|
|
196
|
-
| `DeleteManualBackup`
|
|
192
|
+
| Operation | Effect |
|
|
193
|
+
| ---------------------------------- | ------------------------------------ |
|
|
194
|
+
| `CreateInstance` | New instance (billing starts) |
|
|
195
|
+
| `DeleteInstance` | Irreversible data loss |
|
|
196
|
+
| `StartResizeFlavorAction` | Brief interruption during switchover |
|
|
197
|
+
| `StartInstanceEnlargeVolumeAction` | Online, but irreversible |
|
|
198
|
+
| `StartFailover` | Primary-standby switchover |
|
|
199
|
+
| `CreateRestoreInstance` | Creates new instance from backup |
|
|
200
|
+
| `CreateManualBackup` | Incurs OBS storage charges |
|
|
201
|
+
| `DeleteManualBackup` | Irreversible |
|
|
197
202
|
|
|
198
203
|
## Troubleshooting
|
|
199
204
|
|
|
200
|
-
| Error
|
|
201
|
-
|
|
202
|
-
| Connection refused
|
|
203
|
-
| Storage full
|
|
204
|
-
| DBS.280241 Invalid storage type | Volume type doesn't match flavor group
|
|
205
|
-
| DBS.280448 Sold out
|
|
206
|
-
| Replication lag
|
|
207
|
-
| Instance stuck BUILDING
|
|
208
|
-
| SYS.0403
|
|
209
|
-
| EIP.7905
|
|
205
|
+
| Error | Root Cause -> Fix |
|
|
206
|
+
| ------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
207
|
+
| Connection refused | SG missing DB port. Add ingress rule |
|
|
208
|
+
| Storage full | Manual resize or enable auto-scaling |
|
|
209
|
+
| DBS.280241 Invalid storage type | Volume type doesn't match flavor group |
|
|
210
|
+
| DBS.280448 Sold out | Try different volume type or AZ |
|
|
211
|
+
| Replication lag | Check `ShowReplicationStatus`. Consider read replica |
|
|
212
|
+
| Instance stuck BUILDING | Check task status: `hcloud RDS ListTasks` |
|
|
213
|
+
| SYS.0403 | SCP policy denies this operation (e.g. security group rules, EIP binding). See `huawei-vpc` troubleshooting |
|
|
214
|
+
| EIP.7905 | EIP quota exceeded — cannot create new EIP for public access. See `huawei-vpc` troubleshooting |
|
|
210
215
|
|
|
211
216
|
## Security
|
|
212
217
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: huawei-sandbox
|
|
3
|
-
description:
|
|
3
|
+
description: 'Use when creating, connecting, or managing Huawei Cloud Sandbox instances and workspace terminals, or when a task needs a temporary runtime to deploy, run, or preview a web application. Covers sandbox lifecycle (check-user, sign-agreement, connect, release), session-based terminal execution, and credential injection. Triggers on: sandbox, workspace, terminal, web app deployment, deploy web app, preview app, deploy github, github repo, deploy repo, website, static site, web application, hwlink, devstation, hdkitservice, remote exec. NOT for: ECS instances (use huawei-ecs), CCE clusters (use huawei-cce).'
|
|
4
4
|
version: 1
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -26,25 +26,25 @@ Domain expertise for Huawei Cloud Sandbox (DevStation) instances and workspace t
|
|
|
26
26
|
|
|
27
27
|
### User Verification (Prerequisites)
|
|
28
28
|
|
|
29
|
-
| Tool
|
|
30
|
-
|
|
31
|
-
| `huaweicloud_sandbox_check_user`
|
|
29
|
+
| Tool | Purpose |
|
|
30
|
+
| ------------------------------------ | ----------------------------------------------------------- |
|
|
31
|
+
| `huaweicloud_sandbox_check_user` | Check real-name verification and agreement signing status |
|
|
32
32
|
| `huaweicloud_sandbox_sign_agreement` | Sign unsigned/outdated agreements (required before connect) |
|
|
33
33
|
|
|
34
34
|
### Sandbox Lifecycle
|
|
35
35
|
|
|
36
|
-
| Tool
|
|
37
|
-
|
|
38
|
-
| `huaweicloud_sandbox_connect`
|
|
39
|
-
| `huaweicloud_sandbox_credentials` | Inject temporary AK/SK into a running sandbox
|
|
36
|
+
| Tool | Purpose |
|
|
37
|
+
| --------------------------------- | ------------------------------------------------------------------------ |
|
|
38
|
+
| `huaweicloud_sandbox_connect` | Connect to sandbox (one user one instance, reuses existing if available) |
|
|
39
|
+
| `huaweicloud_sandbox_credentials` | Inject temporary AK/SK into a running sandbox |
|
|
40
40
|
|
|
41
41
|
### Terminal Execution
|
|
42
42
|
|
|
43
|
-
| Tool
|
|
44
|
-
|
|
45
|
-
| `huaweicloud_sandbox_exec_with_session` | Session-based execution (state persists)
|
|
46
|
-
| `huaweicloud_sandbox_upload_file`
|
|
47
|
-
| `huaweicloud_sandbox_close_session`
|
|
43
|
+
| Tool | Purpose |
|
|
44
|
+
| --------------------------------------- | ------------------------------------------------------------------------ |
|
|
45
|
+
| `huaweicloud_sandbox_exec_with_session` | Session-based execution (state persists) |
|
|
46
|
+
| `huaweicloud_sandbox_upload_file` | Upload a local file into the sandbox (chunked base64 write + md5 verify) |
|
|
47
|
+
| `huaweicloud_sandbox_close_session` | Close a persistent terminal session |
|
|
48
48
|
|
|
49
49
|
## Workflow
|
|
50
50
|
|
|
@@ -74,11 +74,11 @@ There is no general file-upload primitive on the sandbox service itself. Get loc
|
|
|
74
74
|
|
|
75
75
|
`huaweicloud_sandbox_exec_with_session` is fragile for long commands and large inline content. Do NOT paste a file's base64 directly into a single command:
|
|
76
76
|
|
|
77
|
-
| Payload
|
|
78
|
-
|
|
79
|
-
| ~30KB base64 in one command | exec timeout
|
|
77
|
+
| Payload | Result |
|
|
78
|
+
| --------------------------- | -------------------------------------- |
|
|
79
|
+
| ~30KB base64 in one command | exec timeout |
|
|
80
80
|
| ~12KB base64 in one command | session crash (`session is not ready`) |
|
|
81
|
-
| ~4–5KB normal command
|
|
81
|
+
| ~4–5KB normal command | OK |
|
|
82
82
|
|
|
83
83
|
Keep individual exec commands small (≤ ~4KB). For larger content, use `huaweicloud_sandbox_upload_file` instead.
|
|
84
84
|
|
|
@@ -133,20 +133,20 @@ sleep 10 && cat /tmp/host.log
|
|
|
133
133
|
|
|
134
134
|
## Critical Warnings
|
|
135
135
|
|
|
136
|
-
| Trap
|
|
137
|
-
|
|
138
|
-
| Agreement required first
|
|
139
|
-
| Real-name required
|
|
140
|
-
| Never expose tunnel details
|
|
141
|
-
| Login needs `--huaweicloud`
|
|
142
|
-
| CLI PATH
|
|
143
|
-
| Never install tunnel tooling locally | If the sandbox cannot install it, report a generic error and stop — installing on the developer's machine defeats sandbox deployment
|
|
144
|
-
| Return the deployment URL
|
|
145
|
-
| Session state persists
|
|
146
|
-
| Destructive commands blocked
|
|
147
|
-
| Workspace ID = dev_stage_id
|
|
148
|
-
| Projects live in `/workspace`
|
|
149
|
-
| Node.js >= 22 required
|
|
136
|
+
| Trap | Why |
|
|
137
|
+
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
138
|
+
| Agreement required first | `sandbox_connect` fails if the agreement isn't signed; the `sandbox_check_user` preflight detects this, so surface it to the developer only when signing is needed |
|
|
139
|
+
| Real-name required | `sandbox_connect` fails if `realnameVerified=false`; tell the developer once and stop, don't loop on connect |
|
|
140
|
+
| Never expose tunnel details | Do not mention "DevBridge"/"tunnel"/"devbridge" to the developer — say "正在生成访问地址..." and hand over only the URL |
|
|
141
|
+
| Login needs `--huaweicloud` | `devbridge auth login --access-key/--secret-key` without `--huaweicloud` falls back to interactive browser login, which fails in the sandbox |
|
|
142
|
+
| CLI PATH | The installer only writes `~/.bashrc`; run `export PATH=$PATH:$HOME/.huawei/bin` in the session before using `devbridge` |
|
|
143
|
+
| Never install tunnel tooling locally | If the sandbox cannot install it, report a generic error and stop — installing on the developer's machine defeats sandbox deployment |
|
|
144
|
+
| Return the deployment URL | Always hand the public URL from the host log to the developer as the final result |
|
|
145
|
+
| Session state persists | `exec_with_session` preserves `cd`, env vars, aliases between calls |
|
|
146
|
+
| Destructive commands blocked | `rm -rf /`, `mkfs`, `dd if=`, fork bombs are denied by safety policy |
|
|
147
|
+
| Workspace ID = dev_stage_id | Use `dev_stage_id` from `sandbox_connect` as `workspace_id` for terminal exec |
|
|
148
|
+
| Projects live in `/workspace` | Clone/install project code under `/workspace/<repo-name>` (filesystem-root workspace mount, not `$HOME/workspace`), never in `/tmp` — ephemeral locations lose the project when the sandbox session restarts |
|
|
149
|
+
| Node.js >= 22 required | Sandbox terminal uses built-in WebSocket (globalThis.WebSocket); if Node.js is missing, install it from the Huawei Cloud mirror (see "Node.js in the sandbox") |
|
|
150
150
|
|
|
151
151
|
## Node.js in the sandbox
|
|
152
152
|
|
|
@@ -163,11 +163,11 @@ node --version
|
|
|
163
163
|
|
|
164
164
|
## Environment Variables
|
|
165
165
|
|
|
166
|
-
| Variable
|
|
167
|
-
|
|
168
|
-
| `HW_ACCESS_KEY`
|
|
169
|
-
| `HW_SECRET_KEY`
|
|
170
|
-
| `HW_SECURITY_TOKEN`
|
|
171
|
-
| `HW_WORKSPACE_ID`
|
|
172
|
-
| `HDKITSERVICE_ENDPOINT` | No
|
|
173
|
-
| `HWLINK_ENDPOINT`
|
|
166
|
+
| Variable | Required | Description |
|
|
167
|
+
| ----------------------- | -------- | ------------------------- |
|
|
168
|
+
| `HW_ACCESS_KEY` | Yes | Huawei Cloud AK |
|
|
169
|
+
| `HW_SECRET_KEY` | Yes | Huawei Cloud SK |
|
|
170
|
+
| `HW_SECURITY_TOKEN` | No | STS security token |
|
|
171
|
+
| `HW_WORKSPACE_ID` | No | Default workspace ID |
|
|
172
|
+
| `HDKITSERVICE_ENDPOINT` | No | hdkitservice API endpoint |
|
|
173
|
+
| `HWLINK_ENDPOINT` | No | DevStation API endpoint |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: huawei-smn-dms
|
|
3
|
-
description:
|
|
3
|
+
description: 'Use when creating or managing SMN topics/subscriptions/messages or DMS Kafka/RabbitMQ/RocketMQ queues on Huawei Cloud. Triggers: SMN, DMS, notification, message queue, Kafka, RabbitMQ, RocketMQ, topic, subscription. NOT for: APIG (use huawei-apig), FunctionGraph triggers (use huawei-functiongraph).'
|
|
4
4
|
version: 1
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -18,50 +18,50 @@ Domain expertise for SMN (Simple Message Notification) and DMS (Distributed Mess
|
|
|
18
18
|
|
|
19
19
|
## Critical Warnings
|
|
20
20
|
|
|
21
|
-
| Trap
|
|
22
|
-
|
|
21
|
+
| Trap | Why |
|
|
22
|
+
| ------------------------- | ------------------------------------------------------------- |
|
|
23
23
|
| Subscription confirmation | HTTP/HTTPS subscriptions need endpoint ping-back confirmation |
|
|
24
|
-
| Email subscription delay
|
|
25
|
-
| SMS charge per message
|
|
24
|
+
| Email subscription delay | Email subscriptions require user to click confirmation link |
|
|
25
|
+
| SMS charge per message | Template SMS incurs per-delivery charges |
|
|
26
26
|
|
|
27
27
|
### Common Workflows
|
|
28
28
|
|
|
29
|
-
| Task
|
|
30
|
-
|
|
31
|
-
| List topics
|
|
32
|
-
| Create topic
|
|
33
|
-
| Add subscription
|
|
34
|
-
| List subscriptions
|
|
29
|
+
| Task | Operation |
|
|
30
|
+
| ----------------------- | --------------------------------------------------------- |
|
|
31
|
+
| List topics | `ListTopics --cli-region=<r> --project_id=<p>` |
|
|
32
|
+
| Create topic | `CreateTopic --cli-region=<r> --project_id=<p>` |
|
|
33
|
+
| Add subscription | `AddSubscription --cli-region=<r> --project_id=<p>` |
|
|
34
|
+
| List subscriptions | `ListSubscriptions --cli-region=<r> --project_id=<p>` |
|
|
35
35
|
| Create message template | `CreateMessageTemplate --cli-region=<r> --project_id=<p>` |
|
|
36
|
-
| Publish message
|
|
37
|
-
| Delete topic
|
|
36
|
+
| Publish message | `PublishMessage --cli-region=<r> --project_id=<p>` |
|
|
37
|
+
| Delete topic | `DeleteTopic --cli-region=<r> --project_id=<p>` |
|
|
38
38
|
|
|
39
39
|
## DMS
|
|
40
40
|
|
|
41
41
|
### Service Types
|
|
42
42
|
|
|
43
|
-
| Type
|
|
44
|
-
|
|
45
|
-
| Kafka
|
|
46
|
-
| RabbitMQ | `hcloud DMS`
|
|
47
|
-
| RocketMQ | `hcloud DMS`
|
|
43
|
+
| Type | KooCLI Service |
|
|
44
|
+
| -------- | -------------- |
|
|
45
|
+
| Kafka | `hcloud DMS` |
|
|
46
|
+
| RabbitMQ | `hcloud DMS` |
|
|
47
|
+
| RocketMQ | `hcloud DMS` |
|
|
48
48
|
|
|
49
49
|
### Common Workflows
|
|
50
50
|
|
|
51
|
-
| Task
|
|
52
|
-
|
|
53
|
-
| List instances
|
|
51
|
+
| Task | Operation |
|
|
52
|
+
| --------------------- | -------------------------------------------------- |
|
|
53
|
+
| List instances | `ListInstances --cli-region=<r> --project_id=<p>` |
|
|
54
54
|
| Create Kafka instance | `CreateInstance --cli-region=<r> --project_id=<p>` |
|
|
55
|
-
| List Kafka topics
|
|
55
|
+
| List Kafka topics | `ListTopics --cli-region=<r> --project_id=<p>` |
|
|
56
56
|
|
|
57
57
|
Discover exact parameters with `--help` before executing any command.
|
|
58
58
|
|
|
59
59
|
## Troubleshooting
|
|
60
60
|
|
|
61
|
-
| Error
|
|
62
|
-
|
|
63
|
-
| Subscription not confirmed
|
|
64
|
-
| DMS instance creation fails | Check VPC/subnet availability and engine version
|
|
61
|
+
| Error | Fix |
|
|
62
|
+
| --------------------------- | ------------------------------------------------- |
|
|
63
|
+
| Subscription not confirmed | SMN subscriptions need endpoint/user confirmation |
|
|
64
|
+
| DMS instance creation fails | Check VPC/subnet availability and engine version |
|
|
65
65
|
|
|
66
66
|
## Cross-Skill References
|
|
67
67
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: huawei-vpc
|
|
3
|
-
description:
|
|
3
|
+
description: 'Use when creating, configuring, or managing VPC networks, subnets, security groups, EIPs, NAT gateways, VPN connections, or network ACLs on Huawei Cloud. Triggers on: VPC, subnet, security group, EIP, NAT, VPN, network ACL, route table, bandwidth. NOT for: DNS or CDN configuration.'
|
|
4
4
|
version: 1
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -18,50 +18,50 @@ Domain expertise for Huawei Cloud Virtual Private Cloud (VPC). Covers VPC/subnet
|
|
|
18
18
|
|
|
19
19
|
## Critical Warnings
|
|
20
20
|
|
|
21
|
-
| Trap
|
|
22
|
-
|
|
23
|
-
| VPC CIDR cannot change
|
|
24
|
-
| Security group stateful
|
|
25
|
-
| Network ACL stateless
|
|
26
|
-
| EIP bills when idle
|
|
27
|
-
| Subnet AZ binding
|
|
28
|
-
| EIP PER type needs `--bandwidth.name` | PER bandwidth requires explicit name; `--help` marks it optional but it's required
|
|
29
|
-
| **VPC params need nested prefix**
|
|
30
|
-
| **Security group needs no vpc_id**
|
|
31
|
-
| Subnet DNS empty → ECS no DNS
|
|
32
|
-
| SCP blocks 0.0.0.0/0 SG rules
|
|
33
|
-
| **VPC tags use `*` separator**
|
|
21
|
+
| Trap | Why |
|
|
22
|
+
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
23
|
+
| VPC CIDR cannot change | Once set, VPC CIDR block is immutable |
|
|
24
|
+
| Security group stateful | SG rules are stateful. Return traffic auto-allowed |
|
|
25
|
+
| Network ACL stateless | ACL rules must allow both inbound AND outbound |
|
|
26
|
+
| EIP bills when idle | Unbound EIP still charges. Release when unused |
|
|
27
|
+
| Subnet AZ binding | Subnet tied to single AZ. Cross-AZ needs multiple subnets |
|
|
28
|
+
| EIP PER type needs `--bandwidth.name` | PER bandwidth requires explicit name; `--help` marks it optional but it's required |
|
|
29
|
+
| **VPC params need nested prefix** | KooCLI 7.x VPC API uses `--vpc.<param>`, `--subnet.<param>`, `--security_group.<param>`. Example: `--vpc.name=xxx` NOT `--name=xxx` |
|
|
30
|
+
| **Security group needs no vpc_id** | VPC v3 API `CreateSecurityGroup` does NOT accept `vpc_id`. Security groups are region-level, not VPC-bound |
|
|
31
|
+
| Subnet DNS empty → ECS no DNS | DNS params (`--subnet.primary_dns`, `--subnet.secondary_dns`) marked optional but empty default breaks cloud-init domain resolution — `yum`/`apt` installs fail silently. Always set both. Common DNS IPs: cn-north-4 (100.125.1.250 / 100.125.1.251), cn-north-1 (100.125.1.250 / 100.125.129.250), cn-east-3 (100.125.1.250 / 100.125.129.250), ap-southeast-3 (100.125.1.250 / 100.125.128.250) |
|
|
32
|
+
| SCP blocks 0.0.0.0/0 SG rules | If `CreateSecurityGroupRule` with `--remote_ip_prefix=0.0.0.0/0` fails with `SYS.0403`, an org-level SCP policy is denying wide-open rules. Narrow to a specific CIDR range (e.g., your office IP) instead |
|
|
33
|
+
| **VPC tags use `*` separator** | VPC tag format: `--vpc.tags.1=env*test` (asterisk between key and value). NOT `--vpc.tags.1.key=env` (ECS-style). This is different from ECS `--server.metadata.key=value` |
|
|
34
34
|
|
|
35
35
|
## Common Workflows
|
|
36
36
|
|
|
37
|
-
| Task
|
|
38
|
-
|
|
39
|
-
| Create VPC
|
|
40
|
-
| Create subnet
|
|
41
|
-
| Update subnet
|
|
42
|
-
| Security group
|
|
43
|
-
| SG rule
|
|
44
|
-
| Create EIP
|
|
45
|
-
| Bind EIP to ECS | hcloud EIP AssociatePublicips --publicip_id=<id> --publicip.associate_instance_id=<port-id> --publicip.associate_instance_type=PORT
|
|
46
|
-
| Unbind EIP
|
|
47
|
-
| Delete EIP
|
|
48
|
-
| List EIPs
|
|
49
|
-
| NAT gateway
|
|
37
|
+
| Task | Command | Steps |
|
|
38
|
+
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
39
|
+
| Create VPC | hcloud VPC CreateVpc --vpc.name=<name> --vpc.cidr=<cidr> | CIDR must not conflict with existing VPCs. Run `hcloud VPC ListVpcs` first |
|
|
40
|
+
| Create subnet | hcloud VPC CreateSubnet --subnet.name=<name> --subnet.vpc_id=<id> --subnet.cidr=<cidr> --subnet.gateway_ip=<gw> --subnet.primary_dns=<dns1> --subnet.secondary_dns=<dns2> --subnet.availability_zone=<az> | Subnet CIDR must be a subset of the VPC CIDR. DNS addresses vary by region — see Critical Warnings for common values |
|
|
41
|
+
| Update subnet | hcloud VPC UpdateSubnet --subnet_id=<id> --subnet.dnsList.1=<dns1> --subnet.dnsList.2=<dns2> | Fix DNS after creation. Restart ECS after updating DNS for cloud-init to pick up changes |
|
|
42
|
+
| Security group | hcloud VPC CreateSecurityGroup --security_group.name=<name> | references/security-group.md |
|
|
43
|
+
| SG rule | hcloud VPC CreateSecurityGroupRule --security_group_rule.security_group_id=<id> --security_group_rule.direction=<direction> --security_group_rule.protocol=<protocol> --security_group_rule.multiport=<port> --security_group_rule.remote_ip_prefix=<cidr> | references/security-group.md |
|
|
44
|
+
| Create EIP | hcloud EIP CreatePublicip --publicip.type=<type> --bandwidth.size=<size> --bandwidth.share_type=<share-type> --bandwidth.name=<name> | Run `hcloud EIP CreatePublicip --help` to confirm valid type values per region |
|
|
45
|
+
| Bind EIP to ECS | 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` |
|
|
46
|
+
| Unbind EIP | hcloud EIP DisassociatePublicip --publicip_id=<id> | references/eip.md |
|
|
47
|
+
| Delete EIP | hcloud EIP DeletePublicip --publicip_id=<id> | references/eip.md |
|
|
48
|
+
| List EIPs | hcloud EIP ListPublicips | |
|
|
49
|
+
| NAT gateway | hcloud NAT CreateNatGateway --nat.name=<name> --nat.spec=<spec> --router_id=<vpc-id> --internal_network_id=<subnet-id> | Run `hcloud NAT CreateNatGateway --help` for available spec values |
|
|
50
50
|
|
|
51
51
|
## Troubleshooting
|
|
52
52
|
|
|
53
|
-
| Error
|
|
54
|
-
|
|
55
|
-
| Cannot reach instance
|
|
56
|
-
| Subnet CIDR conflict
|
|
57
|
-
| NAT gateway no internet
|
|
58
|
-
| EIP quota exceeded
|
|
59
|
-
| EIP.7905
|
|
60
|
-
| VPC.0301: Bandwidth name invalid
|
|
61
|
-
| EIP has no public IP after binding
|
|
62
|
-
| ECS cloud-init fails silently (port 80/443 closed) | Subnet likely has no DNS. Check `hcloud VPC ShowSubnet --subnet_id=<id>` → `dnsList` empty? Rebuild subnet with `--subnet.primary_dns=<dns1> --subnet.secondary_dns=<dns2>`. DNS addresses per region: `hcloud VPC CreateSubnet --help`
|
|
63
|
-
| VPC.0209: Subnet still used
|
|
64
|
-
| SYS.0403 / SCP deny
|
|
53
|
+
| Error | Root Cause -> Fix |
|
|
54
|
+
| -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
55
|
+
| Cannot reach instance | SG missing rule or no EIP -> Add SG rule / Bind EIP |
|
|
56
|
+
| Subnet CIDR conflict | Overlapping with existing subnets -> Choose non-overlapping CIDR |
|
|
57
|
+
| NAT gateway no internet | Route table missing default route -> Add 0.0.0.0/0 via NAT |
|
|
58
|
+
| EIP quota exceeded | Check actual quota: `hcloud EIP ListPublicips --cli-region=<r>` to see current usage. Default varies by account (typically 5-10) |
|
|
59
|
+
| EIP.7905 | Run `hcloud EIP ListPublicips --cli-region=<r>` first to check current usage |
|
|
60
|
+
| VPC.0301: Bandwidth name invalid | PER type requires `--bandwidth.name`, even though `--help` marks it optional |
|
|
61
|
+
| EIP has no public IP after binding | May need AddIngressEipV2 for ELB-type resources (see huawei-apig) |
|
|
62
|
+
| ECS cloud-init fails silently (port 80/443 closed) | Subnet likely has no DNS. Check `hcloud VPC ShowSubnet --subnet_id=<id>` → `dnsList` empty? Rebuild subnet with `--subnet.primary_dns=<dns1> --subnet.secondary_dns=<dns2>`. DNS addresses per region: `hcloud VPC CreateSubnet --help` |
|
|
63
|
+
| VPC.0209: Subnet still used | Subnet has dependent resources (ECS/RDS) — delete instances first, then subnet |
|
|
64
|
+
| SYS.0403 / SCP deny | Service Control Policy explicitly denies this operation — contact org admin to adjust SCP, or use an account/region without the restriction. If SSH is blocked, bootstrap via cloud-init user_data instead: see `huawei-ecs` — no SSH needed |
|
|
65
65
|
|
|
66
66
|
## Security Considerations
|
|
67
67
|
|
|
@@ -4,15 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
Subnets without DNS configuration will fail cloud-init. Use these DNS addresses:
|
|
6
6
|
|
|
7
|
-
| Region
|
|
8
|
-
|
|
9
|
-
| cn-north-1
|
|
10
|
-
| cn-north-4
|
|
11
|
-
| cn-east-3
|
|
12
|
-
| cn-south-1
|
|
7
|
+
| Region | Primary DNS | Secondary DNS |
|
|
8
|
+
| -------------- | ------------- | --------------- |
|
|
9
|
+
| cn-north-1 | 100.125.1.250 | 100.125.129.250 |
|
|
10
|
+
| cn-north-4 | 100.125.1.250 | 100.125.129.250 |
|
|
11
|
+
| cn-east-3 | 100.125.1.250 | 100.125.129.250 |
|
|
12
|
+
| cn-south-1 | 100.125.1.250 | 100.125.129.250 |
|
|
13
13
|
| ap-southeast-3 | 100.125.1.250 | 100.125.129.250 |
|
|
14
14
|
|
|
15
15
|
**Subnet create with DNS**:
|
|
16
|
+
|
|
16
17
|
```bash
|
|
17
18
|
hcloud VPC CreateSubnet \
|
|
18
19
|
--subnet.name=<name> \
|
|
@@ -28,12 +29,12 @@ hcloud VPC CreateSubnet \
|
|
|
28
29
|
|
|
29
30
|
KooCLI 7.x VPC API requires nested prefixes:
|
|
30
31
|
|
|
31
|
-
| Resource
|
|
32
|
-
|
|
33
|
-
| VPC
|
|
34
|
-
| Subnet
|
|
35
|
-
| Security Group | `--security_group.`
|
|
36
|
-
| SG Rule
|
|
32
|
+
| Resource | Create Param Prefix | Example |
|
|
33
|
+
| -------------- | ------------------------ | --------------------------------------------------------------------- |
|
|
34
|
+
| VPC | `--vpc.` | `--vpc.name=my-vpc --vpc.cidr=192.168.0.0/16` |
|
|
35
|
+
| Subnet | `--subnet.` | `--subnet.name=web --subnet.vpc_id=<id> --subnet.cidr=192.168.1.0/24` |
|
|
36
|
+
| Security Group | `--security_group.` | `--security_group.name=sg-web` |
|
|
37
|
+
| SG Rule | `--security_group_rule.` | `--security_group_rule.direction=ingress` |
|
|
37
38
|
|
|
38
39
|
## EIP Management
|
|
39
40
|
|