可快速将项目一键部署到华为云单机ECS,适用于小型应用、测试环境等低流量场景。支持AI自动分析项目、资源复用与多平台部署,提供部署验证及资源清理功能,简化部署流程。【此简介由AI生成】
| Files | Last commit | Last update |
|---|---|---|
| 5 months ago | ||
| 5 months ago | ||
| 5 months ago | ||
| 5 months ago | ||
| 5 months ago | ||
| 5 months ago |
Huawei Cloud ECS Deployment Skill
One-click deployment of the current project to Huawei Cloud single ECS instance, with automatic analysis, reuse, and deployment
Quick Start
One-line Deployment Trigger
Deploy application # AI auto-deployment
Deploy using single ECS mode # Explicitly specify single ECS mode
Deployment Flow
User sends command → AI analyzes project → Collects configuration → Auto-deploys → Outputs result
Platform Support
- ✅ Linux (Ubuntu/Debian/RHEL/CentOS)
- ✅ macOS
- ✅ Windows
Deployment Mode: Single ECS
Use Cases: Small applications, test environments, personal projects, low-traffic scenarios
Core Components: 1 ECS + EIP + VPC/Subnet/Security Group
Estimated Monthly Cost: ~¥420 (on-demand billing ¥0.32/hour, actual billing subject to Huawei Cloud invoice)
Prerequisites
Required Items
| Item | How to Obtain | Notes |
|---|---|---|
| Huawei Cloud Account | https://console.huaweicloud.com/ | Must complete real-name authentication |
| Access Key (AK) | https://console.huaweicloud.com/iam/#/accessKey | Save after creation, SK is shown only once |
| Secret Key (SK) | Same as above | Pass via environment variable, do not enter in conversation |
| ECS Password | Set by yourself | 8-26 characters, including uppercase/lowercase letters + digits + special characters |
Usage
Method 1: AI Conversation Trigger (Recommended)
Send a command directly in the conversation:
Deploy using single ECS mode
AI will automatically: 1. Analyze project structure → 2. Collect AK/SK and password → 3. Execute Terraform deployment → 4. Output access URL
Method 2: Manual Execution
1. Environment Initialization
python scripts/terraform-installer/scripts/prepare_environment.py
2. Set Environment Variables
export HW_ACCESS_KEY="your AK"
export HW_SECRET_KEY="your SK"
export HW_ECS_PASSWORD="your password"
export HW_PROJECT_NAME="my-app" # Optional, default my-app
export HW_REGION="cn-north-4" # Optional, default cn-north-4
3. Execute Deployment
bash scripts/deploy-single-ecs-deterministic.sh
4. Verify Deployment
./scripts/verify-deployment.sh <EIP address> 80
Configuration
| Configuration | Default | Description |
|---|---|---|
ecs_flavor |
s6.large.2 | ECS flavor (2 vCPU 4GB) |
system_disk_size |
40 | System disk size (GB) |
data_disk_size |
100 | Data disk size (GB) |
eip_bandwidth |
5 | EIP bandwidth (Mbps) |
app_port |
5000 | Application port |
Resource Reuse Configuration
reuse_vpc = true; existing_vpc_id = "vpc-xxxx"
reuse_subnet = true; existing_subnet_id = "subnet-xxxx"
reuse_security_group = true; existing_security_group_id = "sg-xxxx"
reuse_eip = true; existing_eip_address = "123.45.67.89"
Resource Cleanup
export HW_ACCESS_KEY="xxx"
export HW_SECRET_KEY="***"
bash scripts/cleanup-standard.sh <project name> [region]
# Preview mode (no actual deletion)
bash scripts/cleanup-standard.sh my-app cn-north-4 --dry-run
FAQ
| Issue | Solution |
|---|---|
| AK/SK verification failed | Log in to https://console.huaweicloud.com/iam/#/accessKey and check if AK is enabled |
| ECS flavor unavailable | AI will automatically switch to an available flavor |
| Cannot access after deployment | Check security group ports → Check ECS status → Run verification script |
| SSH connection failed | Wait 2-3 minutes and retry, confirm password is correct |
Directory Structure
huawei-cloud-ecs-deploy/
├── SKILL.md # AI skill main document
├── README.md # This document
├── references/ # Reference documents
│ ├── cli-installation-guide.md # CLI installation guide
│ ├── iam-policies.md # IAM permission policies
│ ├── verification-method.md # Verification method
│ ├── acceptance-criteria.md # Acceptance criteria
│ ├── single-ecs-deploy-flow-v2.md # Single ECS standard flow
│ ├── spec-single-ecs.md # Single ECS specification
│ ├── cost-calculation.md # Cost calculation guide
│ └── huaweicloud-errors.md # Huawei Cloud error codes
├── scripts/ # Executable scripts
│ ├── deploy-single-ecs-deterministic.sh
│ ├── init-environment.sh
│ ├── cleanup-standard.sh
│ ├── cleanup-standard.py
│ ├── parse-deploy-specs.py
│ ├── verify-deployment.sh
│ └── terraform-installer/ # Terraform installation sub-skill
├── templates/terraform/ # Terraform templates
│ ├── single-ecs/ # Single ECS configuration
│ └── modules/ # Common modules
Introduction
可快速将项目一键部署到华为云单机ECS,适用于小型应用、测试环境等低流量场景。支持AI自动分析项目、资源复用与多平台部署,提供部署验证及资源清理功能,简化部署流程。【此简介由AI生成】
Customize your domain