Automating WordPress Operations with Kubernetes
Our co-founder & CTO Calin Don has been a guest speaker at WordCamp Bucharest 2018. The current article is an adaptation of Calin’s presentation and observations during the event.
The main topic of Calin’s presentation was the Stack, our most complex and ambitious projects in the 8 year history of Presslabs, which aims to define and implement an open standard for WordPress hosting. This idea was first presented at WordCamp Vienna 2018.
We decided to present our idea of Automating WordPress Operations with Kubernetes mainly because we’ve invested a lot of time and effort into studying and implementing various integrations between the two technologies. We believe that Kubernetes is a technology that can help WordPress renew itself in ways that ultimately depend on those who use it. We’re going to explain in the following paragraphs why.
Presslabs Platform Specifications
Curious to know more about how a high performance WordPress infrastructure looks like? Get a birdseye view on how Presslabs is built.
“We need metrics in order to scale, to be able to take in new traffic, scale up and down, reduce costs and resource consumption”, says Mile Rosu, our co-founder & CEO. And we couldn’t agree more.
We’ve identified two major challenges in the field of web hosting infrastructure:
#1. Data property and transparency
- Implementing rules and regulations, e.g. GDPR, HIPAA—if we want to align with certain standards, we must have unrestricted access to the data we own.
- Choosing a location that fits your customer’s needs. If we own the data and the stack, we can move it to a location closer to our customers.
- Moving freely between providers without risking data integrity. As a hosting company, we’ve encountered a lot of delicate situations, for example, when customers couldn’t move or access their site’s data, which raises a question mark regarding the ethics of a service provider.
- Reducing the layers between you and your visitors. When you own a site, you would wish to have as little intermediaries as possible between the information you provide and the final users; this way, the number of errors can be significantly reduced.
#2. Standardizing and automating operations
Our current version of the Stack automates 5 processes:
- Deploying and upgrading
- Monitoring and alerting
#1. Deployment and upgrading
WordPress is world famous for its 5-minute install. But how do you handle tens, or thousands of installs? How can you keep track of what is done and how it’s done? How do you upgrade everything? What do you do in case of an error?
Our Stack takes care of all these questions and more, no more manual interventions, as we rely on Kubernetes, an open-source for automatic deployments and container management.
How do you meet and greet a lot more traffic than you can? Let’s say that Moise Guran mentions you on his app (Biziday is a mobile news alert app with hundreds of thousands of subscribers in Romania), and you suddenly get a lot of traffic. Can your site handle it?
In the WordPress world everyone knows how to scale a single site. There are a lot of NGINX tutorials for this, for example. So, the puzzle is solved for WordPress. But how do you automate this process?
Kubernetes is built with scaling in mind, so our Stack benefits of this feature too, allowing you to dynamically scale your site based on collected metrics like current traffic and server load, and performs all of these actions without requiring any user intervention. We want to automate this process so that you, as a site owner, don’t have anything to worry about.
Everyone worries about their site’s data, because it represents years and years of hard work. So backing up your work should be a high priority for each site owner.
From our point of view, backups exist only if they can be restored. It makes no sense to have backups if you have no way to get back to a previous version in case something goes wrong.
The Stack comes with an out of the shelf backup solution that is available for everyone by default. Also, backup restoration will be a piece of cake for the Stack, as it will guarantee data safety and fast recovery in case of disasters (hacks, data loss etc).
#4. Monitoring and alerting
Are you aware of your website performance at all times? To be operational, any platform or business needs data, and it is highly important to collect data about our site: the speed, the performance, as well as errors.
Our Stack comes with a solution of monitoring and alerting so that you be immediately alerted when something goes wrong, instead of continuously watching tons of graphs.
Nowadays, security is something everyone strives for; you can’t plan a system without security in mind. For this reason, site owners need to rise up to their clients’ expectations, to offer them a secure environment for the site they are accessing.
We designed our Stack with security in mind: it automatically offers HTTPS security certificates. Moreover, it automatically updates them when they expire. Being an open-source project, the security part is in the open and can be checkout out by everyone that’s interested.
Our solution for all these problems is an open-source platform based on a ubiquitous technology: Kubernetes.
The platform is a stack comprised of multiple technologies based on Kubernetes, which is the brain behind all the infrastructure—hence the name we chose for our project. The Stack is open-source and relatively easy to install for every person, independent of their technical knowledge. This Stack is an integration of operators, some of which existed already and other ones that we had to develop and implement ourselves.
Our solution for all these problems is an open-source platform based on an ubiquitous technology, based on Kubernetes.
The Stack consists of 5 components centred around the following Kubernetes Operators:
Now, those famous 5-minute WordPress installs turn into 3 lines of code to create a website:
# install the Presslabs stack $ helm repo add presslabs https://presslabs.github.io/charts $ helm install --namespace presslabs-sys presslabs presslabs/stack
# deploy a site
$ helm install mysite presslabs/site
Our enthusiasm is a powerful fuel, strong enough to keep us working on developing the Stack, but it’s not ready for extensive use, yet. This means that we have some pretty solid future initiatives to pursue to finish and deliver the Stack.
However, before jumping to promises, we leave you with some key insights to bear in mind after reading this article:
- Scaling means efficiency in resource using.
- Automation means less technical accidents.
- Open-source means community and ownership.
- By using Kubernetes, combined with our over ten years of experience in WordPress hosting, we set off to create an elegant and open source project that aims to democratize the WordPress hosting as we know it.
Smart Managed WordPress Hosting
Presslabs provides high-performance hosting and business intelligence for the WordPress sites you care about.