Hosting WordPress on Google Cloud

In this video I’m going to show you a WordPress Site being deployed to Google GKE in Google Cloud. We decided to upgrade our website — both in terms of content and in terms of WordPress version, so we created a test site with WordPress 5.4 and we made all the changes and are now satisfied with the new content. Using our AppZ platform, which is our Gitops platform, we are going to deploy the site again and go live. This means that our current URL, our live site URL, can be pointed to the new container that we are going to deploy today in the Kubernetes cluster.

The way we are going about doing that: by going into our Git report that controls our deployment, open our platforms AppZ.yaml, which lives within that report, and I’m going to open the AppZ.yaml and update the site URL, which is a parameter within AppZ.yaml, and trigger the deployment, simply by committing the change to the Git report. What happens when I do that is, our GitOps engine will pickup change, read the AppZ.yaml and understand that or realize that a new image will need to be built with 5.4 – and it will do that.

It will do that by pulling the latest WordPress 5.4 image from docker.io and then install, as per the docker file, it will install all the additional components that we need in terms of law collectives, performance data collectives, and agents like Fluentd – it will install all that to the image. Then it will pull all the plug-ins, the theme, and all the other components necessary for WordPress to work, and it will create a final container image. It will scan for any number of days, and then if everything looks good, it will push the image into our private repository, and then it will trigger deployment using our AppZ platform, and it will get deployed into the Kubernetes cluster. Once the pod comes up, it will automatically make a change in the load balancer, to route the traffic from the current site or URL into the new pod. 

About The Author

Rejith Krishnan

Co-Founder and CTO

ONECLICK