Three Tier App for vRealize Automation
One question I’m asked quite a lot is what I use for a 3-tier application when I’m testing things like NSX micro-segmentation with vRealize Automation. The simple answer is that I used to make something up as I went along, deploying components by hand and generally repeating myself a lot. I had some cut/paste commands in my note application that sped things up a little, but nothing that developed. I’ve been meaning to rectify this for a while, and this is the result!
A lot of this is based on the excellent blog posts published on the VMware HOL blog by Doug Baer. Doug wrote five parts on creating his application on Photon OS and they’re well worth a read (start at part 1, here). I have changed a few things for my vRA Three Tier App, and some things are the same:
- I’m using CentOS7, as that’s what I see out in the wild with customers (RHEL7) and I am most familiar with
- The app itself is the PHP MySQL CRUD Application from Tutorial Republic
- The DB tier uses MariaDB (MySQL) not SQLite
- The App tier is an Apache/PHP server
- The Web tier is still NGINX as a reverse proxy
- I am including NSX on-demand load balancers in my blueprint, but you don’t actually need them for single-VM tiers
- Finally, I want to be able to deploy my 3-tier application using vRA Software Components (though you can also use startup scripts in the customisation spec)
Based on this, my final application will look something like the image below, with clients connecting to the NSX load balancer on HTTPS/443, multiple NGINX reverse proxy servers communicating with the NSX load balancer on HTTP/8080, which is in front of multiple Apache web servers running the PHP application which all talk to the MySQL databased back end over MySQL/3306.
When in use, the application looks like this: