The aim of this project is to build a highly available multi-tier e-commerce platform, with the sophistication of AWS.  

E commerce Platform

highly available e-commerce platform

multitier arc design

The aim of this project is to build a highly available multi-tier e-commerce platform, with the sophistication of AWS.  

Here I shall build the minimum viable product, test its functionality and then evolve with more stances and re-replicas etc.  

The application is accessed via a hosted zone. The Load Balancer distribtes the traffic between the 2 servers. Each server can query the master DB who reiterates a replication to its slave.

rds

Firstly I created a security group to allow each layer to talk to eachother. I open up ports  3306, 22, 80 and 443. That’s for database contact, instance connection and contact with without world via both unsercure and secure.  

I am built a mySql RDS master and a slave in multi regions.

install open cart

Secondly I Built Lampstack,  removed the default contents in the htdocs directory and installed an open open source shopping cart. This is how the home page of the index.php file now looks like. 

Firm Partners

error warning

While configuring Opencart a error warning appeared. It required me to change all files called ‘config-dists.php’ to read as ‘config.php’ in order for the configuration to work.

config-dist.php

As you can see in the uploads directory there is a file called config-dist.php. As there is no changename command I used the mv to change it to config.php.

Firm Partners

config.php

The file was changed to config.php. There were 2 of them. One in the upload directory and one is the admin directory. Changes were applied to all. 

admin details

Continuing configuring Open cart. I had to enter the database base information making sure the DNS hostname user names and passwords were entered.

cart is up

The cart is now up and running. One thing you can see I had to sort out is the url. It is not secure and has an ip address. A domain name will be preferred for users. First I applied my hosted zone though rout 53.

route53

I used my Godaddy Domain as the e-commerce address. I did this by replacing the GoDaddy nameservers with the AWS Hosted Zone servers and waiting for that to populate within 24hours.  

ca certificate

Because I wanted the site secure, I requested a public SSL certificate from AWS, which was granted in 30 mins. This was free as it was done through AWS. 

http://35.178.174.67

Now everything was up and running, I could access the page with my domain. But the secure connection could not apply. This led for me to change some configurations in the config files. As you can see, the url address is defined as an IP address. So I changed it to my domain. Also I had to changed http to https were applicable. 

http://wayengela.com

Looking at the 2 first red lines of code. This is how it was supposed to look like.

 

HTTP://35.178.174.67​

The same had to be applied in the config file located in the admin directory. 

Firm Partners

HTTP://WAYENGELA.COM​

How it should look after change. 

certificate varified

Now when you check the url, You can see I accessed the site using my domain name and check the CA is legit. 

 

Elastic load balancer

I created an Application load Balancer for a flexible feature set for your web applications with HTTP and HTTPS traffic. As soon as the SSL certificated was issued I was able to attached it to my load balancer.  Do note that I had already created a second instance by creating a duplicate image of this machine and change the availabilty zone. 

Close Menu