huaweicloud-devkit 0.1.17
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 +20 -0
- package/LICENSE +201 -0
- package/README.md +148 -0
- package/bin/setup.cjs +8 -0
- package/integrations/opencode/commands/huaweicloud-doctor.md +14 -0
- package/integrations/opencode/opencode.json +14 -0
- package/integrations/opencode/skills/huaweicloud-core/SKILL.md +30 -0
- package/package.json +43 -0
- package/plugins/huaweicloud-core/.claude-plugin/plugin.json +44 -0
- package/plugins/huaweicloud-core/.codex-plugin/plugin.json +43 -0
- package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +44 -0
- package/plugins/huaweicloud-core/.mcp.json +13 -0
- package/plugins/huaweicloud-core/hooks/hooks.json +26 -0
- package/plugins/huaweicloud-core/hooks/huaweicloud-safety.py +88 -0
- package/plugins/huaweicloud-core/safety/policy.json +86 -0
- package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +144 -0
- package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +48 -0
- package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +50 -0
- package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +101 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +73 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +190 -0
- package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +124 -0
- package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +55 -0
- package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +70 -0
- package/plugins/huaweicloud-core/skills/huawei-deployment/SKILL.md +56 -0
- package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +97 -0
- package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +29 -0
- package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +23 -0
- package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +131 -0
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +92 -0
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/evs.md +31 -0
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +28 -0
- package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +52 -0
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +132 -0
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +58 -0
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +71 -0
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/deploy-workflow.md +119 -0
- package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +142 -0
- package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +56 -0
- package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +65 -0
- package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +111 -0
- package/plugins/huaweicloud-core/skills/huawei-iam/references/policy-examples.md +122 -0
- package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +56 -0
- package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +65 -0
- package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +118 -0
- package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-create.md +49 -0
- package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +26 -0
- package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +100 -0
- package/plugins/huaweicloud-core/skills/huawei-obs/references/static-website.md +56 -0
- package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +181 -0
- package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +69 -0
- package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +77 -0
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +52 -0
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +59 -0
- package/plugins/huaweicloud-core/skills/huawei-vpc/references/subnet.md +50 -0
- package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +63 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/SKILL.md +56 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/agents/openai.yaml +4 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +47 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +4 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +125 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +4 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +94 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-core/agents/openai.yaml +4 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +20 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +28 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +46 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-safety/agents/openai.yaml +4 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +83 -0
- package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +4 -0
- package/plugins/huaweicloud-core/src/hcloud-cli.mjs +265 -0
- package/plugins/huaweicloud-core/src/mcp-server.mjs +93 -0
- package/plugins/huaweicloud-core/src/safety-policy.mjs +289 -0
- package/plugins/huaweicloud-core/src/search-market.mjs +169 -0
- package/plugins/huaweicloud-core/src/setup-cli.mjs +628 -0
- package/plugins/huaweicloud-core/src/tools.mjs +672 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: huawei-modelarts
|
|
3
|
+
description: "Use when training, deploying, or managing AI/ML models on Huawei Cloud ModelArts. Covers training jobs, model registry, online services, notebook instances. Triggers: ModelArts, model training, AI, machine learning, deep learning, notebook, inference, deployment. NOT for: general AI/ML concepts, non-Huawei platforms."
|
|
4
|
+
version: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Huawei Cloud ModelArts
|
|
8
|
+
|
|
9
|
+
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
+
|
|
11
|
+
Always run `hcloud ModelArts <Operation> --help` before constructing commands to discover exact parameter names and requirements.
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
Domain expertise for ModelArts. Covers training jobs, model deployment, notebook instances, and OBS integration.
|
|
16
|
+
|
|
17
|
+
## Critical Warnings
|
|
18
|
+
|
|
19
|
+
| Trap | Why |
|
|
20
|
+
|------|-----|
|
|
21
|
+
| OBS bucket required | All training data, model outputs, and notebook storage use OBS. Create bucket first |
|
|
22
|
+
| Training charges by duration | Pay-per-minute GPU/CPU billing. Stop unused notebooks and services |
|
|
23
|
+
| Notebook auto-stop needed | Default no auto-stop — can run indefinitely and incur charges |
|
|
24
|
+
| Model deployment needs quota | Online services may require service quota approval in new accounts |
|
|
25
|
+
| Training job output must be OBS | Local output not supported. Ensure `--output_path` is a valid OBS path |
|
|
26
|
+
|
|
27
|
+
## Prerequisites
|
|
28
|
+
|
|
29
|
+
- Training data must be stored in an OBS bucket (see `huawei-obs`)
|
|
30
|
+
- Output path for trained models must be an OBS path
|
|
31
|
+
- Notebook instances need a VPC/subnet (see `huawei-vpc`)
|
|
32
|
+
|
|
33
|
+
## Common Workflows
|
|
34
|
+
|
|
35
|
+
| Task | Operation |
|
|
36
|
+
|------|-----------|
|
|
37
|
+
| List models | `ListModels --cli-region=<r> --project_id=<p>` |
|
|
38
|
+
| List training jobs | `ListTrainJobs --cli-region=<r> --project_id=<p>` |
|
|
39
|
+
| List services | `ListServices --cli-region=<r> --project_id=<p>` |
|
|
40
|
+
| List notebooks | `ListNotebooks --cli-region=<r> --project_id=<p>` |
|
|
41
|
+
| Create model | `CreateModel --cli-region=<r> --project_id=<p>` |
|
|
42
|
+
| Create notebook | `CreateNotebook --cli-region=<r> --project_id=<p>` |
|
|
43
|
+
|
|
44
|
+
Discover operation parameters with `--help` before executing any write operation.
|
|
45
|
+
|
|
46
|
+
## Service Types
|
|
47
|
+
|
|
48
|
+
| Type | Purpose |
|
|
49
|
+
|------|---------|
|
|
50
|
+
| Training Job | Train models on GPU/CPU resources |
|
|
51
|
+
| Model | Register trained models for deployment |
|
|
52
|
+
| Service (Online) | Deploy models as REST API endpoints |
|
|
53
|
+
| Notebook | JupyterLab environments for development |
|
|
54
|
+
|
|
55
|
+
## Troubleshooting
|
|
56
|
+
|
|
57
|
+
| Error | Fix |
|
|
58
|
+
|-------|-----|
|
|
59
|
+
| OBS path not found | Verify OBS bucket exists and path is correct |
|
|
60
|
+
| Training job fails | Check training data format, resource quotas, and logs in console |
|
|
61
|
+
|
|
62
|
+
## Cross-Skill References
|
|
63
|
+
|
|
64
|
+
- **OBS storage**: See `huawei-obs` for bucket and training data management
|
|
65
|
+
- **VPC/Subnet**: See `huawei-vpc` for notebook network configuration
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: huawei-obs
|
|
3
|
+
description: "Use when creating, configuring, or managing OBS buckets and objects on Huawei Cloud. Covers bucket creation, lifecycle policies, versioning, static website hosting, CORS, access control (IAM/bucket policy/ACL), cross-region replication, event notifications, and presigned URLs. Triggers on: OBS, bucket, object storage, lifecycle, versioning, static website, CORS, presigned, replication. NOT for: EVS block storage (use huawei-ecs), SFS file storage, CBR backup (use huawei-cbr)."
|
|
4
|
+
version: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Huawei Cloud OBS
|
|
8
|
+
|
|
9
|
+
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
+
|
|
11
|
+
## Critical: OBS Command Syntax
|
|
12
|
+
|
|
13
|
+
KooCLI OBS uses **obsutil-style** commands, NOT API-style operations. Always run `hcloud OBS help` (no `--`) before constructing commands:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
hcloud OBS help # NOT --help
|
|
17
|
+
hcloud OBS help <command> # e.g. hcloud OBS help mb
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
| Wrong (API-style) | Correct (obsutil-style) |
|
|
21
|
+
|-------------------|-------------------------|
|
|
22
|
+
| `OBS CreateBucket` | `OBS mb obs://<bucket>` |
|
|
23
|
+
| `OBS PutObject` | `OBS cp <file> obs://<bucket>/` |
|
|
24
|
+
| `OBS DeleteBucket` | `OBS rm obs://<bucket> -r` |
|
|
25
|
+
|
|
26
|
+
## Overview
|
|
27
|
+
|
|
28
|
+
Domain expertise for Huawei Cloud Object Storage Service (OBS). Covers bucket/object lifecycle, access control, static website hosting, and presigned URLs.
|
|
29
|
+
|
|
30
|
+
## Critical Warnings
|
|
31
|
+
|
|
32
|
+
| Trap | Why |
|
|
33
|
+
|------|-----|
|
|
34
|
+
| Bucket name is global | All users share bucket namespace |
|
|
35
|
+
| Three-layer permissions | IAM > Bucket Policy > ACL. Most restrictive wins |
|
|
36
|
+
| Versioning is irreversible | Once enabled, cannot be disabled, only suspended |
|
|
37
|
+
| OBS uses AK/SK directly | NOT IAM tokens. Auth errors mean check AK/SK validity |
|
|
38
|
+
| Static website via CLI missing | KooCLI OBS lacks website config. Use REST API or console |
|
|
39
|
+
| **OBS needs separate cred config** | `hcloud configure` is NOT enough for OBS. Run `hcloud OBS config -i` (interactive) to create `~/.obsutilconfig`. This must be done OUTSIDE agent chat. |
|
|
40
|
+
| **obsutil interactive prompts** | `cp`/`rm` without `-f` causes "Please input (y/n)" → Agent hangs (TIMEOUT). Always use `-f` for non-interactive. |
|
|
41
|
+
| **Directory upload adds prefix** | `cp <dir>/ obs://<bucket>/ -r` puts files under `bucket/<dir>/...`. Use `-flat` for root-level files (static sites). Preview with `-dryRun` first. |
|
|
42
|
+
|
|
43
|
+
## OBS Credential Setup (Required Before First Use)
|
|
44
|
+
|
|
45
|
+
KooCLI OBS uses a separate config file (`~/.obsutilconfig`), NOT `~/.hcloud/config.json`. Use the **same AK/SK** that you configured for hcloud. Run once outside agent chat:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Preferred: interactive (safe, no AK/SK in shell history)
|
|
49
|
+
hcloud OBS config -i
|
|
50
|
+
# Follow prompts: AK, SK, endpoint (e.g. obs.cn-north-4.myhuaweicloud.com)
|
|
51
|
+
|
|
52
|
+
# Alternative: non-interactive (use with caution — AK/SK in shell history)
|
|
53
|
+
hcloud OBS config -e=<endpoint> -i=<AK> -k=<SK>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Common Workflows
|
|
57
|
+
|
|
58
|
+
| Task | Command |
|
|
59
|
+
|------|---------|
|
|
60
|
+
| Create bucket | `hcloud OBS mb obs://<bucket> -location=<region>` |
|
|
61
|
+
| List buckets/objects | `hcloud OBS ls [obs://<bucket>]` |
|
|
62
|
+
| Upload file | `hcloud OBS cp <file> obs://<bucket>/<key>` |
|
|
63
|
+
| Upload directory (recursive) | `hcloud OBS cp <dir>/ obs://<bucket>/ -r -f -flat` |
|
|
64
|
+
| Download object | `hcloud OBS cp obs://<bucket>/<key> <local-path>` |
|
|
65
|
+
| Set bucket ACL | `hcloud OBS chattri obs://<bucket> -acl=public-read` |
|
|
66
|
+
| Set object ACL | `hcloud OBS chattri obs://<bucket>/<key> -acl=public-read` | Bucket ACL does NOT cascade — anonymous reads need both |
|
|
67
|
+
| Set lifecycle | `hcloud OBS lifecycle obs://<bucket> -method=put -localfile=<json>` |
|
|
68
|
+
| Set bucket policy | `hcloud OBS bucketpolicy obs://<bucket> -method=put -localfile=<json>` |
|
|
69
|
+
| Set CORS | `hcloud OBS cors obs://<bucket> -method=put -localfile=<json>` |
|
|
70
|
+
| Delete bucket | `hcloud OBS rm obs://<bucket> -r` (must be empty) |
|
|
71
|
+
| Presigned URL | `hcloud OBS sign obs://<bucket>/<key> -e=<seconds>` |
|
|
72
|
+
| Object metadata | `hcloud OBS stat obs://<bucket>/<key>` |
|
|
73
|
+
|
|
74
|
+
## Static Website Deployment Workflow
|
|
75
|
+
|
|
76
|
+
See `references/static-website.md` for the full end-to-end workflow:
|
|
77
|
+
Build → Create bucket → Upload → Set bucket ACL → Set object ACL → Configure website (REST API/console)
|
|
78
|
+
|
|
79
|
+
> KooCLI OBS does NOT support `SetBucketWebsite`. Configure static website hosting via REST API (`PUT /?website`) or the Huawei Cloud console.
|
|
80
|
+
|
|
81
|
+
## Storage Classes
|
|
82
|
+
|
|
83
|
+
| Class | Use Case | Min Storage | Retrieval Fee |
|
|
84
|
+
|-------|----------|-------------|---------------|
|
|
85
|
+
| STANDARD | Frequently accessed | None | No |
|
|
86
|
+
| STANDARD_IA | Infrequent access | 30 days | Yes |
|
|
87
|
+
| ARCHIVE | Long-term archive | 90 days | Yes (hours) |
|
|
88
|
+
|
|
89
|
+
## Troubleshooting
|
|
90
|
+
|
|
91
|
+
| Error | Root Cause -> Fix |
|
|
92
|
+
|-------|------------------|
|
|
93
|
+
| AccessDenied on bucket | IAM/bucket policy/ACL conflict -> Check all three layers |
|
|
94
|
+
| BucketAlreadyExists | Name taken globally -> Choose different name |
|
|
95
|
+
| NoSuchKey | Object doesn't exist or wrong region -> Verify key and region |
|
|
96
|
+
| InvalidAccessKeyId | OBS uses AK/SK directly -> Verify AK/SK validity, OBS endpoint, OBS permissions |
|
|
97
|
+
| EntityTooLarge | Single PUT limit 5GB -> Use multipart upload |
|
|
98
|
+
| OBS --help fails | KooCLI OBS uses `help` not `--help` -> Run `hcloud OBS help` |
|
|
99
|
+
|
|
100
|
+
## Security Considerations
|
|
101
|
+
|
|
102
|
+
- MUST block public access by default
|
|
103
|
+
- MUST use HTTPS-only for buckets
|
|
104
|
+
- SHOULD enable access logging for audit
|
|
105
|
+
- SHOULD rotate presigned URL expiry (max 7 days)
|
|
106
|
+
- MUST NOT store AK/SK in bucket policies
|
|
107
|
+
|
|
108
|
+
## Cross-Skill References
|
|
109
|
+
|
|
110
|
+
- **EIP**: See `huawei-vpc` for public network access
|
|
111
|
+
- **DEW**: See `huawei-dew` for secret management
|
|
112
|
+
|
|
113
|
+
## References
|
|
114
|
+
|
|
115
|
+
- OBS Docs: https://support.huaweicloud.com/obs/
|
|
116
|
+
- Static website: references/static-website.md
|
|
117
|
+
- Lifecycle: references/bucket-lifecycle.md
|
|
118
|
+
- Replication: references/replication.md
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# OBS Bucket Creation Reference
|
|
2
|
+
|
|
3
|
+
From Huawei Cloud marketplace best practices.
|
|
4
|
+
|
|
5
|
+
## Naming Rules
|
|
6
|
+
|
|
7
|
+
| Rule | Detail |
|
|
8
|
+
|------|--------|
|
|
9
|
+
| Length | 3-63 characters |
|
|
10
|
+
| Characters | Lowercase letters, numbers, `-`, `.` |
|
|
11
|
+
| No IP format | Cannot be IP address pattern |
|
|
12
|
+
| No leading/trailing `-` or `.` | Start and end must be alphanumeric |
|
|
13
|
+
| No `..` | Adjacent dots forbidden |
|
|
14
|
+
| No `-.` or `.-` | Adjacent dot-hyphen combos forbidden |
|
|
15
|
+
|
|
16
|
+
## Create Bucket
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
hcloud OBS mb obs://<bucket> [-acl=xxx] [-location=<r>] [-sc=xxx]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
| Option | Values | Default |
|
|
23
|
+
|--------|--------|---------|
|
|
24
|
+
| `-acl` | private, public-read, public-read-write | private |
|
|
25
|
+
| `-location` | cn-south-1, cn-north-4, ... | config default |
|
|
26
|
+
| `-sc` | standard, warm, cold, deep-archive | standard |
|
|
27
|
+
|
|
28
|
+
## Quick Verify
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
hcloud OBS ls
|
|
32
|
+
hcloud OBS stat obs://<bucket>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Storage Class Guide
|
|
36
|
+
|
|
37
|
+
| Class | Access Frequency | Min Storage | Retrieval Cost |
|
|
38
|
+
|-------|-----------------|-------------|----------------|
|
|
39
|
+
| standard | Frequent | None | No |
|
|
40
|
+
| warm | Infrequent | 30 days | Yes |
|
|
41
|
+
| cold | Rare | 90 days | Yes |
|
|
42
|
+
| deep-archive | Archive | 180 days | Yes |
|
|
43
|
+
|
|
44
|
+
## Critical Rules
|
|
45
|
+
|
|
46
|
+
- Bucket name is globally unique — test with `hcloud OBS stat` before creating
|
|
47
|
+
- Region is immutable after creation
|
|
48
|
+
- ACL does NOT cascade to objects — set both bucket-level and object-level access
|
|
49
|
+
- OBS uses separate credentials (`~/.obsutilconfig`, configure via `hcloud OBS config -i`)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# OBS Bucket Lifecycle
|
|
2
|
+
|
|
3
|
+
> KooCLI OBS uses obsutil-style commands. `OBS CreateBucket` → `OBS mb`. `SetBucketWebsite` is NOT supported in KooCLI OBS (use API/SDK).
|
|
4
|
+
|
|
5
|
+
## Create Bucket
|
|
6
|
+
hcloud OBS mb obs://<bucket> -location=<region>
|
|
7
|
+
|
|
8
|
+
## Lifecycle Rules (JSON)
|
|
9
|
+
{
|
|
10
|
+
"Rules": [{
|
|
11
|
+
"ID": "move-to-ia-after-30d",
|
|
12
|
+
"Status": "Enabled",
|
|
13
|
+
"Filter": {"Prefix": ""},
|
|
14
|
+
"Transitions": [{"Days": 30, "StorageClass": "STANDARD_IA"}],
|
|
15
|
+
"Expiration": {"Days": 365}
|
|
16
|
+
}]
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
## Apply
|
|
20
|
+
hcloud OBS lifecycle obs://<bucket> -method=put -localfile=<lifecycle.json>
|
|
21
|
+
|
|
22
|
+
## Static Website
|
|
23
|
+
Not available via KooCLI OBS CLI. Use `hcloud OBS chattri obs://<bucket> -acl=public-read` for bucket ACL, or use API/SDK for website configuration.
|
|
24
|
+
|
|
25
|
+
## Cross-Region Replication
|
|
26
|
+
Requires: source bucket versioning enabled, destination bucket in different region, replication IAM role.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# OBS Common Pitfalls
|
|
2
|
+
|
|
3
|
+
基于真实测试暴露的陷阱和避坑方法。
|
|
4
|
+
|
|
5
|
+
## OBS 命令格式陷阱
|
|
6
|
+
|
|
7
|
+
OBS 使用 **obsutil-style** 子命令,不是 API-style 操作名:
|
|
8
|
+
|
|
9
|
+
| 错误写法(API-style) | 正确写法(obsutil-style) |
|
|
10
|
+
|----------------------|--------------------------|
|
|
11
|
+
| `OBS --help` | `hcloud OBS help`(无 `--`,`help` 是子命令) |
|
|
12
|
+
| `OBS CreateBucket` | `hcloud OBS mb obs://<bucket>` |
|
|
13
|
+
| `OBS PutObject` | `hcloud OBS cp <file> obs://<bucket>/` |
|
|
14
|
+
| `OBS DeleteBucket` | `hcloud OBS rm obs://<bucket> -r` |
|
|
15
|
+
| `OBS ListBuckets` | `hcloud OBS ls` |
|
|
16
|
+
|
|
17
|
+
## 独立凭证配置
|
|
18
|
+
|
|
19
|
+
KooCLI OBS 使用独立的凭证文件 `~/.obsutilconfig`,**不是** `~/.hcloud/config.json`。
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# OBS 命令报 "Please set ak, sk and endpoint" 时运行:
|
|
23
|
+
hcloud OBS config -i
|
|
24
|
+
# 交互式输入:AK、SK、endpoint(如 obs.cn-north-4.myhuaweicloud.com)
|
|
25
|
+
# 这必须由用户在 agent 对话外手动执行
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## 目录上传语义
|
|
29
|
+
|
|
30
|
+
`hcloud OBS cp <dir>/ obs://bucket/ -r` 将本地**文件夹名作为对象前缀**:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
本地结构:
|
|
34
|
+
devkit/
|
|
35
|
+
index.html
|
|
36
|
+
assets/app.js
|
|
37
|
+
|
|
38
|
+
上传后 OBS 结构:
|
|
39
|
+
obs://bucket/devkit/index.html ← 多了 devkit/ 前缀
|
|
40
|
+
obs://bucket/devkit/assets/app.js
|
|
41
|
+
|
|
42
|
+
预期结构:
|
|
43
|
+
obs://bucket/index.html
|
|
44
|
+
obs://bucket/assets/app.js
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**规避方法**:
|
|
48
|
+
1. 先 `-dryRun` 预览实际键名,再执行真实上传
|
|
49
|
+
2. 或先将本地目录重命名为目标前缀名,如 `mv devkit/ root/` 后上传 `root/`
|
|
50
|
+
3. 或使用 `-flat` 参数(如支持)
|
|
51
|
+
|
|
52
|
+
## 静态网站托管
|
|
53
|
+
|
|
54
|
+
KooCLI OBS **不支持** `SetBucketWebsite` 命令。配置静态网站托管需要:
|
|
55
|
+
|
|
56
|
+
1. **REST API**: `PUT /?website` 到桶的 endpoint
|
|
57
|
+
2. **控制台**: OBS 控制台 → 桶 → 静态网站托管 → 开启
|
|
58
|
+
|
|
59
|
+
插件只能完成"上传文件 + 设置 ACL",静态托管开关需用户手动完成。
|
|
60
|
+
|
|
61
|
+
## 权限模型(三层)
|
|
62
|
+
|
|
63
|
+
| 层级 | 作用域 | 优先级 |
|
|
64
|
+
|------|--------|--------|
|
|
65
|
+
| IAM Policy | 用户/用户组 | 最高 |
|
|
66
|
+
| Bucket Policy | 桶级 | 中 |
|
|
67
|
+
| ACL | 对象级 | 最低 |
|
|
68
|
+
|
|
69
|
+
**关键规则**:三层中**最严格**的生效。Bucket Policy 设为 public-read,但 IAM deny 了 → 结果是 deny。
|
|
70
|
+
|
|
71
|
+
**静态网站场景**:必须同时设置桶级 AND 对象级 `-acl=public-read`,因为 ACL 不级联。
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# 桶级
|
|
75
|
+
hcloud OBS chattri obs://<bucket> -acl=public-read
|
|
76
|
+
# 对象级(必须单独执行)
|
|
77
|
+
hcloud OBS chattri obs://<bucket>/index.html -acl=public-read
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## 桶命名约束
|
|
81
|
+
|
|
82
|
+
- 全局唯一,所有用户共享命名空间
|
|
83
|
+
- 小写字母、数字、连字符
|
|
84
|
+
- 3-63 字符
|
|
85
|
+
- 不能以连字符开头或结尾
|
|
86
|
+
- 不能是 IP 地址格式
|
|
87
|
+
|
|
88
|
+
## 版本控制陷阱
|
|
89
|
+
|
|
90
|
+
- 开启后**无法关闭**,只能暂停
|
|
91
|
+
- 删除桶前必须清空所有版本和删除标记
|
|
92
|
+
- 版本存储按对象大小计费
|
|
93
|
+
|
|
94
|
+
## 安全注意事项
|
|
95
|
+
|
|
96
|
+
- MUST 默认阻止公网访问
|
|
97
|
+
- MUST 启用 HTTPS-only
|
|
98
|
+
- SHOULD 开启访问日志
|
|
99
|
+
- 预签名 URL 最大 7 天有效期
|
|
100
|
+
- AK/SK 绝对不能写入 Bucket Policy
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# OBS Static Website Deployment
|
|
2
|
+
|
|
3
|
+
## Workflow
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
1. Build project → npm run build / yarn build
|
|
7
|
+
2. Create OBS bucket → hcloud OBS mb obs://<bucket> -location=<region>
|
|
8
|
+
3. Bulk upload → hcloud OBS cp <build-dir>/ obs://<bucket>/ -r -f -flat -acl=public-read
|
|
9
|
+
4. Set bucket ACL → hcloud OBS chattri obs://<bucket> -acl=public-read
|
|
10
|
+
5. Set object ACLs → hcloud OBS chattri obs://<bucket>/ -r -f -acl=public-read
|
|
11
|
+
6. Configure website → REST API (KooCLI OBS lacks this feature)
|
|
12
|
+
7. Verify → curl http://<bucket>.obs-website.<region>.myhuaweicloud.com
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Step-by-Step (Vue/Vite Example)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# 1. Build
|
|
19
|
+
npm run build # outputs to dist/
|
|
20
|
+
|
|
21
|
+
# 2. Create bucket in target region
|
|
22
|
+
hcloud OBS mb obs://my-static-site -location=cn-north-4
|
|
23
|
+
|
|
24
|
+
# 3. Upload entire build directory (recursive, force, flatten, public ACL)
|
|
25
|
+
hcloud OBS cp dist/ obs://my-static-site/ -r -f -flat -acl=public-read
|
|
26
|
+
|
|
27
|
+
# 4. Set bucket ACL (required for static website access)
|
|
28
|
+
hcloud OBS chattri obs://my-static-site -acl=public-read
|
|
29
|
+
|
|
30
|
+
# 5. Set object ACLs recursively (objects don't inherit bucket ACL automatically)
|
|
31
|
+
hcloud OBS chattri obs://my-static-site/ -r -f -acl=public-read
|
|
32
|
+
|
|
33
|
+
# 5. Configure static website hosting
|
|
34
|
+
# KooCLI OBS does NOT support this. Use one of:
|
|
35
|
+
# Option A — REST API:
|
|
36
|
+
# PUT /?website HTTP/1.1
|
|
37
|
+
# Host: my-static-site.obs.cn-north-4.myhuaweicloud.com
|
|
38
|
+
# Body: {"IndexDocument": {"Suffix": "index.html"}, "ErrorDocument": {"Key": "error.html"}}
|
|
39
|
+
# (requires AK/SK signature)
|
|
40
|
+
# Option B — Huawei Cloud Console:
|
|
41
|
+
# Console → OBS → Bucket → Basic Settings → Static Website Hosting
|
|
42
|
+
|
|
43
|
+
# 6. Verify
|
|
44
|
+
curl http://my-static-site.obs-website.cn-north-4.myhuaweicloud.com
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Key Gotchas
|
|
48
|
+
|
|
49
|
+
- **Build output dir varies**: `dist/` (Vite), `build/` (CRA), `out/` (Next.js). Check `package.json` scripts.
|
|
50
|
+
- **Bucket name must be DNS-compliant**: lowercase, numbers, hyphens only. No underscores or uppercase.
|
|
51
|
+
- **Region matters**: Website endpoint depends on bucket region. `obs-website.<region>.myhuaweicloud.com`.
|
|
52
|
+
- **Index.html routing**: For SPA apps (Vue Router, React Router), set `ErrorDocument` to `index.html` as well.
|
|
53
|
+
- **Cache invalidation**: New uploads don't clear CDN cache. Add `?v=<timestamp>` to asset references or use OBS versioning.
|
|
54
|
+
- **Always use `-f`**: Without `-f`, obsutil prompts "Please input (y/n)" on large uploads — Agent hangs (TIMEOUT).
|
|
55
|
+
- **Use `-flat` for root files**: Without `-flat`, `dist/` becomes `bucket/dist/` prefix. Static sites need files at bucket root.
|
|
56
|
+
- **Objects don't inherit bucket ACL**: Setting bucket to public-read does NOT make individual objects public. You must also set object-level ACL with `chattri obs://<bucket>/ -r -f -acl=public-read` or use `-acl=public-read` during upload.
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: huawei-rds
|
|
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
|
+
version: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Huawei Cloud RDS
|
|
8
|
+
|
|
9
|
+
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
+
|
|
11
|
+
Always run `hcloud RDS <Operation> --help` before constructing commands to discover exact parameter names and requirements.
|
|
12
|
+
|
|
13
|
+
## Prerequisites
|
|
14
|
+
|
|
15
|
+
Before creating an RDS instance, you MUST have:
|
|
16
|
+
- A VPC and subnet (see `huawei-vpc`)
|
|
17
|
+
- A security group with database port open (MySQL=3306, PostgreSQL=5432, SQL Server=1433)
|
|
18
|
+
- Run `hcloud RDS ListFlavors --database_name=<engine> --cli-region=<r>` to get spec codes
|
|
19
|
+
|
|
20
|
+
## KooCLI Command Format
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
hcloud RDS <Operation> --cli-region=<region> [--key=value ...]
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
| Rule | Detail |
|
|
27
|
+
|------|--------|
|
|
28
|
+
| Service name | `RDS` (uppercase) |
|
|
29
|
+
| Operation | PascalCase: `ListInstances`, `CreateManualBackup` |
|
|
30
|
+
| Params | `--key=value` format. JSON params: `--key='{"k":"v"}'` |
|
|
31
|
+
| Array params | 1-based: `--instance_ids.1=xxx` |
|
|
32
|
+
| Password param | Conflicts with KooCLI system param; pipe `echo \|` to bypass |
|
|
33
|
+
|
|
34
|
+
## Critical Warnings
|
|
35
|
+
|
|
36
|
+
| Trap | Why |
|
|
37
|
+
|------|-----|
|
|
38
|
+
| Engine version immutable | Cannot change MySQL to PostgreSQL in-place |
|
|
39
|
+
| Automated backups use OBS | Backup storage incurs separate charges. Set retention period explicitly |
|
|
40
|
+
| Storage auto-scaling off by default | Enable before storage runs out or instance goes read-only |
|
|
41
|
+
| `--password` conflicts with KooCLI | Non-interactive: `printf "b\n" \| hcloud RDS CreateInstance ...` to select API param. Or use `--cli-jsonInput` |
|
|
42
|
+
| Volume type must match flavor | General→CLOUDSSD; Dedicated→CLOUDSSD\|ESSD; ARM→ULTRAHIGH |
|
|
43
|
+
| Flavor not in region | Always `ListFlavors` first. Spec codes vary by region |
|
|
44
|
+
| Restore creates new instance | No in-place restore. Verify target flavor before restoring |
|
|
45
|
+
|
|
46
|
+
## Instance Management
|
|
47
|
+
|
|
48
|
+
### List
|
|
49
|
+
```bash
|
|
50
|
+
hcloud RDS ListInstances --cli-region=<r>
|
|
51
|
+
hcloud RDS ListFlavors --database_name=<engine> --cli-region=<r>
|
|
52
|
+
hcloud RDS ListDatastores --database_name=<engine> --cli-region=<r>
|
|
53
|
+
hcloud RDS ListEngineFlavors --instance_id=<id> --cli-region=<r>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Create Instance
|
|
57
|
+
```bash
|
|
58
|
+
hcloud RDS CreateInstance --cli-region=<r> \
|
|
59
|
+
--name=<name> \
|
|
60
|
+
--datastore.type=<engine> \
|
|
61
|
+
--datastore.version=<version> \
|
|
62
|
+
--flavor_ref=<flavor-id> \
|
|
63
|
+
--volume.type=<vol-type> \
|
|
64
|
+
--volume.size=<size> \
|
|
65
|
+
--vpc_id=<vpc-id> \
|
|
66
|
+
--subnet_id=<subnet-id> \
|
|
67
|
+
--security_group_id=<sg-id> \
|
|
68
|
+
--availability_zone=<az> \
|
|
69
|
+
--charge_info.charge_mode=<mode> \
|
|
70
|
+
--password=<pw>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
> `--password` conflicts with a KooCLI system param. Pipe `echo "b\n" |` before the command or use `--cli-jsonInput` (see Critical Warnings).
|
|
74
|
+
|
|
75
|
+
| Param | Required | Note |
|
|
76
|
+
|-------|----------|------|
|
|
77
|
+
| `--name` | Yes | Instance name |
|
|
78
|
+
| `--datastore` | Yes | `--datastore.type=<engine> --datastore.version=<version>` |
|
|
79
|
+
| `--flavor_ref` | Yes | From `ListFlavors` output |
|
|
80
|
+
| `--volume` | Yes | Type matching: General→CLOUDSSD, Dedicated→CLOUDSSD\|ESSD, ARM→ULTRAHIGH |
|
|
81
|
+
| `--vpc_id` | Yes | Must exist in target region |
|
|
82
|
+
| `--subnet_id` | Yes | Must exist in target region |
|
|
83
|
+
| `--security_group_id` | Yes | Must have DB port open |
|
|
84
|
+
| `--availability_zone` | Yes | Use AZ code from `NovaListAvailabilityZones` |
|
|
85
|
+
| `--charge_info` | No | `--charge_info.charge_mode=<mode>`. Default postPaid (pay-per-use). Run `--help` for options |
|
|
86
|
+
| `--password` | Yes | 8-32 chars, uppercase+lowercase+digit+special |
|
|
87
|
+
| `--port` | No | Default 3306 (MySQL) / 5432 (PG) / 1433 (SQL Server) |
|
|
88
|
+
|
|
89
|
+
### Modify / Resize
|
|
90
|
+
```bash
|
|
91
|
+
hcloud RDS StartInstanceRestartAction --instance_id=<id> --cli-region=<r>
|
|
92
|
+
hcloud RDS StartResizeFlavorAction --instance_id=<id> --flavor_ref=<new-id> --cli-region=<r>
|
|
93
|
+
hcloud RDS StartInstanceEnlargeVolumeAction --instance_id=<id> --volume_size=<gb> --cli-region=<r>
|
|
94
|
+
hcloud RDS StartFailover --instance_id=<id> --cli-region=<r>
|
|
95
|
+
hcloud RDS UpdateInstanceAlias --instance_id=<id> --alias=<new-name> --cli-region=<r>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Delete
|
|
99
|
+
```bash
|
|
100
|
+
hcloud RDS DeleteInstance --instance_id=<id> --cli-region=<r>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Backup & Recovery
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
hcloud RDS ShowBackupPolicy --instance_id=<id> --cli-region=<r>
|
|
107
|
+
hcloud RDS SetBackupPolicy --instance_id=<id> --backup_policy='{"keep_days":7,"period":"1,2,3,4,5,6,7","start_time":"00:00-01:00"}' --cli-region=<r>
|
|
108
|
+
hcloud RDS ListBackups --instance_id=<id> --cli-region=<r>
|
|
109
|
+
hcloud RDS CreateManualBackup --instance_id=<id> --name=<name> --cli-region=<r>
|
|
110
|
+
hcloud RDS ShowRecoveryTimeWindow --instance_id=<id> --cli-region=<r>
|
|
111
|
+
hcloud RDS CreateRestoreInstance --instance_id=<id> --backup_id=<id> --name=<new-name> --flavor_ref=<id> --cli-region=<r>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
> Manual backup deletion is irreversible. Verify backup ID before deleting.
|
|
115
|
+
|
|
116
|
+
## Read Replicas
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
hcloud RDS CreateReadReplica --replica_of_id=<primary-id> --name=<name> --flavor_ref=<id> --volume.type=<vol-type> --volume.size=<size> --cli-region=<r>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Fault Diagnosis
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
hcloud RDS ListErrorLogs --instance_id=<id> --start_date=2024-01-01T00:00:00Z --end_date=2024-01-31T23:59:59Z --cli-region=<r>
|
|
126
|
+
hcloud RDS ListSlowLogs --instance_id=<id> --start_date=... --end_date=... --cli-region=<r>
|
|
127
|
+
hcloud RDS ShowReplicationStatus --instance_id=<id> --cli-region=<r>
|
|
128
|
+
hcloud RDS ListInstanceDiagnosis --cli-region=<r>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Connecting
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
hcloud RDS ListInstances --cli-region=<r> # get private_ips + port
|
|
135
|
+
mysql -h <private_ip> -P 3306 -u root -p --ssl-mode=REQUIRED
|
|
136
|
+
psql -h <private_ip> -p 5432 -U root -d postgres
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
> hcloud does NOT support SQL execution. Use a database client.
|
|
140
|
+
> For public access, bind an EIP (see `huawei-vpc`).
|
|
141
|
+
|
|
142
|
+
## Mutating Operations (Require Approval)
|
|
143
|
+
|
|
144
|
+
| Operation | Effect |
|
|
145
|
+
|-----------|--------|
|
|
146
|
+
| `CreateInstance` | New instance (billing starts) |
|
|
147
|
+
| `DeleteInstance` | Irreversible data loss |
|
|
148
|
+
| `StartResizeFlavorAction` | Brief interruption during switchover |
|
|
149
|
+
| `StartInstanceEnlargeVolumeAction` | Online, but irreversible |
|
|
150
|
+
| `StartFailover` | Primary-standby switchover |
|
|
151
|
+
| `CreateRestoreInstance` | Creates new instance from backup |
|
|
152
|
+
| `CreateManualBackup` | Incurs OBS storage charges |
|
|
153
|
+
| `DeleteManualBackup` | Irreversible |
|
|
154
|
+
|
|
155
|
+
## Troubleshooting
|
|
156
|
+
|
|
157
|
+
| Error | Root Cause -> Fix |
|
|
158
|
+
|-------|-------------------|
|
|
159
|
+
| Connection refused | SG missing DB port. Add ingress rule |
|
|
160
|
+
| Storage full | Manual resize or enable auto-scaling |
|
|
161
|
+
| DBS.280241 Invalid storage type | Volume type doesn't match flavor group |
|
|
162
|
+
| DBS.280448 Sold out | Try different volume type or AZ |
|
|
163
|
+
| Replication lag | Check `ShowReplicationStatus`. Consider read replica |
|
|
164
|
+
| Instance stuck BUILDING | Check task status: `hcloud RDS ListTasks` |
|
|
165
|
+
| SYS.0403 | SCP policy denies this operation (e.g. security group rules, EIP binding). See `huawei-vpc` troubleshooting |
|
|
166
|
+
| EIP.7905 | EIP quota exceeded — cannot create new EIP for public access. See `huawei-vpc` troubleshooting |
|
|
167
|
+
|
|
168
|
+
## Security
|
|
169
|
+
|
|
170
|
+
- MUST use security groups, not open 0.0.0.0/0
|
|
171
|
+
- MUST enable SSL for connections
|
|
172
|
+
- MUST store passwords in DEW/CSMS (see `huawei-dew`)
|
|
173
|
+
- SHOULD enable audit logs for compliance
|
|
174
|
+
- SHOULD set backup policy with >= 7 day retention
|
|
175
|
+
|
|
176
|
+
## Cross-Skill References
|
|
177
|
+
|
|
178
|
+
- VPC/Subnet/Security Group: `huawei-vpc`
|
|
179
|
+
- DEW secrets: `huawei-dew`
|
|
180
|
+
- EIP for public access: `huawei-vpc`
|
|
181
|
+
- OBS for backup storage: `huawei-obs`
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: huawei-smn-dms
|
|
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
|
+
version: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Huawei Cloud SMN / DMS
|
|
8
|
+
|
|
9
|
+
**STOP - Do not answer from general knowledge.** Follow the procedure below.
|
|
10
|
+
|
|
11
|
+
Always run `hcloud SMN <Operation> --help` or `hcloud DMS <Operation> --help` before constructing commands.
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
Domain expertise for SMN (Simple Message Notification) and DMS (Distributed Message Service). SMN is used for notifications and alerts. DMS covers Kafka, RabbitMQ, and RocketMQ instances.
|
|
16
|
+
|
|
17
|
+
## SMN
|
|
18
|
+
|
|
19
|
+
## Critical Warnings
|
|
20
|
+
|
|
21
|
+
| Trap | Why |
|
|
22
|
+
|------|-----|
|
|
23
|
+
| Subscription confirmation | HTTP/HTTPS subscriptions need endpoint ping-back confirmation |
|
|
24
|
+
| Email subscription delay | Email subscriptions require user to click confirmation link |
|
|
25
|
+
| SMS charge per message | Template SMS incurs per-delivery charges |
|
|
26
|
+
|
|
27
|
+
### Common Workflows
|
|
28
|
+
|
|
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
|
+
| Create message template | `CreateMessageTemplate --cli-region=<r> --project_id=<p>` |
|
|
36
|
+
| Publish message | `PublishMessage --cli-region=<r> --project_id=<p>` |
|
|
37
|
+
| Delete topic | `DeleteTopic --cli-region=<r> --project_id=<p>` |
|
|
38
|
+
|
|
39
|
+
## DMS
|
|
40
|
+
|
|
41
|
+
### Service Types
|
|
42
|
+
|
|
43
|
+
| Type | KooCLI Service |
|
|
44
|
+
|------|---------------|
|
|
45
|
+
| Kafka | `hcloud DMS` |
|
|
46
|
+
| RabbitMQ | `hcloud DMS` |
|
|
47
|
+
| RocketMQ | `hcloud DMS` |
|
|
48
|
+
|
|
49
|
+
### Common Workflows
|
|
50
|
+
|
|
51
|
+
| Task | Operation |
|
|
52
|
+
|------|-----------|
|
|
53
|
+
| List instances | `ListInstances --cli-region=<r> --project_id=<p>` |
|
|
54
|
+
| Create Kafka instance | `CreateInstance --cli-region=<r> --project_id=<p>` |
|
|
55
|
+
| List Kafka topics | `ListTopics --cli-region=<r> --project_id=<p>` |
|
|
56
|
+
|
|
57
|
+
Discover exact parameters with `--help` before executing any command.
|
|
58
|
+
|
|
59
|
+
## Troubleshooting
|
|
60
|
+
|
|
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
|
+
|
|
66
|
+
## Cross-Skill References
|
|
67
|
+
|
|
68
|
+
- **CES alarms**: See `huawei-cloud-eye` for SMN-based alarm notifications
|
|
69
|
+
- **VPC**: See `huawei-vpc` for DMS instance networking
|