Docker/MediaWiki and Docker Workshop 2021

As part of the 2021 SMWCon Conference, there was a half-day workshop on MediaWiki and Docker. Below are the etherpad notes taken during the workshop.

COMMON ISSUES:

 * It seems docker-compose is more used as a dev env than minikube. It's just a less steep learning curve or anything else?


 * ability to only install DB schema without all the other pieces install.php is doing, keeping your LocalSettings (use case: preinstalled MW env. switching to different DB -> CI matrix)


 * running JS tests headless in CI


 * Using Kubernetes is complex


 * Solution for testing: 'Enable Kubernetes' option in Docker Desktop easily starts up a local cluster for you


 * Alternative: use Docker Compose when a chainsaw is not needed

AREAS FOR COLLABORATION:

 * Place to announce your great docker images with SMW: https://www.semantic-mediawiki.org/wiki/Help:Using_Docker


 * MediaWiki/Docker hackathon

QUESTIONS FOR SPEAKERS:
If your question is for a specific speaker, include their name.


 * Gökhan: does BlueSpice's Docker container include MySQL as well in the same container? If so, why is it not in a different container?


 * Yes, it is. The purpose of this container is to provide an all-in-one container image to users who want to discover about BlueSpice MediaWiki but also they don't have time or experience to set up all those services. Decoupling MySQL is not enough for this image because some heavier services are already baked in this image. (eg: ElasticSearch, Jetty9). Alternatively, we also provide a docker-composer setup.


 * Follow-up question: Is there any reason to not provide a Docker Compose or Kubernetes manifest? The reason I ask is because the Docker philosophy is one service per container, like the UNIX philosophy of do one thing well.


 * Jeffrey: Are the codebases in Canasta symlinked, or is each instance a new copy of MW?


 * Nice question! The code base isn't really symlinked since it lives inside the Docker image. At the moment, if you have a multi-wiki setup (wiki farm), each wiki runs on its own Docker container. It is possible to alter the stack to run multiple wikis. We have a WikiWorks client with a high traffic wiki farm on this setup right now.


 * Speaking for myself here and not necessarily all of Project Canasta, I do think it will be possible for Canasta to have one container be able to run multiple wikis, without any need for symlinks. Similar to the Wikimedia Foundation's approach, it would take a look at the host header from the user's request (or the MW_DB const if ran from the CLI) and conditionally include the right database and the specific wiki's settings. I think Meza kind of does this, except there's no need for symlinks 🙂


 * Jeffrey: Can more Semantic MediaWiki extensions such as SRF be included in Canasta?


 * Great point! I forgot to mention this in the presentation, but all of those extensions are indeed included with Canasta, or if they aren't yet 100% working, we certainly are aiming to support them. (After all, what would we be doing presenting at SMWCon if I said we wouldn't be supporting them? 😉)


 * R.Evans: Q to all - Is there (will there be) a page on mw.o that provides a listing/table of these different emerging approaches to "Ready-to-use MW containerizations" and allows people interested in adopting one of these to compare them by their various defining features, readiness, and advantages and disadvantages? ty.


 * reply by Jeffrey: I'll wait for Cindy to sum things up, but on Canasta's side, we would love to add it to such a page if one is created.

NOTES:

 * HPA = en.wikipedia.org/wiki/Autoscaling#Kubernetes_Horizontal_Pod_Autoscaler


 * Wikimedia avoids using outside images in their own images, to avoid unnecessary dependencies


 * Wikimedia Helm Charts: https://helm-charts.wikimedia.org/stable (see https://wikitech.wikimedia.org/wiki/ChartMuseum for more information)


 * you can add our charts repository using helm repo add wikimedia helm-charts.wikimedia.org - also gerrit.wikimedia.org/r/plugins/gitiles/operations/deployment-charts/+/refs/heads/master/charts/ has all the code of the charts


 * mwcli (https://www.mediawiki.org/wiki/Cli) - becoming a standard, and used by both WMF and WMDE


 * provides various options during setup, like whether to do a deep or shallow clone from Git


 * https://hub.docker.com/r/bluespice/bluespice-free


 * https://github.com/hallowelt/docker-bluespice-free


 * https://www.mediawiki.org/wiki/Project_Canasta


 * https://github.com/WikiWorks/Canasta


 * https://hub.docker.com/r/gesinn/docker-mediawiki


 * https://github.com/wagoodman/dive - interactive CLI for inspecting layers of your Docker image


 * https://github.com/dataspects/mediawiki-cli/tree/main/manage-config