Migration overview
Migrating between cloud providers involves:- Preparing infrastructure in the destination cloud
- Migrating data (storage and database)
- Implementing provider-specific services
- Testing the new deployment
- Switching traffic to the new provider
Estimated migration time: 1-2 weeks for a complete migration, including testing and validation.
What changes vs what stays the same
Unchanged
- Application code (Node.js/React)
- Database schema
- Kubernetes manifests (mostly)
- CI/CD pipeline logic
- Security policies
- Business logic
Changes Required
- Environment variables
- Terraform modules
- Service implementations (4 files)
- Container registry
- Monitoring dashboards
- DNS configuration
Step-by-step migration process
Prepare destination infrastructure
Create the infrastructure in your destination cloud using Terraform:This creates:
- VPC/VCN and networking
- Kubernetes cluster (OKE/GKE/AKS)
- Database instance
- Storage buckets/containers
- Security controls
Migrate storage data
Transfer files from source to destination storage:
- Using rclone
- Using cloud CLIs
Implement provider services
Create the 4 service implementation files for your destination provider:See the provider-specific implementation guides:
Update container registry
Build and push images to the new registry:Update Kubernetes deployments with new image URLs:
Update DNS and switch traffic
When ready for production, update DNS to point to the new load balancer:
- Blue-Green
- Cutover
Monitor and validate
After migration, monitor key metrics:Monitor for:
- API response times
- Error rates
- Database connection pool
- Storage access latency
- Cost metrics
Rollback plan
If issues occur during migration:Emergency rollback procedure
Emergency rollback procedure
-
Immediate DNS revert
-
Database rollback
-
Communication
- Notify users of the incident
- Document the issue
- Schedule post-mortem
-
Investigation
- Identify root cause
- Fix issues
- Re-plan migration
Migration checklist
Use this checklist to track your migration:- Destination infrastructure created and validated
- Storage data migrated and verified
- Database exported and imported successfully
- Service implementations completed for new provider
- Environment variables updated
- Container images built and pushed to new registry
- Kubernetes manifests updated with new image URLs
- Staging deployment successful
- Integration tests passing
- Performance tests show acceptable metrics
- Security scan completed on new infrastructure
- Monitoring and alerting configured
- Disaster recovery tested
- DNS cutover plan documented
- Rollback procedure documented and tested
- Team trained on new provider
- Stakeholders notified of migration schedule
- Production cutover completed
- Post-migration monitoring (7 days)
- Old infrastructure decommissioned
Cost optimization during migration
Minimize costs during migration:- Parallel running period: Keep both environments for 7-14 days only
- Use smaller instances: Start with minimal resources, scale up as needed
- Reserved instances: Don’t buy reserved capacity until after successful migration
- Data transfer: Use cloud provider’s data transfer services (AWS Snowball, Azure Data Box) for large datasets
- Off-peak migration: Schedule data transfer during off-peak hours for lower network costs
Common migration scenarios
- AWS → OCI
- AWS → GCP
- AWS → Azure
Why migrate: Lower compute costs (20% savings), Oracle database compatibilityTimeline: 1-2 weeksKey considerations:
- OCI compartments vs AWS accounts
- OCI’s unique OCID system
- Different IAM model
Troubleshooting
Service implementation errors
Service implementation errors
Symptom: Application fails to start with “Provider ‘oci’ not implemented”Solution:
- Verify all 4 service files exist
- Check Factory uncommented the provider
- Verify
CLOUD_PROVIDERenvironment variable is set - Check SDK dependencies are installed
Authentication failures
Authentication failures
Symptom: “Access denied” or “Unauthorized” errorsSolution:
- Verify credentials in environment variables
- Check service account has necessary permissions
- For Kubernetes: verify workload identity/managed identity setup
- Review IAM policies in destination cloud
Database connection issues
Database connection issues
Symptom: “Connection refused” or timeout errorsSolution:
- Verify security group/firewall rules allow traffic
- Check database is in same VPC/VCN as application
- Verify database endpoint URL is correct
- Test connection from a debug pod:
kubectl run -it --rm debug --image=postgres -- psql -h $DB_HOST -U $DB_USER
Performance degradation
Performance degradation
Symptom: Slower response times after migrationSolution:
- Check instance sizes match or exceed original
- Verify database connection pooling configured
- Check for network latency between components
- Review storage IOPS limits
- Enable provider-specific caching (CloudFront → Cloud CDN)
Next steps
Provider Comparison
Compare cloud providers
AWS Implementation
AWS-specific details
Disaster Recovery
DR planning and procedures
Operations Guide
Monitor and operate