Project:Development environments
Appearance
This page coordinates the documentation of MediaWiki development environments on MediaWiki.org
Comparison
[edit]Editable on Project:Development_environments/compare this table tries to give an easy reference overview to the difference between the various development environments.
| Feature | MediaWiki Docker | mwcli docker | MediaWiki Vagrant | Local (manual) | Local (quickstart) |
|---|---|---|---|---|---|
| Setup Time[1] | ~15 min | Varies | ~20 min[2] | Varies | ~7 min |
| Docs[3] | DEVELOPERS.md | CLI (command ref) | MediaWiki-Vagrant | Manual:Installing MediaWiki | Local development quickstart |
| Source | gerrit:mediawiki/core | gitlab:releng/cli | gerrit:mediawiki/vagrant | ||
| Powered by | docker compose | docker compose | VirutalBox | Bare Metal | Bare Metal |
| Updating | With mediawiki core repository | With mwcli update command | |||
| Requirements | |||||
| Software | |||||
| docker | Yes | Yes | |||
| Cloned MediaWiki core | Yes | Will help you clone it if missing | Yes | Yes | |
| VirtualBox | Yes | ||||
| Vagrant | Yes | ||||
| php | Yes | Yes | |||
| composer | Yes | Yes | |||
| webserver | Yes | ||||
| Database | Yes | ||||
| Hardware | |||||
| Operating System | Linux, macOS, or Windows | Linux, macOS, or Windows | Linux, macOS, or Windows | Linux, macOS, or Windows | Linux, macOS, or Windows |
| Processor | 64-bit x86 processor | ||||
| Memory | 4 GiB[4] | ||||
| Disk | 10–12 GB | ||||
| Features | |||||
| MediaWiki | |||||
| Apache | ✅ | ✅ | ✅ | ✅ (commonly used) | ❌ (uses PHP built-in server) |
| php-fpm | ✅ | ✅ | ❔ | ❔ | ❔ |
| jobrunner | ✅ | ✅[5] | ✅[6] | ❔ | ❔ |
| Abilities | |||||
| Multisite | ✅[7] | ✅[8] | ✅ | ||
| XDebug | ✅[9] | ✅[10] | |||
| Includes quibble | ✅ | ||||
| Includes fresh | ✅ | ||||
| Includes composer | ✅ | ✅ | |||
| VueSSR | ✅ | ||||
| Shellbox | ❌ | ✅ | ❔ | ❔ | ❔ |
| ORES | ❔ | ❌ | ✅[11] | ❔ | ❔ |
| Poolcounter | ❔ | ❌ | ✅[11] | ❔ | ❔ |
| RestBase | ❔ | ❌ | ✅[11] | ❔ | ❔ |
| Additional and Optional Services | |||||
| Database & Storage | |||||
| MySQL (primary) | ✅ [12] | ✅ | ✅ | ✅ | ❔ |
| MySQL Replica | ✅ [13] | ✅ | ❔ | ❔ | ❔ |
| PostgreSQL | ✅ [14] | ✅ | ❔ | ❔ | ❔ |
| SQLite | ✅ (default) | ✅ | ❔ | ✅ | ✅ |
| Redis | ✅[15] | ✅ | ❔ | ❔ | ❔ |
| Memcached | ✅[16] | ✅ | ✅[11] | ❔ | ❔ |
| Kafka | ❔ | ❌ | ✅[11] | ❔ | ❔ |
| Thumbor | ❔ | ❌ | ✅[11] | ❔ | ❔ |
| Logging & Monitoring | |||||
| EventLogging | ✅[17] | ✅ | ✅[11] | ❔ | ❔ |
| EventGate | ✅[18] | ✅[19] | ❔ | ❔ | ❔ |
| Graphite | ❌ | ✅ | ❔ | ❔ | ❔ |
| statd | ❔ | ✅ | ✅[11] | ||
| Jaeger | ❌ | ✅ | ❔ | ❔ | ❔ |
| ELK (ElasticSearch, Logstash, Kibana) | ❔ | ❔ | ✅[11] | ||
| Search | |||||
| Elasticsearch / OpenSearch | ✅[20] | ✅ | ❔ | ❔ | ❔ |
| Authentication | |||||
| Keycloak | ❌ | ✅ | ❔ | ❔ | ❔ |
| Admin & Debug Tools | |||||
| SQL interface | ❌ | ✅(phpMyAdmin / Adminer) | ❔ | ❌ | ❔ |
| ✅[21] (Mailhog) | ✅(Mailhog) | ✅(Mailcatcher)[22] | ❔ | ❔ | |
| Wikidata Query Service | |||||
| WDQS | ❌ | ✅ | ❔ | ❔ | ❔ |
| WDQS UI | ❌ | ✅ | ❔ | ❔ | ❔ |
| Networking | |||||
| Envoy | ✅[23] | ❌ | ❔ | ❔ | ❔ |
| Nginx | ❌ | ✅ | ❔ | ❔ | ❔ |
| DNS | ❌ | ✅ | ❔ | ❔ | ❔ |
| Other | |||||
| Phabricator | ❔ | ❔ | ✅[11] | ❔ | ❔ |
Key pages
[edit]- Main on-wiki page for setting up a development environment, via Developer hub
- Covers how to "learn the basic skills needed to contribute to development"
- Covers these options:
- MediaWiki Docker: "setup a MediaWiki installation quickly and are not planning on installing many extensions."
- mwcli: "sets up Docker with a few simple commands and provides basic orchestration functionality between MediaWiki, MySQL, ElasticSearch, Memcached, and other types of containers"
- MediaWiki Vagrant: "saves you installation and configuration time compared to manually adding extensions in a Docker or local installation, but it runs a bit slower"
- Local installation: "will take much more time to set up than Docker or Vagrant"
- Links to (among others):
- Main off-wiki page for setting up a development environment
- Only covers MediaWiki-Docker: "an extendable local development environment based on Docker Compose. This environment provides PHP, Apache, Xdebug and a SQLite database"
- Links to How to become a MediaWiki hacker
- Not translatable
- Next steps after setup:
- Shell into container
- Run PHPUnit tests
- Run Selenium tests
- Run API integration tests
- Install Vector skin
- Install EventLogging extension
- Run Xdebug
- Subpages
- Includes extension-specific subpages, such as MediaWiki-Docker/Extension/VisualEditor, which partially duplicates instructions from extension pages, such as Extension:VisualEditor
- Comparison of pageviews for some extension subpages
- Instructions for using a database other than SQLite: MediaWiki-Docker/Configuration_recipes/Alternative_databases
Related pages
[edit]- Download
- Software bundles
- Manual:System administration
- Manual:FAQ#Installation and configuration
- Comparison of distribution options
- Template:InstallationNav
Research
[edit]- Satisfaction – Respondents are satisfied with Docker-based environments, much like last year
- Docker-based development environments are still missing the ability to make "wikifarms". (Note by Addshore: This isn't really true...)
- Too many things: I would love there to be fewer semi-supported environments, so when helping people we're almost all starting from the same place
- Wikifarm difficulty: MediaWiki-Docker does not make wikifarms and other non-trivial configuration management easy. MediaWiki-Vagrant worked hard to replace "read a wiki page" with deployment tooling, but that goal seems to have not carried forward into the defacto successor dev environment.
- Tenure – Respondents with less than 3 years of tenure use MediaWiki Docker, respondents who've been around longer use a self-created environment.
- Satisfaction – People are satisfied with Docker-based environments, generally.
- Docker-based environments offer little support for setting up extensions.
- Setting up MediaWiki core can be very simple (from my experience with a Mac), but it's installing some extensions where it gets tricky.
- MW-Docker is great, I love it. The only downside is that there's no automation for installing hard-to-install extensions.
- Many responses mentioned the need for “production-like” environments. Of course, production-like means different things to different people.
- Its' difficult to get a production like environment set-up locally especially the wiki-family setup and jobqueue.
- It would be great if it was easier to setup "test Wikis" that have features similar to English Wikipedia.
- Until there is a standard test environment for MediaWiki deployments that include microservices in Kubernetes, we will continue to suffer these kinds of bugs.
- "My biggest issue with our dev environments is the fragmentation"
- Comments about dev environment documentation: negative:6; positive: 0
- "Ease of use" was the number one priority for dev environments. The most common "other" priority was using a debugger. In contrast, portability was ranked low as a priority.
- 57 people reported using a Docker-based environment, while 45 people reported using a "self-created environment".
- Top 3 agrees / storng sgrees
- I prefer working with command-line tools (49)
- I prefer working with docker-compose (37)
- I prefer working with docker (36)
- Top 3 disagrees / strong disagrees
- Using CLoud VMs (29)
- Using local VMs (27)
- LAMP/WAMP/MAMP (21)
- The most common theme was that respondents wanted a simple, fast, and easy to use environment. More respondents selected a docker-based environment to get this result
- Many respondents are comfortable with what they know, so don’t try out new development environment solutions
- The most common response was that respondents didn't know about the efforts to improve the developer environment or didn’t notice anything, while a few expressed feeling like improvements were being made.
- Most requested features were improved ability to run tests, more documentation, more standardization, and access to production-like content when testing.
- local dev environment is slow and hard to use - 1
- make documentation easier to access?
- enable quick and easy production-like testing environments for developers?
- make the local development environment easier to setup?
- make the local dev env easy to configure and use?
- make easily shared environments?
- help non-devs have an environment?
- decrease resource usage?
- achieve more parity with production?
Cloning MediaWiki
[edit]It's generally recommended to follow the specific guides for each development environment, as many already cover core topics such as cloning MediaWiki core.
Requires git
# full clone into a mediawiki directory
# ~2-5 minutes, ~870 MB
git clone https://gerrit.wikimedia.org/r/mediawiki/core.git mediawiki
# clone with SSH
git clone git clone ssh://gerrit.wikimedia.org:29418/mediawiki/core mediawiki
# configure SSH after cloning
git remote set-url origin ssh://YOUR_GERRIT_USERNAME@gerrit.wikimedia.org:29418/mediawiki/core
# shallow clone
# ~15 seconds, ~205 MB
# Faster but not suitable for development
git clone --depth 1 https://gerrit.wikimedia.org/r/mediawiki/core.git mediawiki
Installing a skin
[edit]If you clone Vector after installing MediaWiki, you must add wfLoadSkin( 'Vector' ); to LocalSettings.php.
If you clone Vector before installing MediaWiki, the install script automatically updates LocalSettings.php.
References
[edit]- ↑ Time from starting the docs to an initial working development environment
- ↑ MediaWiki-Vagrant#System requirements
- ↑ Primary documentation source
- ↑ MediaWiki-Vagrant#System requirements
- ↑ Cli/ref/mw docker mediawiki jobrunner
- ↑ MediaWiki-Vagrant#Job queue
- ↑ MediaWiki-Docker/Configuration recipes/Wiki farm
- ↑ Cli/ref/mw docker mediawiki install
- ↑ MediaWiki-Docker/Configuration recipes/Xdebug
- ↑ Cli/guide/Docker-Development-Environment/MediaWiki#XDebug
- ↑ 11.00 11.01 11.02 11.03 11.04 11.05 11.06 11.07 11.08 11.09 MediaWiki-Vagrant/Roles
- ↑ MediaWiki-Docker/Configuration recipes/Alternative databases#MariaDB (single database server)
- ↑ MediaWiki-Docker/Configuration recipes/Alternative databases#MariaDB (database replication)
- ↑ MediaWiki-Docker/Configuration_recipes/Alternative_databases#Postgres (single database server)
- ↑ MediaWiki-Docker/Configuration_recipes/Redis
- ↑ MediaWiki-Docker/Configuration_recipes/Memcached
- ↑ MediaWiki-Docker/Configuration_recipes/EventLogging
- ↑ MediaWiki-Docker/Configuration_recipes/EventGate
- ↑ https://gitlab.wikimedia.org/repos/releng/cli/-/blob/main/internal/mwdd/files/embed/eventlogging.yml?ref_type=heads
- ↑ MediaWiki-Docker/Configuration_recipes/OpenSearch
- ↑ MediaWiki-Docker/Configuration_recipes/Mail_handling
- ↑ MediaWiki-Vagrant/Roles
- ↑ MediaWiki-Docker/Configuration_recipes/Envoy