Strategic Migration of Corporate Data Center Workloads to AWS Utilizing Amazon EC2 and RDS Services
Here is another exciting project based on a real-world scenario.
In this lead role as the Cloud Specialist, I was responsible for migrating the application and data workloads from the Corporate Data Center to the Amazon Web Services (AWS) Cloud.
During the migration, I utilized the Lift & Shift (rehost) model, which avoids any modifications to the application source.
To commence the project, it was vital first to identify and understand the details and collect data resource requirements. This was a four-phase approach.
Phase 1: Gathered the Requirements / Prerequisites
- Sizing: EC2 Intance (RAM, vCPU, Storage) / RDS MySQL Database Type
- Assessed and documented current on-premises resources.
- Mapped on-premises resources to AWS instances in tracking spreadsheet.
2. Prerequisites:
- Configured VPC and subnets.
- Defined IAM roles and policies.
- Set up security groups and firewall rules.
- Established a backup and recovery plan.
- Software Prerequisites: Ubuntu 22.04 LTS, Engine: MySQL 5.7, Python
- Configured MySQL 5.7 on Amazon RDS MySQL
- Installed and configured Ubuntu on EC2 software requirements
- Install necessary software packages on the application server.
3. Resource Naming: On-Premise Data Center to Amazon (AWS) Cloud
- Implemented naming conventions for AWS resources that represented the migrated on-premise application and database servers.
3a. Application Server: On-Premise Data Center
- Before Migration:
DC-AppServer1
- After Migration:
EC2-AppServer1
in AWS Cloud - Instance Type: t2.micro
- Specifications: 1 vCPU, 1 GB RAM
3b. SQL Database: On-Premise Data Center
- Before Migration:
DC-SQL-Database
- After Migration:
RDSMySql-DB1
in AWS Cloud
Phase 2: Completed Provisioning
- Provisioned EC2 Instance:
- Staged and deployed an EC2 instance with the necessary operating system.
- Configured the network settings to ensure it is part of the designated VPC and subnet.
- Enabled auto-assignment of a public IP and applied the appropriate security group for required access.
2. Provisioned RDS Instance:
- Staged and deployed an RDS instance for database management.
- Configured the AWS Virtual Private Connection (VPC) network settings to accommodate migration and deployment.
- Applied the default security group initially, with plans to update for enhanced security.
3. Configured Security Groups:
- Set up and associated security groups to manage traffic between the EC2 and RDS instances and to ensure isolation for best practices.
- Ensured secure communication by modifying the RDS instance to use a specific security group designed for EC2 to RDS access.
Phase 3: Performed the Go-live
- Completed the Setup Application:
- Connected to EC2: ssh to ubuntu <public-ip>
- Installed application dependencies:
- Install required packages:
- Installed Python libraries:
- Installed MySQL Client:
2. Completed the Database Setup: Connect to MySQL server (RDS):
- Created Wiki database
- Imported on-premise source dump SQL to the AWS RDS MySQL
- Created user and granted privileges:
3. Configured Application:
- Edited the application configuration file (wiki.py):
- Updated MySQL connection settings.
4. Launched Application:
- python3 wiki.py
- Validated the migration via http://<public-ip>:8080
Phase 4: Post Go-live
- Validation:
- Validated application functionality by testing key features.
- Example: Added a new wiki DB article to confirm database connectivity (see Additional Logs)
2. Monitored Post Migration Deployment to AWS Cloud
- Monitor resource usage and performance.
- Optimize configurations if necessary.
3. Clean Up:
- Removed resources that were no longer needed:
Additional Logs
AWS EC2 & MySQL Functional Validation: Wiki Article Creation