Deploying a Prestashop ecommerce: the cloud friendly way — Part 1 — Get ready 💻

Pol Guixé
Origen Studio
Published in
4 min readApr 3, 2017

First a bit of introduction. Recently I had to deploy a Prestashop ecommerce, for a friend. When I first get my hands on it… well… ehmm… let’s say it is not the way I am used to work or deploy apps. I am mainly developing apps using Node frameworks, where the computing and data — database and file system — are separated. Meaning you can scale them independently, either vertically or horitzontally.

Well in Prestashop — I guess that it is for easy of use — , the default configuration and the most typical one is to have both the computing part and the data in the same server. This is not very cloud friendly. It forces to scale everything vertically, which is far from ideal in modern terms. So I decided to investigate how to make deploy a Prestashop in a cloud friendly way.

In the process I learned few things that I would like to share, hence I am writing this step-by-step guide.

In this guide I’ll be deploying a test Prestashop app using AWS.

At first I wanted to write a single article. At the end I decided to split it as it was becoming a bit too long and cumbersome. Here are the parts we are covering:

  1. Launch a new AWS EC2 instance for Prestashop — Part 1 → This article. :)
  2. Configure the server for Prestashop — Part 2
  3. Set-up the DB — Part 3
  4. Set-up the external File System — Part 4 — Coming soon.
  5. Install Prestashop — Part 5 — Coming soon.
  6. Using Git with Prestashop — Part 6 — Coming soon.
  7. Enable SSL for your Prestashop — Part 7 — Coming soon.

Cool! Let’s start with the first step.

Launch a new AWS EC2 instance for Prestashop

Go to your AWS console and launch a new EC2 instance. I’ve selected Ubuntu 14.04 64bit as the OS.

Select the EC2 flavour of your choice.

If you want some good performance, I’ll recommend at least 4 GiB of RAM. If it is just for testing 1 GiB should be enough.

Select the Network, the Subnet and the IAM Role, this is important for latter linking the DB and S3 File system latter.

If you don’t know what the above means, you can just leave the deafaults.

Optional: If you like to keep things tidy you can create a VPC — or Virtual Private Cloud — to isolate it from the rest of your AWS.

I don’t know if this screen shot is useful :)

Optional: If you created a VPC you also need to create a subnet for it.

Attach your previously created VPC to your new subnet.

The next step is to define the size of your server. The idea here is to set up an S3 bucket as a File System, so we shouldn’t need much disk space in the EC2 server, about 10 GiB should be more than enough.

If you want to avoid configuring S3 and keep all your files — pictures, media,etc.- in the the EC2 disk, you can add the spacing you think you’ll need. Most of your disk space will be consumed by the pictures and media from your site.

Add as much space as you think you’ll need. The goal is to set-up S3 as a file system to store most of the media, like pictures of your products. Hence the disk size shouldn’t be big, unless you are planning on not doing the S3 configuration.

The next step we can assign security groups to this EC2. This will allow this new node to be connected to the internet and to other nodes within its VPC. The security groups I normally create are:

  • Web Basic: gives access from the internet. HTTP, HTTPS, SSH.
  • VPC-XXX-XXX: gives access to the nodes — databases, S3 buckets, etc. — within the same VPC. Make sure that the source and the security group ids are the same. This is important.
Basic Security Group
Make sure that the source and the security group ids are the same.

Last but not least we need assign a SSH key to the server or create a new one. This will allow us to connect to the server through SSH.

After these steps your new EC2 server should be up and running.

The next step is to configure this server for Prestashop

See Deploying a Prestashop ecommerce: the cloud friendly way — Part 2

--

--

Pol Guixé
Origen Studio

Aerospace engineer working on software development.☺️ Building great products at @theorigenstudio. 🍕and 🚵‍♂️⛷ passionate