Clients frequently ask what cloud services they should use for different applications. Lift and shift to IaaS, true modernization with containers and PaaS, or reach for the appealing benefits of FaaS or SaaS? Unfortunately the optimal path and destination is not always a simple answer. It depends on the application(s) we’re talking about and what’s most important to you regarding how it is used, managed, and valued.
In this blog, we describe an educational journey we took as we deployed and configured WordPress in four different fashions, using this as a real world example. This one focuses on WordPress, but the decision points here could apply to any application you are considering using in the cloud.
We outline four ways we have deployed WordPress and highlight the benefits and challenges for each. Don’t worry if you are unfamiliar with the acronyms or terms; we’ll try to explain a bit along the way.
Globally Dominant CMS with Great Deployment and Scaling Options
As of 2019, WordPress has a 60% market share for CMS. Global usage has skyrocketed for a reason!
Top Tier Full Services Cloud Platform
Google trails AWS and Azure with roughly 8% if the market share in early 2019. The market is growing very rapidly and the big three are battling it out to continue astronomical growth.
Dramatic Revenue Growth
Google Cloud Revenue grew by roughly 83% in Q1/2019. Continued growth at this rate will position Google to challenge the market dominance of AWS and Azure.
Given the focus of our company (Serverless Solutions), we decided to wade into the PaaS pool first. App Engine is Google’s Platform as a Service (PaaS) offering. It is appealing because this serverless model allows us to focus on the application and not the underlying infrastructure, operating system, database, scaling, or consumption of resources. This model is very appealing for custom applications and sometimes for portions of applications (e.g. data tier), but can be challenging for 3rd party applications that limit our control of the code or configuration.
Google’s tutorial outlines the process fairly well. We had to change a parameter a couple of times and install the newer version of php.
Setup the database
Setup the WordPress Project
Deploy the WordPress Project
Update WordPress, Plugins, and Themes
Installing Plugins or Themes requires you to download and redeploy your application
Google Kubernetes Engine has gained tremendous momentum among Google Cloud customers. GKE is Google’s focus for providing containerization in the cloud. Containerization is a form of virtualization that allows us to deploy applications or portions of applications in smaller containers without including the full virtual machine and operating system in each. This model allows for better horizontal scaling and simplified management than traditional Virtual Machines/Infrastructure as a Service (IaaS). In many ways it is an option between IaaS and PaaS, taking some benefits from each depending on our design decisions.
Google has a tutorial that outlines the process of defining persistent disks for WordPress and MySQL here. Steps outlined below generally map to the Google version, but we also tested this one that uses Helm/Tiller/Nginx. We had issues with downloading WordPress plugins and themes on the Google tutorial version and had namespace issues and load balancer configuration problems with the stcox one. After some tweaking we could get them to work, but it was a bit tedious.
Create a GKE cluster. This creates the compute instance to run the kubernetes instances.
Create a PersistentVolume and PersistentVolumeClaim. This is the persistent disk that WordPress will use for file and MySQL storage.
Set up MySQL
Set up WordPress
Install and Configure WordPress
Click to Run is the “Easy Button” for leveraging prebuilt solutions in GCP.
Google has a number of ‘click to run’ options to install WordPress on GCE. We’ve installed the Bitnami single instance version and had it up and running in minutes.
Log into the Cloud Console and find the best option in the marketplace. We used the Bitnami single instance version.
We expanded the disk size in the VM from 10GB to 20GB.
Setup a static IP via VPC Networks / External IP.
Install and Configure WordPress
This is closest aligned to SaaS option.
With out naming names we tried to deploy a website on one of the most popular managed wordpress sites. There really is no checklist of activities to go through in this scenario. You go the the SaaS provider, pick your options and they deploy the site for you. You simply login to a configured wordpress site and start setting up your content.
This exercise was very similar to what we see companies going through for sets of their applications. Fortunately for us there is an optimal cloud deployment path for any application.
SaaS – this option works great for WordPress if you don’t want to worry about touching anything outside of the actual WordPress configuration and content. You may have to pay a bit more and sacrifice some ability to customize things, but the tradeoff works for a lot of people.
Compute Engine – GCE makes the most sense for WordPress if you don’t need tremendous scaling or high availability, are looking for a cheap option, and don’t mind managing the VM.
Kubernetes Engine – GKE is a perfect solution for a more advanced deployment with HA and horizontal scaling capabilities. This comes at a bit more cost and effort, but this is likely the best option for a mature organization concerned about response times and high availability.
App Engine (or Functions) – WordPress works on App Engine but the challenges getting it to work and keeping it updated in that environment didn’t seem worth the effort.
Hopefully this all makes sense for WordPress, but what do we takeaway from this exercise to apply these lessons to other applications? First, there is at least one right answer for every application.
SaaS availability – is SaaS even an option? If so, that should be the default unless it doesn’t meet your needs.
3rd Party Applications – we don’t have control over some of the inner workings, so this often makes it difficult to fit into a PaaS model. And often the benefits of PaaS are muted because we have to work around the application to make it work.
How critical is the application to your organization? Containerized apps are generally easy to make redundant and scale horizontally when the architecture is designed correctly. Unfortunately, not all 3rd party apps are easy to containerize, but the landscape is improving rapidly.
Custom developed applications or components- this is a topic too wide to cover here, but the preference generally for custom is PaaS and functions. It really depends on what your starting point is. For example, legacy applications may be difficult to modernize for serverless, but there are a lot of options available to us. In short, the criticality and architectural characteristics of the application have to be taken into account to define the optimal modernization approach.
Hybrid on-premises benefits – GKE allows for an application to scale from on-premises to the cloud. This may be a very compelling option for many situations- performance or cost driven.
For www.serverless-solutions.com we chose to deploy in Google Compute Engine for the time being. The tradeoff of performance/scalability/HA of GKE wasn’t worth the cost at this point and the SaaS option was not appealing because we are more than capable of managing the environment. We plan to move to GKE in the near future though when our blogs start getting more hits!
Regardless of where you are in your decision process, we can help you map out a path and successfully leverage cloud computing. Contact us for a free session to help you understand your cloud deployment options.