User:SBassett (WMF)/Explorations/Development Environments
Mediawiki-Vagrant[edit]
- Project page: https://www.mediawiki.org/wiki/MediaWiki-Vagrant
- Notes
- Extremely, painfully slow. Can take hours to configure, rebuild, etc.
- Uses puppet, kind of like Wikimedia production, but isn't configured in the same way as what's under noc.wikimedia.org.
- I find that when I try to enable maybe 3 or more roles at a time, things often break in a fatal way.
- Based upon Vagrant and VirtualBox, which have long been showing their age.
Mediawiki-Docker[edit]
- Project page: https://www.mediawiki.org/wiki/MediaWiki-Docker
- Notes
- Newer version of a containerized development environment, ships with MediaWiki Core as of November 2019 or so, so a little after REL1_34.
- Installation & Usage
- DEVELOPERS.md has some good step-by-step instructions.
- There are also additional instructions for setting up additional extensions, skins and other Wikimedia production sorts of things.
- Installation quick guide below, from DEVELOPERS.md. The entire process from the
git clone
to the skin installation takes about 14 minutes, on an MBA i7 running Mojave 10.14.6, with a decent consumer network connection.
> Clone MediaWiki core:
git clone "https://gerrit.wikimedia.org/r/mediawiki/core" && cd core
> Create a .env
file:
MW_SCRIPT_PATH=/w MW_SERVER=http://localhost:8080 MW_DOCKER_PORT=8080 MEDIAWIKI_USER=Admin MEDIAWIKI_PASSWORD=dockerpass XDEBUG_CONFIG= XDEBUG_ENABLE=true XHPROF_ENABLE=true
> Create a docker-compose.override.yml
file:
version: '3.7' services: # These lines ensure file ownership is set to your host user/group mediawiki: user: "${MW_DOCKER_UID}:${MW_DOCKER_GID}" # Linux users only: this extra_hosts section is necessary for Xdebug: extra_hosts: - "host.docker.internal:host-gateway" mediawiki-web: user: "${MW_DOCKER_UID}:${MW_DOCKER_GID}" mediawiki-jobrunner: user: "${MW_DOCKER_UID}:${MW_DOCKER_GID}"
> Run the following command:
echo "MW_DOCKER_UID=$(id -u) MW_DOCKER_GID=$(id -g)" >> .env
> Bring up the containers:
docker-compose up -d
For now, this pulls the following images if you don't already have them:
docker-registry.wikimedia.org/dev/stretch-php72-jobrunner:2.0.0 docker-registry.wikimedia.org/dev/stretch-php72-fpm:2.0.0 docker-registry.wikimedia.org/dev/stretch-apache2:1.0.0-s1
> Run composer update:
docker-compose exec mediawiki composer update
> Run the MediaWiki installer:
docker-compose exec mediawiki /bin/bash /docker/install.sh
> Install a skin:
git clone "https://gerrit.wikimedia.org/r/mediawiki/skins/Vector" skins/Vector
echo "wfLoadSkin( 'Vector' );" >> LocalSettings.php
> Run other commands within the container via cli:
docker-compose exec mediawiki bash
Addshore's MediaWiki-Docker-Dev[edit]
- Project page: https://www.mediawiki.org/wiki/MediaWiki-Docker-Dev, https://github.com/addshore/mediawiki-docker-dev
- Notes
- A bit more optimized for working with wikidata, Wikibase, WDQS, etc. though I haven't really tried this out extensively.
- Creates a number of containers including one for the app, dbs (primary & secondary), phpmyadmin, graphite, proxy and redis.
- Installation & Usage
- See the README.md
mw-bocker[edit]
- Project page: https://github.com/sbassett29/mw-bocker
- Notes
- Some fairly simple
sh
scripts to download and install various MediaWiki releases. - Pretty fast, since it's just
sh
, and then uses php's internal web server and sqlite for default storage. - Good for testing simple changes, with an extension or skin or two. Not good for testing more complex changes, which might be required for Wikimedia production.
- Some fairly simple
patchdemo[edit]
- Project URL: https://patchdemo.wmflabs.org/
- Project page: https://github.com/MatmaRex/patchdemo
- Notes
- Should never be used to test any sensitive or security patches.
- Requires Wikimedia Oauth login to create patch pulls and test wikis (so you just need a metawiki account and then authorize it)
- A handy way to test specific gerrit patch sets in a public way.
- Likely works best to test UI/X-related changes with default settings. Not really optimal for anything where you might need to dig through logs to debug or do more behind-the-scenese things like run maint scripts from the cl, employ specific LS.php configurations, or test more subtle production features.
Wikimedia beta cluster[edit]
- Project URL: metawiki, enwiki, many others...
- Project page: https://www.mediawiki.org/wiki/Beta_Cluster
- Notes
Wikimedia test production wikipedias[edit]
- Project URL: https://test.wikipedia.org/, https://test2.wikipedia.org/
- Project page: https://wikitech.wikimedia.org/wiki/Test.wikipedia.org (test2 page linked at bottom)