production-ready-prestashop
production-ready-prestashop copied to clipboard
Deploy a Scalable, highly available, and performant Prestashop solution on AWS using CloudFormation
production-ready-prestashop
This repository deploys a Scalable, highly available, and performant Prestashop solution in the AWS cloud using CloudFormation. Launch the entire stack in your AWS region of choice using one of the options below:
| Region | Launch |
|---|---|
| us-east-1 | ![]() |
| us-west-1 | ![]() |
| ap-south-1 | ![]() |
| ap-east-1 | ![]() |
| ca-central-1 | ![]() |
| eu-central-1 | ![]() |
| eu-west-1 | ![]() |
| eu-north-1 | ![]() |
Want to launch this stack in a region that's not listed? Navigate to https://console.aws.amazon.com/cloudformation/home?region=YOUR_REGION#/stacks/new?stackName=prestashop-stack&templateURL=https://production-ready-prestashop.s3.ca-central-1.amazonaws.com/versions/latest/production_ready_prestashop.yaml
Design
Read more about the high level design of the system here.

Getting Started
The entire solution is represented using multiple CloudFormation stacks:
production_ready_prestashop.yaml: The parent CloudFormation stack that deploys all the major infrastructure components below that comprise the entire solutions as nested CloudFormation stacks.private-vpc.yaml: Deploys containerized applications onto a cluster of EC2 hosts using Elastic Container Service. This stack runs containers on hosts that are in a private VPC subnet. Outbound network traffic from the hosts must go out through a NAT gateway.efs-service.yaml: Deploys an EFS file system with the appropriate folder mounts required for Prestashop ECS Containers.rds-service.yaml: Deploys an RDS MariaDB instance that Prestashop will use. Multi-AZ is disabled by default.ec2-service.yaml: Deploys an EC2 AutoScaling Groups, Public Load balancer, and Security Groups required for the entire deployment.ecs-service.yaml: Deploys an elastic container service that will run Prestashop containers on registered instances in our cluster.service-autoscaling.yaml: A stack for configuring autoscaling between the EC2 ASG and ECS Service using CloudWatch alarms.
Development Environment
- Setup an AWS account.
- Install taskcat
- Install the AWS cli tool
Local Testing
- Push your templates to an S3 bucket:
aws s3 sync --acl public-read templates/ s3://your-bucket - Update the
NestedStacksS3URLparam in taskcat's config file (.taskcat.yml) to point to the S3 URL containing your template files (example) - Run
taskcat -d test run
Contribute
Refer to .github/workflows/ci-cd.yml to get an idea of what the CI pipeline does to test pull requests. Fork this repository, open a pull request, ensure all checks pass, ensure taskcat is not throwing any lint warnings, and request a review.
Important Implementation Notes
- The ECS cloudformation template launches containers with an environment variable
PS_ERASE_DBset to1. This will erase the prestashop database every time a new container is started. This is required to setup the database the first time. Once this is done, runaws cloudformation update-stackwith a value of0. - The RDS cloudformation template does not enable multi-AZ by default. This can easily be modified by setting
Properties.MultiAZtotruefor theAWS::RDS::DBInstanceresource in this stack.
