Difference between revisions of "MediaWiki on Kubernetes"

From Freephile Wiki
Jump to navigation Jump to search
m (draft)
(link to new article on Ansible with Kubernetes)
Line 12: Line 12:
 
# Cluster Management ([[Kubespray]])
 
# Cluster Management ([[Kubespray]])
 
# Application Lifecycle (Use Ansible to build Operators with the Operator SDK to handle deployment, upgrades, backups, etc.)
 
# 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]]
  
 
== High-level outline ==
 
== High-level outline ==
Line 20: Line 22:
 
## Create service account at GitHub - to prevent access to private repos through Docker Hub
 
## Create service account at GitHub - to prevent access to private repos through Docker Hub
 
## Add automated builds and automated testing
 
## Add automated builds and automated testing
 +
# Create [https://coreos.com/blog/introducing-operators.html operator] for MediaWiki. Note the blog article is from 2016. There are now many operators
 +
# Add metrics with the [https://github.com/helm/charts/tree/master/stable/prometheus-operator helm chart prometheus-operator]
 +
  
 
Docker (default in kublet <ref>https://github.com/kubernetes/community/blob/master/contributors/devel/sig-node/container-runtime-interface.md</ref>) is just one of many container runtimes that can be used with Kubernetes. The others include containerd and CRI-O.
 
Docker (default in kublet <ref>https://github.com/kubernetes/community/blob/master/contributors/devel/sig-node/container-runtime-interface.md</ref>) is just one of many container runtimes that can be used with Kubernetes. The others include containerd and CRI-O.
  
 
[[Category:Virtualization]]
 
[[Category:Virtualization]]

Revision as of 20:26, 4 August 2020

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.

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:

  1. Container Build (Ansible-bender)
  2. Cluster Management (Kubespray)
  3. 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

High-level outline[edit | edit source]

  1. Build image. The WMF official images at Docker Hub do not even include a true database; never mind the extensions we need.
    1. With ansible-bender we can use ansible-playbook + buildah to create our image.
  2. Publish images to Docker Hub
    1. Create organization account at Docker Hub; add freephile
    2. Create service account at GitHub - to prevent access to private repos through Docker Hub
    3. Add automated builds and automated testing
  3. Create operator for MediaWiki. Note the blog article is from 2016. There are now many operators
  4. Add metrics with the helm chart prometheus-operator


Docker (default in kublet [1]) is just one of many container runtimes that can be used with Kubernetes. The others include containerd and CRI-O.