Google Cloud and Myself – A love story

Google Cloud and Myself – A love story

April 26, 2018 By Jake

This is a lengthy blog entry, but I feel it contains a lot of good information on doing development today and how I found that Google Cloud can meet those needs for both development, testing, and production.

Back in October, I started a personal project. My goal was to create a WordPress site that would act as an informational portal. The purpose was to integrate destinations, events, coupons, and rideshare into an application.

The audience was defined as a tourist coming to that metro area that needed sufficient information about the must-see destinations, events happening in the next 72 hours, and tying it together with Rideshare so everything could be done from the progressive web application.

So I found myself a bootstrap starter theme and began laying out the plan of action. My plan told me an “off the shelf” VPS would suffice.

My plan of action also told me that using plugins already available to handle the components, although possible, would be too resource intensive. These plugins would force the final project’s look and feel to be restricted by their limitations.

So the plan was to use the event plugin just to interact with an events API and scrap the rest. In these cases, using that part of the plugin was a cost-effective decision. Why reinvent the wheel?

So, using Advanced Custom Fields, I integrated the event database with destinations, coupons, and Uber’s API to arrange the transportation.

I also wanted to get some more time with Timber/Twig. I have a separate blog entry Timber/Twig here. But I knew that just putting the needed components in the core would not be enough.

Timber/Twig template framework would relieve WordPress of resources that would allow the CMS to do what it does best — deliver content.

Now came the time to create my dev environment. I would usually do that on a localhost, but the problem was, this project required me to actually interact with the target audience to better understand and refine the final project.

So I needed a dev environment that was “mobile”. I could have used the server I already had, but I have a standard rule of NO WAY. I did not want to chance a problem installing NPM modules on a server utilizing and restricted by cPanel/WHM.

Also, since this was a personal project, I wanted to keep the expenses to a minimum. Then, I remembered an email from Google Cloud where they were offering a $300 credit. So I headed off to the cloud.

At first, I must admit it was a little intimidating. Over the years I had become too reliant on the cPanel GUI. But, then I noticed they had an area where I could choose and launch a preconfigured system.

So I launched a WordPress system. It was easy but too restrictive on adding the necessary modules for development such as npm, compiler, sass, and twBootstrap.

In fact, while installing a required mod, the dependencies broke the server. The problem here was that the system that was already configured for WordPress was very secure. In layman’s terms. it basically did not like what I was doing.

So I then decided to just create a LAMP stack, then add WordPress, and finally my dev tools. That is when I noticed a configuration available from Bitnami for a LAMP stack.

So I deleted the VM that I broke and clicked to install. This is normally when doing this on my local machine, I would go make some coffee and grab a sugary snack as my install script did its job.

I noticed that when I just started pouring water into the coffee maker, the install was done an awaiting me. I thought well that was fast.

I noticed a link on the welcome to Apache page of what to do next from Bitnami. So I decided since they configured it, I had better read it.

The documentation was excellent and centered on their configuration running on Google Cloud. They explained how everything was, for security reasons, based upon ownership by a Bitnami user.

It brought me back to my Joomla 1.0 days. I use to have a joomusr owning each Joomla install. It was the only user that could modify any file or directory, except for the cache directory. The cache directory was purged every 15 minutes.

This made my sites like Fort Knox, a pain to update or install new components on, but kept it safe and secure from a majority of hacking attempts. And if you worked with Joomla 1.0 back then, you knew that you usually got hacked.

The major difference here was that Bitnami offered modules that could be installed. These were configured to keep the tight security but allowed for updates and upgrades without having to change ownership before and then after updating.

I noticed that there was a WordPress module. So I installed that also, took less than 2 minutes. So for good measure, I installed a second WordPress module just in case.

After that, the documentation talked about adding a dedicated IP and a domain. Knowing this was going to be a mobile dev environment, I wanted this to make it easy to attach.

Following the documents, I had a dedicated IP and the subdomains of dev. and test. pointing to the WordPress instances all within 5 minutes. Once again I thought, this is fast. It was also fairly easy to do without having cPanel, following the instructions given.

I saw instructions for setting up http/2, installing an SSL, and enabling mod_pagespeed. I said why not, they are on the production server. Another 10 minutes to do that.

Then, I installed npm, composer, gulp, sass, twbBootstrap, and all the dev dependencies required. Done.

So basically I had built a LAMP stack, with 2 WordPress instances, my dev environment that pushed to the testing environment all in the cloud. The production site was on another server.

With the dev environment set up, 2 SSLs, enabled HTTP/2, and turned on mod_pagespeed, time spent: less than 30 minutes.

I let that sink in while finally getting a chance to brew that cup of coffee I was taken away from doing. I do have pre-built scripts to build my dev environment, that does the work, but I always watch the build for warnings about depreciated dependencies. But to also build the server and configure it as if it was a production environment in less than 30 minutes is fast. I really did not think about it much more.

So I set off on doing my driving for Uber and Lyft, so I could talk to my target audience. I would gather invaluable information. During my times at the airport waiting for my next passenger, I would bring out my laptop and start working.

The speed working remotely on the dev and then pushing to the test server was amazingly fast. The test server was rendering pages with amazing speed. This with no cache being used.

Then when I got home, I would push from the test site to the production site, on a server which was configured the same as the LAMP stack on Google Cloud except for cPanel. The production site was taking twice the time to render the home page fully, 2.1 seconds compared to 0.9 seconds on the test server.

So either it was cPanel at fault or the server. I concluded it was not cPanel by running tests on a Google cloud VM configured with cPanel.

My hosting company could not replicate the infrastructure that Google provided. I decided then and there to move my production sites to Google Cloud.

My hosting bill at Google has been averaging $24 a month. I still have not used up all of my $300 credit. My sites run faster and my target audience is happier.

The only thing lacking is the free 24/7 support with my old host and the easy to use cPanel GUI. I do not miss the bill for the old server of $109/month.

I have decided not to install cPanel on my server. Command line meets my needs. As for the 24/7 support, I always did my own support. But for the average customer, that could be a concern.

Another disadvantage is no mail server. Google wants to keep the IPs reputation excellent. They do integrate with several providers including themselves. Most of the providers offer a discounted package to cloud users.

I opted for Gmail integration. I pay $5 a month per site for 1 account, my personal one. The sales, support, and team email addresses are free with Gmail. I love the spam filters in Gmail and adore the fact my IPs reputation is not at risk.

As for clients, they should love that too and the cost. Add that to the fact that everyone knows how to use Gmail.

Let’s go back to the support issue. There are several resellers of Google Cloud that do offer the support and their prices are very competitive. So for those of you who want that fuzzy warm feeling from having 24/7 support at no additional charge, you can get it.

In fact, there are a few hosting companies that have moved their complete infrastructure to the cloud, eliminating the need and cost of maintains servers in a corporate data center. Is this a sign of things to come?

As a developer, I notice that the majority of my clients never enter cPanel except to add an email address. Any support issues usually have to do with WordPress, in which case they call me.

Here is my challenge to you. Open a Google Compute account. Set up your eligibility for the $300 credit. If you are comfortable with the tech and command line set up the rest yourself.

If not, get a hold of us. We can set up a LAMP or LEMP stack then install WordPress. You can also choose to go with a fully configured install of WordPress already in the stack, but personally, I prefer to separate the 2.

We will install and configure the server, install the WordPress module. Then you can do a backup of the current WP production site using the “All-in-One WP Migration” plugin.

Then migrate the data. Set up a static IP and create a subdomain to point to the VM in the cloud. Then take it for a spin yourself. See, feel, and experience the difference.

Remember there are no charges for the first $300 from Google. With the configuration I use, that is a full year free. If you want to use our services, use the “Contact Us” button in the footer of this page.

Create your own love affair with Google Cloud and save $300.