Overview
CloudMigrate is a production-grade skill for automating complex cloud migrations and infrastructure deployments across AWS, Azure, GCP, and hybrid environments. It orchestrates Infrastructure-as-Code (IaC) generation, multi-step deployment workflows, service discovery, data migration planning, and environment configuration — eliminating manual processes that introduce errors and delay time-to-production.
Why CloudMigrate Matters:
- - Reduces Migration Complexity: Converts high-level requirements into executable Terraform, CloudFormation, and Ansible playbooks
- Multi-Cloud Support: Seamlessly provisions across AWS (EC2, RDS, Lambda), Azure (VMs, SQL Database, App Service), and GCP (Compute Engine, Cloud SQL)
- Risk Mitigation: Generates validation scripts, pre-flight checks, and rollback procedures automatically
- Team Enablement: Integrates with Slack for approval workflows and GitHub for GitOps-ready code repositories
- Cost Optimization: Analyzes current infrastructure and recommends cost-reduction strategies before migration
Typical Use Cases:
- - Lift-and-shift migration from on-premises to public cloud
- Multi-region failover and disaster recovery setup
- Microservices deployment with containerization
- Database migration with zero-downtime cutover planning
- DevOps pipeline automation and CI/CD infrastructure
Quick Start
Try these prompts immediately to see CloudMigrate in action:
Example 1: Generate AWS Migration Plan
CODEBLOCK0
Example 2: Create Multi-Environment Infrastructure
CODEBLOCK1
Example 3: Azure Hybrid Cloud Deployment
CODEBLOCK2
Example 4: Kubernetes Deployment Automation
Create a complete Kubernetes infrastructure for a microservices platform:
- EKS cluster on AWS (multi-AZ)
- Container registry (ECR)
- Helm charts for 5 microservices
- Persistent storage (EBS volumes)
- Ingress controller with TLS
- Service mesh (Istio) for traffic management
- Prometheus + Grafana monitoring
- RBAC and network policies
Include deployment scripts and GitOps workflows with Flux.
Capabilities
1. Infrastructure-as-Code Generation
What it does: Converts natural language requirements into production-ready Terraform, CloudFormation, Bicep, or Ansible code.
Example Usage:
CODEBLOCK4
Supported IaC Frameworks:
- - Terraform (HCL)
- AWS CloudFormation (JSON/YAML)
- Azure Bicep
- Ansible playbooks
- Kubernetes manifests (YAML)
- Docker Compose
- Helm Charts
2. Multi-Cloud Migration Planning
What it does: Assesses source environments and generates cloud-specific migration strategies.
Outputs Include:
- - Current state analysis (resource inventory, dependencies, costs)
- Target architecture diagrams
- Network topology with CIDR planning
- Database migration strategy (schema conversion, data replication)
- Application re-platforming recommendations
- Cost analysis (CapEx → OpEx breakdown)
- Timeline and resource allocation
3. Deployment Orchestration
What it does: Creates step-by-step automation workflows for safe, validated deployments.
Features:
- - Pre-deployment validation scripts (connectivity, permissions, quotas)
- Rolling deployments with health checks
- Canary releases with traffic shifting
- Automated rollback on failure detection
- Post-deployment smoke tests
- Approval gates (integrate with Slack for manual sign-offs)
4. Data Migration & Cutover Planning
What it does: Generates scripts and procedures for zero-downtime data migration.
Capabilities:
- - Schema validation and conversion (Oracle → PostgreSQL, etc.)
- Replication lag monitoring
- Cutover scheduling and validation
- DNS failover automation
- Data validation queries
- Backup and recovery procedures
5. Security & Compliance Automation
What it does: Embeds security best practices into generated infrastructure.
Includes:
- - IAM role and policy generation (least privilege principle)
- Network segmentation (security groups, NACLs, firewalls)
- Encryption configuration (KMS, TDE, SSL/TLS)
- Compliance scanning (CIS benchmarks, PCI-DSS)
- Secrets management (HashiCorp Vault, AWS Secrets Manager)
- Audit logging and monitoring
6. Cost Optimization Analysis
What it does: Recommends cost-saving strategies and calculates savings.
Outputs:
- - Reserved instance recommendations
- Spot instance opportunities
- Right-sizing recommendations
- Storage optimization (S3 tiers, compression)
- Network cost analysis
- 3-year TCO projections
Configuration
Required Environment Variables
CODEBLOCK5
Setup Instructions
- 1. Install Required Binaries:
CODEBLOCK6
- 2. Authenticate Cloud Providers:
CODEBLOCK7
- 3. Initialize Terraform State Backend:
CODEBLOCK8
- 4. Configure Slack Integration (Optional):
CODEBLOCK9
Configuration Options
CODEBLOCK10
Example Outputs
Generated Terraform Code
CODEBLOCK11
Migration Assessment Report (JSON)
```json
{
"assessment_id": "mig-2024-001",
"timestamp": "2024-01-15T10:30:00Z",
"source_environment": {
"type": "on-premises",
"location": "data-center-01",
"total_servers": 47,
"total
storagegb": 5120,
"total_vms": {
"windows": 10,
"linux": 37
}
},
"target_environment": {
"provider": "aws",
"regions": ["us-east-1", "us-west-2"],
"estimated
monthlycost": 18500
},
"migration_strategy": "lift-and-shift",
"timeline": {
"assessment_phase": "2 weeks",
"planning_phase": "4 weeks",
"migration_phase": "12 weeks",
概述
CloudMigrate 是一个生产级技能,用于自动化跨 AWS、Azure、GCP 和混合环境的复杂云迁移和基础设施部署。它协调基础设施即代码(IaC)生成、多步骤部署工作流、服务发现、数据迁移规划和环境配置——消除了引入错误并延迟投产时间的手动流程。
CloudMigrate 的重要性:
- - 降低迁移复杂性:将高级需求转换为可执行的 Terraform、CloudFormation 和 Ansible 剧本
- 多云支持:无缝配置 AWS(EC2、RDS、Lambda)、Azure(虚拟机、SQL 数据库、应用服务)和 GCP(计算引擎、Cloud SQL)
- 风险缓解:自动生成验证脚本、预检检查和回滚流程
- 团队赋能:与 Slack 集成用于审批工作流,与 GitHub 集成用于 GitOps 就绪的代码仓库
- 成本优化:分析当前基础设施并在迁移前推荐成本降低策略
典型用例:
- - 从本地到公有云的直接迁移
- 多区域故障切换和灾难恢复设置
- 使用容器化的微服务部署
- 零停机切换规划的数据库迁移
- DevOps 流水线自动化和 CI/CD 基础设施
快速开始
立即尝试以下提示,查看 CloudMigrate 的实际效果:
示例 1:生成 AWS 迁移计划
为 50 台服务器的本地数据中心规划迁移到 AWS。
环境包括:
- - 10 台运行传统应用的 Windows 服务器(SQL Server 后端)
- 20 台 Linux Web 服务器(Apache/PHP)
- 15 台数据库服务器(MySQL、PostgreSQL)
- 网络:10.0.0.0/8,5 个子网
生成:
- 1. 网络架构图(代码形式)
- VPC、子网、安全组的 Terraform 配置
- AWS 数据库迁移服务(DMS)配置
- 成本估算(3 年 TCO 对比)
- 风险评估和缓解步骤
示例 2:创建多环境基础设施
为生产 SaaS 应用创建 Terraform 代码,包含:
- - 开发、预发布和生产环境
- 路由到自动扩展组的应用负载均衡器
- 带只读副本的 RDS PostgreSQL
- 用于会话的 ElastiCache Redis 集群
- 带版本控制和加密的 S3 存储桶
- CloudFront CDN 配置
- 使用 CloudWatch 和 SNS 告警的监控
包括:
- - 环境变量文件(.tfvars)
- 使用 DynamoDB 的 Terraform 状态锁定
- IAM 角色和策略(最小权限)
- 备份和灾难恢复自动化
示例 3:Azure 混合云部署
为混合 Azure 部署生成基础设施即代码:
- - 迁移到 Azure 的本地 Hyper-V 虚拟机
- Azure ExpressRoute 连接
- Azure SQL 数据库故障转移组(只读副本)
- 带预发布槽位的应用服务用于蓝绿部署
- 用于自动化测试的 Azure DevOps 流水线
- 使用 Application Insights 的监控
提供:
- 1. Bicep 模板(Azure 原生 IaC)
- 网络配置和安全策略
- Azure Migrate 评估和脚本
- 带验证步骤的切换计划
- 回滚流程
示例 4:Kubernetes 部署自动化
为微服务平台创建完整的 Kubernetes 基础设施:
- - AWS 上的 EKS 集群(多可用区)
- 容器注册表(ECR)
- 5 个微服务的 Helm Chart
- 持久化存储(EBS 卷)
- 带 TLS 的 Ingress 控制器
- 用于流量管理的服务网格(Istio)
- Prometheus + Grafana 监控
- RBAC 和网络策略
包括部署脚本和基于 Flux 的 GitOps 工作流。
能力
1. 基础设施即代码生成
功能: 将自然语言需求转换为生产就绪的 Terraform、CloudFormation、Bicep 或 Ansible 代码。
使用示例:
为安全的多可用区 RDS 集群生成 Terraform 模块,包含:
- - 自动备份(30 天保留期)
- 静态加密(KMS)和传输加密(TLS)
- IAM 数据库认证
- 启用 Performance Insights
- PostgreSQL 14 的参数组调优
- 跨越 3 个可用区的子网组
支持的 IaC 框架:
- - Terraform(HCL)
- AWS CloudFormation(JSON/YAML)
- Azure Bicep
- Ansible 剧本
- Kubernetes 清单(YAML)
- Docker Compose
- Helm Chart
2. 多云迁移规划
功能: 评估源环境并生成特定于云的迁移策略。
输出包括:
- - 当前状态分析(资源清单、依赖关系、成本)
- 目标架构图
- 带 CIDR 规划的网络拓扑
- 数据库迁移策略(模式转换、数据复制)
- 应用重新平台化建议
- 成本分析(资本支出 → 运营支出分解)
- 时间线和资源分配
3. 部署编排
功能: 创建分步自动化工作流,实现安全、经过验证的部署。
特性:
- - 部署前验证脚本(连接性、权限、配额)
- 带健康检查的滚动部署
- 带流量切换的金丝雀发布
- 故障检测时的自动回滚
- 部署后冒烟测试
- 审批关卡(与 Slack 集成进行手动签核)
4. 数据迁移与切换规划
功能: 为零停机数据迁移生成脚本和流程。
能力:
- - 模式验证和转换(Oracle → PostgreSQL 等)
- 复制延迟监控
- 切换调度和验证
- DNS 故障转移自动化
- 数据验证查询
- 备份和恢复流程
5. 安全与合规自动化
功能: 将安全最佳实践嵌入生成的基础设施中。
包括:
- - IAM 角色和策略生成(最小权限原则)
- 网络分段(安全组、NACL、防火墙)
- 加密配置(KMS、TDE、SSL/TLS)
- 合规扫描(CIS 基准、PCI-DSS)
- 密钥管理(HashiCorp Vault、AWS Secrets Manager)
- 审计日志和监控
6. 成本优化分析
功能: 推荐成本节约策略并计算节省金额。
输出:
- - 预留实例建议
- Spot 实例机会
- 合理调整建议
- 存储优化(S3 层级、压缩)
- 网络成本分析
- 3 年 TCO 预测
配置
必需的环境变量
bash
AWS
export AWS
ACCESSKEY_ID=your-access-key
export AWS
SECRETACCESS_KEY=your-secret-key
export AWS_REGION=us-east-1
Azure
export AZURE
SUBSCRIPTIONID=your-subscription-id
export AZURE
CLIENTID=your-client-id
export AZURE
CLIENTSECRET=your-client-secret
export AZURE
TENANTID=your-tenant-id
GCP
export GCP
PROJECTID=your-project-id
export GCP
SERVICEACCOUNT_JSON=/path/to/service-account.json
CloudMigrate 特定
export CLOUDMIGRATE
STATEBUCKET=your-terraform-state-bucket
export CLOUDMIGRATE
SLACKWEBHOOK=https://hooks.slack.com/services/YOUR/WEBHOOK
export CLOUDMIGRATE
GITHUBTOKEN=your-github-pat-token
export CLOUDMIGRATE
VAULTADDR=https://vault.example.com
设置说明
- 1. 安装必需的二进制文件:
bash
# macOS(Homebrew)
brew install terraform ansible awscli azure-cli google-cloud-sdk docker
# Linux(Debian/Ubuntu)
sudo apt-get install -y terraform ansible awscli azure-cli docker.io
# Windows(Chocolatey)
choco install terraform ansible awscli azure-cli docker-desktop
- 2. 认证云提供商:
bash
# AWS
aws configure
# Azure
az login
# GCP
gcloud auth application-default login
- 3. 初始化 Terraform 状态后端:
bash
cloudmigrate init-backend \
--provider aws \
--bucket my-terraform-state \
--region us-east-1
- 4. 配置 Slack 集成(可选):
bash
cloudmigrate config slack \
--webhook-url https://hooks.slack.com/services/YOUR/WEBHOOK \
--channel #infrastructure
配置选项
yaml
cloudmigrate-config.yaml
migration: