All Projects → magenx → Magento-2-aws-cluster-terraform

magenx / Magento-2-aws-cluster-terraform

Licence: other
Magento 2 AWS autoscaling cluster with Terraform and Packer or ImageBuilder. Adobe Commerce Cloud alternative. The best ecommerce infrastructure. Drive more sales online. Transparent billing. Developer-friendly. No hidden bottlenecks.

Programming Languages

HCL
1544 projects
shell
77523 projects
VCL
57 projects

Projects that are alternatives of or similar to Magento-2-aws-cluster-terraform

magento2-guest-to-customer
Guest to Customer for Magento2 - Quickly and easily convert existing guest checkout customers to registered customers.
Stars: ✭ 66 (-38.32%)
Mutual labels:  magento, magento2, adobe-commerce, adobe-commerce-cloud
magento2-checkout-success-misc-script
Add Miscellaneous HTML and JavaScript codes to Magento2 checkout conformation page
Stars: ✭ 26 (-75.7%)
Mutual labels:  magento, magento2, adobe-commerce, adobe-commerce-cloud
magento-cluster
Highly Available and Auto-scalable Magento Cluster
Stars: ✭ 21 (-80.37%)
Mutual labels:  cluster, magento, autoscaling
magento2-edit-order-email
Magento2 - Edit Order Email from Admin
Stars: ✭ 30 (-71.96%)
Mutual labels:  magento, magento2, adobe-commerce
headless-wordpress
Headless Wordpress - AWS - Easy Setup
Stars: ✭ 42 (-60.75%)
Mutual labels:  infrastructure, iac
ansible-aws-infra-services
Manage your AWS infrastructure and ECS tasks with two separate ansible playbooks
Stars: ✭ 23 (-78.5%)
Mutual labels:  infrastructure, cluster
AutoSpotting
Saves up to 90% of AWS EC2 costs by automating the use of spot instances on existing AutoScaling groups. Installs in minutes using CloudFormation or Terraform. Convenient to deploy at scale using StackSets. Uses tagging to avoid launch configuration changes. Automated spot termination handling. Reliable fallback to on-demand instances.
Stars: ✭ 2,058 (+1823.36%)
Mutual labels:  infrastructure, autoscaling
devops-infra-demo
Growing repository of Infrastructure as Code demos (initially created for DevOps Wall Street)
Stars: ✭ 31 (-71.03%)
Mutual labels:  infrastructure, iac
WAZUH-OSSEC
WAZUH - The Open Source Security Platform Installation
Stars: ✭ 79 (-26.17%)
Mutual labels:  cluster, magento
terraform-vsphere-single-vm
Deploy single vSphere VM with Terraform - template.
Stars: ✭ 21 (-80.37%)
Mutual labels:  infrastructure, iac
Xcat Core
Code repo for xCAT core packages
Stars: ✭ 273 (+155.14%)
Mutual labels:  infrastructure, cluster
terraform-provider-cisco-aci
Terraform provider for automating Cisco ACI enabled networks
Stars: ✭ 14 (-86.92%)
Mutual labels:  infrastructure, iac
Escalator
Escalator is a batch or job optimized horizontal autoscaler for Kubernetes
Stars: ✭ 539 (+403.74%)
Mutual labels:  cluster, autoscaling
provisionr
📦📦➡️🏛️ Provision a library of R packages
Stars: ✭ 26 (-75.7%)
Mutual labels:  infrastructure, cluster
Terrascan
Detect compliance and security violations across Infrastructure as Code to mitigate risk before provisioning cloud native infrastructure.
Stars: ✭ 2,687 (+2411.21%)
Mutual labels:  infrastructure, iac
deploykit
A toolkit for creating and managing declarative, self-healing infrastructure.
Stars: ✭ 2,246 (+1999.07%)
Mutual labels:  infrastructure, cluster
Amp
** THIS PROJECT IS STOPPED ** An open source CaaS for Docker, batteries included.
Stars: ✭ 74 (-30.84%)
Mutual labels:  infrastructure, cluster
Kubicorn
kubicorn is a free and open source project that solves the Kubernetes infrastructure problem and gives users a rich golang library to work with infrastructure.
Stars: ✭ 1,671 (+1461.68%)
Mutual labels:  infrastructure, cluster
kubernetes-vmware-autoscaler
Kubernetes autoscaler for vsphere
Stars: ✭ 33 (-69.16%)
Mutual labels:  cluster, autoscaling
gce-cache-cluster
Easy groupcache clustering on GCE
Stars: ✭ 32 (-70.09%)
Mutual labels:  cluster, autoscaling

Magento 2 auto scaling cluster with Terraform on AWS cloud only

Deploy a full-scale secure and flexible e-commerce infrastructure based on Magento 2 in a matter of seconds.
Enterprise-grade solution for companies of all sizes, B2B B2C, providing the best customer experience.
use Fastly, Cloudflare, Section in front


AWS Graviton2 Processor - Enabling the best performance in EC2:

aws-graviton2

Amazon EC2 C7g instances upgrade
Best price performance for compute-intensive workloads in Amazon EC2


[?] Why we need Adobe Commerce Cloud alternative:

The biggest issue is that ACC pricing based on GMV % and AOV %, you overpay up to 80%, while the bill between Adobe and AWS remains at a minimum. With this approach, you invest money in the development of a third-party business, but not your own. Why spend so much money without having control over your business in the cloud? Configuring your own infrastructure these days is the most profitable way. You manage the resources, you have a complete overview how it works and you have full control over the money invested in your own infrastructure. At any time you can make changes to both infrastructure and application design without thinking about restrictions, 3rd party platform limitations and unforeseen costs. There are no hidden bills and payments for excess resources, which, as a result, you will not need.

Adobe Commerce Cloud has lots of technical problems due to the fact that many services compete on the same server and share the processor time, memory, network and I/O. Bad architectural solution using monolitic servers, not cloud native solution, that was not made specifically for Magento, but adapted in rush using many wrappers, with manual pseudo scaling and 48 hours to 5 days to accept and deploy new settings.

Obviously, PaaS intermediaries also use AWS Cloud. But concealing its cheap solutions with a marketing, 
trying to hook you up on a dodgy contract and making you pay 10 times more.

AWS cloud account pros:

  • Open source Magento
  • Pay as You Go
  • Transparent billing
  • No draconian contracts
  • No sudden overage charges
  • No hardware restrictions
  • No services limitations
  • No hidden bottlenecks
  • No time waste for support tickets

 

Amazon Web Services offers an ecommerce cloud computing solutions to small and large businesses that want a flexible, secured, highly scalable infrastructure. All the technologies online retailers need to manage growth—instantly. With technologies like automatic scaling compute resources, networking, storage, content distribution, and a PCI-compliant environment, retailers can always provide great customer experiences and capitalize on growth opportunities.

The biggest benefits of using your own AWS Cloud account: Reserved Instances
Reserved Instances provide you with significant savings on your Amazon EC2 costs compared to On-Demand Instance pricing. With Savings Plans, you make a commitment to a consistent usage amount, measured in USD per hour. This provides you with the flexibility to use the instance configurations that best meet your needs and continue to save money.


[+] EC2 webstack custom configuration and Auto Scaling management

User data templates with shell scripts. If you are familiar with shell scripting, this is the easiest and most complete way to send instructions to an instance to perform common automated configuration tasks and even run scripts after the instance starts. From default stack optimization to changing any application and service settings.

Warm pools for Amazon EC2 Auto Scaling - A warm pool gives you the ability to decrease latency for your applications. With warm pools, you no longer have to over-provision your Auto Scaling groups to manage latency in order to improve application performance. You have the option of keeping instances in the warm pool in one of two states: Stopped or Running. Keeping instances in a Stopped state is an effective way to minimize costs.

NGINX is optimized and fully supported on the latest generation of 64-bit ARM Servers utilizing the architecture. PHP using socket connection.

Debian 11 ARM 'bullseye', which will be supported for the next 5 years. Includes support for the very latest ARM-based server systems powered by certified 64-bit processors. Develop and deploy at scale. Webstack delivers top performance on ARM.

AWS Systems Manager is an AWS service that you can use to view and control your infrastructure on AWS. Using the Systems Manager console, you can view operational data from multiple AWS EC2 instances and automate operational tasks across your AWS resources. Systems Manager helps you maintain security and compliance. No SSH connections from outside, no need to track passwords and private keys.


Developer documentation to read:

https://devdocs.magento.com/
https://docs.aws.amazon.com/index.html
https://www.terraform.io/docs/
https://aws.amazon.com/cloudshell/

