User:SBassett (WMF)/Explorations/Development Environments

From mediawiki.org

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]

> 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]

mw-bocker[edit]

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]

Wikimedia test production wikipedias[edit]

Other stuff[edit]