Vagrant + Puppet = load balancer in front of STAR Commerce and Magento 2 on development machine

Mladen LotarDevelopment, Magento 2, Open source, Star commerceLeave a Comment

star-commerce-open-source

What is done?

After we released initial plans for STAR Commerce it was time to start working on it.

Logical first step was to setup development environment that would mimic future production deployment. That being considered, together with code (work) re-usability later on, combination of Vagrant with Puppet was the logical choice for us at the moment.

Since holiday season kicked in, few weeks after project start, we have something to show for it – STAR Commerce Environments Github project is not empty anymore. Now it contains minimal setup for development to begin. Load balancer in front of frontend application box, followed by dedicated MySQL box and Magento 2 box with sample data installed.

What actually happens when you run vagrant up?

Puppet provisioning will point load balancer will route traffic from star.commerce.dev to frontend box that runs basic Laravel application for now.

Puppet will download and install Magento 2 with sample data on separate box. (small requirement here – for sample data is that you register for Magento Connect and generate private / public key, but more on that in setup instructions in project readme)

On top of that, right after LB is booted, single MySQL box is booted to be consumed by both Application boxes and Magento.

It looks something like this:

star-commerce-first-view

star-commerce-development-load-balancer-view

Installed Magento 2

Can you check it out?

Not only you can, but we encourage you to do it. You should note it requires some RAM and CPU power (after all, it is a 4 boxes setup, with Magento 2 which requires some decent resources).

Minimal recommended server to run this from our end is at least quad core CPU with 8 GB of RAM. This should give your main OS some space, as current setup is consuming ~2.25 GB of RAM, and each VM has access to one CPU core. This will most probably be tweaked over next few weeks.

What we actually suggest is 4-8 CPU cores with at least 16 GB of RAM. And in that setup, you should probably tweak VM resources (more on that in the repository itself).

All of the setup details are described in main project README.md file – don’t be afraid, it’s really simple – check it out here.

Further plans

Next area of focus is to actually setup architecture of Laravel based application for STAR Commerce frontend application. More on that as we do some work on it.

And in regards of this VM setup, we’re probably going to introduce second load balancer for Magento 2 and few other boxes along the way as the actually coding for the STAR Commerce begins.

You should note

Project is still in early phase and is probably still not bug free, so if you see any, please report them to our Github issue tracker – we’re gonna attend to it as soon as possible.

Leave a Reply

Your email address will not be published. Required fields are marked *