How pratikmahajan/aws-to-azure-infrastructure-migration works
Project Type and Purpose
• The project is an Infrastructure as Code solution designed to provision and manage cloud resources on both AWS and Azure.
• The README emphasizes the ability to deploy infrastructure for a Webapp, implement CI/CD pipelines, and facilitate migration between AWS and Azure.
• The project follows best practices: environments (such as dev and prod) are segregated and modules are used to represent reusable pieces of cloud infrastructure.
File Structure
• Top-level files include standard version controls (e.g., .gitignore, CODEOWNERS, LICENSE) and the README.
• There are two main cloud directories: “aws” and “azure”. Each contains subdirectories for environments (mostly “prod” shown) and a modules folder.
• Under each modules folder, you see distinct Terraform modules representing different resources (e.g., AWS: ec2_instance, vpc, lambda, etc.; Azure: virtual_network, blob_storage, function, etc.).
• The “terraform_install” directory holds scripts and instructions to install Terraform, an essential part of the deployment pipeline.
Using the README for Additional Insights
• The README outlines the project’s structure, key Terraform commands, and even provides a table that maps AWS resources to Azure services.
• This mapping shows that the system is not just provisioning separate infrastructures; it’s enabling a migration or comparison between two major cloud providers.
• Additionally, the README emphasizes the CI/CD aspect hinting at integrations like Codedeploy on AWS (e.g., modules like codedeploy_application) and corresponding services on Azure.
a. Main Components:
• Terraform Installation: Represented by the terraform_install scripts.
• Environments: Highlight dev and prod environments (even if the file tree shows prod, note that best practices include both).
• AWS Infrastructure: A cluster of modules such as VPC, EC2 instance, Auto Scaling, Load Balancer, Lambda, RDS, SNS, CodeDeploy, etc.
• Azure Infrastructure: A corresponding cluster of modules such as Virtual Network, Storage Accounts, Blob Storage, Cosmos DB, Functions, Event Grid, Load Balancer, etc.
• CI/CD/CD Integration: A component for automation, e.g., the IAM module for CircleCI and possibly references to Codedeploy in AWS.
• Additional components: Migration mapping (table shown in README) that connects AWS components to Azure services.
b. Relationships and Interactions:
• For each environment, show how Terraform (deployment tool) initiates the provisioning of modules on either cloud provider.
• Within each cloud cluster, illustrate the dependencies e.g., VPC/Virtual Network is foundational to security groups, EC2 instances, load balancers, etc.
c. Architectural Patterns and Design Principles:
• Modularity: The use of separate Terraform modules demonstrates a modular design. Emphasize this by grouping modules logically per cloud provider.
• Abstraction and Mapping: Show the abstraction layer that maps AWS resources to their Azure service equivalents, as shown in the README’s table.
• CI/CD Integration: Clearly note the CI/CD mechanisms that trigger Terraform plans and applies.
d. Relevant Technologies, Frameworks, or Libraries:
• Terraform is the central technology used for managing infrastructure.
• AWS-specific modules (e.g., VPC, EC2, Lambda) and Azure-specific modules (e.g., Virtual Network, Functions) should be labeled.
• In the AWS section, add modules such as:
– VPC
– EC2 Instance and related autoscaling, ELB, Security Group modules
– Lambda functions, RDS, DynamoDB, SNS, and CodeDeploy related modules.
• In the Azure section, add modules such as:
– Virtual Network, Blob Storage, Cosmos DB, Functions, Load Balancer, DNS, etc.