The terraform configuration language and all the files in this repository are intuitively simple and straightforward. They are written in simple text and functions that any beginner can understand. Terraform deployment with zero dependency, no prerequisites, no need to install additional software, no programming required.

The idea was to create a full-fledged turnkey infrastructure, with deeper settings, so that any ecommerce manager could deploy it and immediately use it for his brand.


🚀 Deployment into isolated VPC:

   sudo yum install -y yum-utils
   sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo
   sudo yum -y install packer terraform
  • Create deployment directory:
  mkdir magento && cd magento
  • Clone repo:
  git clone https://github.com/magenx/Magento-2-aws-cluster-terraform.git .

[ ! ] Right after terraform apply you will receive email from amazon to approve resources

  • Adjust your settings, edit your [cidr], [brand], [domain], [email] and other vars in variables.tf
  • Define your source repository or use default and enable minimal Magento 2 package to install.
  • Define either [production] or [development] environment variable in variables.tf

[ ! ] For production deployment make sure to enable deletion protection and backup retention

  • Run:
   terraform init
   terraform apply

to destroy infrastructure: terraform destroy
resources created outside of terraform must be deleted manually, for example CloudWatch logs


Complete setup:

3 autoscaling groups with launch templates converted from user_data
3 target groups for load balancer (varnish frontend admin)
2 load balancers (external/internal) with listeners / rules
1 rds mariadb databases multi AZ
1 elasticsearch domain for Magento catalog search
2 redis elasticache cluster for sessions and cache
1 rabbitmq broker to manage queue messages
2 s3 buckets for [media] images and [system] files and logs (with access policy)
2 codecommit app files repository and services config files repository
1 cloudfront s3 origin distribution
1 efs file system for shared folders, with mount target per AZ
1 sns topic default subscription to receive email alerts
1 ses user access details for smtp module

resources are grouped into a virtual network, VPC dedicated to your brand
the settings initially imply a large store, and are designed for huge traffic.
services are clustered and replicated thus ready for failover.

  • Deployment into isolated Virtual Private Cloud
  • Autoscaling policy per each group
  • Managed with Systems Manager agent
  • Instance Profile assigned to simplify EC2 management
  • Create and use ssm documents and EventBridge rules to automate tasks
  • Simple Email Service authentication + SMTP Magento module
  • CloudWatch agent configured to stream logs
  • All Magento files managed with git only
  • Configuration settings saved in Parameter Store
  • Live shop in production mode / read-only
  • Security groups configured for every service and instances
  • phpMyAdmin for easy database editing
  • MariaDB database dump for data analysis
  • Enhanced security in AWS and LEMP
  • AWS Inspector Assessment templates
  • AWS Config resource configuraton rules
  • AWS WAF Protection rules

Magento_2_AWS_cloud_auto_scaling_terraform-map

🛠️ Magento 2 development | source code:

  • Define your source repository or use default and enable minimal Magento 2 package to install.
  • Check CodePipeline to install Magento 2 and pre-configure modules.
  • EC2 instance user_data configured on boot to clone files from CodeCommit branch.

Replaced over 200+ useless modules. Minimal Magento 2 package can be extended anytime. Remove replaced components from composer.json in "replace": {} and run composer update
modules configuration here: https://github.com/magenx/Magento-2/blob/main/composer.json

Performance and security enhancements Enabled modules for test requirements
Faster backend and frontend from 14% upto 50% Mageplaza SMTP
Better memory management upto 15%
Easy deployments
Less dependencies
Zero maintenance
Low security risks

CI/CD scenario:

  • Event driven
  • Services configuration files tracked in CodeCommit repository
  • Changes in CodeCommit repository triggers EventBridge rule.
  • SSM Document pull from CodeCommit repository and cleanup.
  • Change deployment logic to your needs.

AMI configuration and build using Packer:

  • Build custom AMI with Packer configuration
  • Reuse AMI in Terraform to create launch_template

[📧] Contact us for installation and support:

We can launch this project for your store in a short time. Many big retailers have already migrated to this architecture.

  • Write us an email to discuss the project.
  • Send a private message on Linkedin

😻 Support the project

This takes time and research. You can use this for free. But its not free to create it. If you are using this project, there are few ways you can support it:

  • Star and sharing the project
  • Open an issue to help make it better

❤️ Opensource

Magento 2 on the AWS Cloud: Quick Start Deployment

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].