Difference between revisions of "MediaWiki on Kubernetes"
(Add section titles) |
m |
||
Line 36: | Line 36: | ||
[[Category:Virtualization]] | [[Category:Virtualization]] | ||
+ | [[Category:Kubernetes]] |
Latest revision as of 07:41, 14 November 2023
We will provide a MediaWiki platform with the following characteristics:
- self-healing infrastructure
- auto-scaling
- high-availability with multi-server failover
- flexible storage backends
- multi-cloud compatibility
To do so, we'll need to implement Kubernetes.
Contents
Ansible with Kubernetes[edit | edit source]
We will almost certainly leverage Ansible as an orchestration tool. In a recent blog post on ansible.com, Jeff Geerling (@geerlingguy) answers the question: "How Useful is Ansible in a Cloud-native Kubernetes Environment? The short answer is that Ansible can be used for:
- Container Build (Ansible-bender)
- Cluster Management (Kubespray)
- Application Lifecycle (Use Ansible to build Operators with the Operator SDK to handle deployment, upgrades, backups, etc.)
Here's more information about Ansible with Kubernetes
At WikiMedia Foundation[edit | edit source]
We also want to leverage the work being done at WMF. See Automated deployment of MediaWiki
Twelve-Factor App[edit | edit source]
One of the challenges, especially since it involves potential changes to MediaWiki itself, is the notion of "The Twelve-Factor App" and how MediaWiki currently does not meet the criteria in one way or another. There's an open issue: Allow DefaultSettings.php be overridden by environment variables that would help with the config aspect of things. The guys at Roots.io created an alternate WordPress system starting back in 2013 "Twelve-Factor WordPress App", inspired by an even older post The Twelve-Factor Drupal Web App. A more recent presentation on Twelve-Factor Drupal was made at Drupal Camp Colorado in 2019.
High-level outline[edit | edit source]
- Build image. The WMF official images at Docker Hub do not even include a true database; never mind the extensions we need.
- With ansible-bender we can use ansible-playbook + buildah to create our image.
- Publish images to Docker Hub
- Create organization account at Docker Hub; add freephile
- Create service account at GitHub - to prevent access to private repos through Docker Hub
- Add automated builds and automated testing
- Create a Kubernetes Operator for MediaWiki.
- Add metrics with the helm chart prometheus-operator
Container Runtime[edit | edit source]
Docker (default in kublet [1]) is one of the container runtimes that can be used with Kubernetes. The others include containerd and CRI-O.