Skip to content

Cloud Migration Plan: Huawei Cloud to AWS Singapore

Objective

Current EnvironmentTarget Environment
Huawei Cloud Singapore node k8sAWS Singapore node k8s
Huawei Cloud Singapore RDSAWS Singapore RDS for MySQL

Migration Strategy

The operation will be conducted in two phases:

  1. Phase 1: Migrate the stateless services of BOSS and Corestone
  2. 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 (only redis-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) to bill.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

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-app namespace in each truewatch cluster
      • BOSS-related function: Authentication
      • Verification points:
        • Identify additional BOSS & Corestone dependencies
        • Verify all dependent functionality
    • Automata

      • Verification points:
        • Document all BOSS & Corestone dependent features
        • Verify functionality post-migration
    • 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:

  1. Revert DNS changes in Cloudflare
  2. Scale up Huawei Cloud services to original replica count
  3. Revert any ConfigMap changes on Huawei Cloud environment
  4. Continue using Huawei Cloud RDS

Success Criteria

  1. All services running properly on AWS infrastructure
  2. Database functionality verified
  3. No service disruption for end users
  4. All upstream and downstream integrations functioning correctly
  5. Performance metrics within acceptable thresholds