Cloud Migration Plan: Huawei Cloud to AWS Singapore
Objective
| Current Environment | Target Environment |
|---|---|
| Huawei Cloud Singapore node k8s | AWS Singapore node k8s |
| Huawei Cloud Singapore RDS | AWS Singapore RDS for MySQL |
Migration Strategy
The operation will be conducted in two phases:
- Phase 1: Migrate the stateless services of BOSS and Corestone
- Phase 2: Migrate the MySQL database
Detailed Implementation Plan
Phase 1: Migrate Stateless Services (BOSS and Corestone)
1. Resource Migration
- Use Velero to migrate all resources from the following namespaces:
billing-guance-intl(all resources)guance-basis(all resources)middleware(onlyredis-basis)
- Resources to be migrated include:
- Deployments
- ConfigMaps
- Ingress rules
- Services
- All other related k8s resources
2. ConfigMap Modifications
- Database URL Updates:
- Reason: Original database URLs use internal DNS which will be inaccessible post-migration
- Solution: Assign an EIP to the Huawei Cloud RDS
- Implementation: Update all database URLs to use the EIP address
- Security: Whitelist this IP for the AWS k8s cluster's NAT gateway
3. DNS Configuration Changes
- Platform: Cloudflare
- Action: Redirect all BOSS-related domains to the AWS cluster's nginx ingress IP
- Additional configuration:
- In Automata cluster: Change configmap entry
webportal.billing-guance-intl(K8S internal DNS) tobill.truewatch.com - Huawei Cloud services: Scale down BOSS & Corestone service replicas to 0
- Important: Verify if there's data cached in Redis or elsewhere
- If no cache exists: Immediate scale down
- If cache exists: Wait for cached data to be committed to database before scaling down
- In Automata cluster: Change configmap entry
4. Service Verification
Upstream Service Validation:
Kodo
- BOSS-related function: Reports billing data to BOSS daily
- Verification points:
- Identify Kodo reporting schedule
- Confirm successful post-migration reporting
- Understand Kodo's failure retry mechanisms
Corestone-truewatch
- Location:
forethought-inner-appnamespace in each truewatch cluster - BOSS-related function: Authentication
- Verification points:
- Identify additional BOSS & Corestone dependencies
- Verify all dependent functionality
- Location:
Automata
- Verification points:
- Document all BOSS & Corestone dependent features
- Verify functionality post-migration
- Verification points:
Other Dependencies
- Identify any additional upstream services that rely on BOSS & Corestone
Phase 2: MySQL Database Migration
1. Data Migration
- Tool: AWS Database Migration Service (DMS)
- Process: Configure and execute full database migration
2. Cutover Procedure
- Update BOSS & Corestone services to point to AWS RDS
- Restart services to ensure configuration changes are applied
- Validation: Confirm proper database connectivity
- Decommissioning: Shutdown Huawei Cloud RDS after successful validation
3. Service Validation
- Execute comprehensive service validation
- Verify data integrity
- Confirm system performance
Rollback Plan
In case of migration failure:
- Revert DNS changes in Cloudflare
- Scale up Huawei Cloud services to original replica count
- Revert any ConfigMap changes on Huawei Cloud environment
- Continue using Huawei Cloud RDS
Success Criteria
- All services running properly on AWS infrastructure
- Database functionality verified
- No service disruption for end users
- All upstream and downstream integrations functioning correctly
- Performance metrics within acceptable thresholds