User:Nischayn22/RFC MediaWikiSiteManager

From mediawiki.org

History[edit]

There have been various attempts at implementing Extension Management and none have succeeded so far, mostly due of lack of information provided by the extensions regarding their compatibility, dependency, etc. However, the use of extension.json has improved this a lot and some minor work on them could help achieve an easy to use Extension Management Dashboard (EMD).

About[edit]

This page is not about an EMD though, its aimed at a more high level Site Manager Dashboard (SMD) of which the EMD is going to be a part. The main goals of SMD will be as follows:

  • An Admin Login
  • Ability to create multiple wikis using a simple UI, with simple Form based approach. Form fields could be:
    • Domain Name or sub-domain name
    • Select Hosting Options - Shared vs Dedicated VM
    • Wiki Name
    • Upload Logo
    • Preferred Path Url
    • Admin account details
  • Choose a Skin (Choose one from the various existing options)
  • EMD - Select which extensions you want to install
  • Configuration Manager - Set Global Variable settings for MediaWiki and extensions
  • Updates Manager - Upgrade your MediaWiki and extensions (As new MediaWiki versions are released new bundles are created)

SMD supports the following Configurations:

  • MediaWiki Install server - same or remote

Since its pretty common for extensions not being fixed for newer MediaWiki versions the problem of updating extensions will always remain unsolved.

How it Works[edit]

Here's how the SMD works internally.

  • Can setup a new MediaWiki site on the same machine
    • Launch new VM Instances in the cloud (depending on the service we plan to use)
    • Create a new user and related folders
    • Create Virtual Hosts Config
    • Create Database
    • Install MediaWiki
  • Download and activate selected skin by modifying LocalSettings.json (LocalSettings.json should be converted to PHP and included in LocalSettings.php)
  • Download and activate selected extensions by modifying LocalSettings.json
  • Configuration Manager loads various configurations available via a default list for core and using the config field in extension.json for the extensions. Set Configurations by modifying LocalSettings.php
  • Manage updates by keeping "bundles" in the form of JSON files. Each JSON file has the following attributes currently set manually.
    • MediaWiki git path and commit ID/tags
    • Extensions and Skins git path and commit IDs/tags
    • Installation method - composer or repo download
  • New bundles are created only when a new Stable release of MediaWiki is created and most of the important extensions have become compatible.
  • List of Extensions and Skins are managed as per their support for the MediaWiki version.
    • If bug fixes are made the JSON file can be updated and all the sites will be refreshed to get the new code.
    • If an extension stops working with a new release it will stop appearing on the JSON file and upgrades will show that the extension is missing.
    • Once the extension is fixed it will be available with the new bundle and also to install via the EMD
  • Cron job to automatically take backups and store them on a secured cloud storage.
  • SMD maintains a sites.json file with configurations of the various sites it maintains. To include existing site one must manually fill the JSON. However, since the SMD works with bundles updating may majorly override the site.

Improvements[edit]

The biggest hurdle in the proposed setup is manually maintaining the JSON file. Here's how it can be automated:

  • The extension.json should have a "authoremail" field to notify authors when new MediaWiki versions are available. See the current Schema here
  • The bundle JSON should be filled in automatically using the git log for extension.json and parsing the requires field.