MWStake MediaWiki Manager: Difference between revisions

From MWStake
Jump to navigation Jump to search
()
No edit summary
Line 69: Line 69:
|
|
[[File:mwm-normal-mode.png]]
[[File:mwm-normal-mode.png]]
https://github.com/dataspects/mediawiki-manager/blob/main/start.sh
<syntaxhighlight lang=yaml>
version: "3.7"
services:
  mediawiki:
    env_file:
      - CanastaInstanceSettings.env
    container_name: mediawiki_canasta
    image: dataspects/mediawiki:1.35.0-2103040820
    ports:
      - 80:80
      - 443:443
    volumes:
      # MediaWiki >>>
      - ./mediawiki_root/w/LocalSettings.php:/var/www/html/w/LocalSettings.php
      - ./mediawiki_root/w/extensions:/var/www/html/w/extensions
      - ./mediawiki_root/w/skins:/var/www/html/w/skins
      - ./mediawiki_root/w/vendor:/var/www/html/w/vendor
      - ./mediawiki_root/w/images:/var/www/html/w/images
      # MediaWiki Manager >>>
      - ./mediawiki_root/api:/var/www/html/api
      - ./mediawiki_root/dsmwm.log:/var/www/html/dsmwm.log
      - ./mediawiki_root/restic_password:/var/www/html/restic_password
      - ./mediawiki_root/ui:/var/www/html/ui
      - ./mediawiki_root/cloneLocation:/var/www/html/cloneLocation
      - ./restic_data:/var/www/html/restic-repo
      - ./conf:/etc/apache2/sites-available
    # https://phabricator.wikimedia.org/source/mediawiki/browse/master/docker-compose.yml
    # https://phoenixnap.com/kb/how-to-share-data-between-docker-containers
    # + mysql
  # mwmapi:
  #  container_name: mwmapi
  #  image: dataspects/mwmapi:210303
  mysql:
    container_name: mysql_canasta
    image: mariadb:10.5.5
    volumes:
      - ./mysql_data:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
</syntaxhighlight>
|
|
[[File:mwm-safe-mode.png]]
[[File:mwm-safe-mode.png]]
https://github.com/dataspects/mediawiki-manager/blob/main/start-SAFE-MODE.sh
<syntaxhighlight lang=yaml>
version: "3.7"
services:
  mediawiki:
    env_file:
      - CanastaInstanceSettings.env
    container_name: mediawiki_canasta
    image: dataspects/mediawiki:1.35.0-2103040820
    ports:
      - 80:80
      - 443:443
    volumes:
      # MediaWiki >>>
      #- ./mediawiki_root/w/LocalSettings.php:/var/www/html/w/LocalSettings.php
      #- ./mediawiki_root/w/extensions:/var/www/html/w/extensions
      #- ./mediawiki_root/w/skins:/var/www/html/w/skins
      #- ./mediawiki_root/w/vendor:/var/www/html/w/vendor
      - ./mediawiki_root/w/images:/var/www/html/w/images
      # MediaWiki Manager >>>
      - ./mediawiki_root/api:/var/www/html/api
      - ./mediawiki_root/dsmwm.log:/var/www/html/dsmwm.log
      - ./mediawiki_root/restic_password:/var/www/html/restic_password
      - ./mediawiki_root/ui:/var/www/html/ui
      - ./mediawiki_root/cloneLocation:/var/www/html/cloneLocation
      - ./restic_data:/var/www/html/restic-repo
      - ./conf:/etc/apache2/sites-available
    # https://phabricator.wikimedia.org/source/mediawiki/browse/master/docker-compose.yml
    # https://phoenixnap.com/kb/how-to-share-data-between-docker-containers
    # + mysql
  # mwmapi:
  #  container_name: mwmapi
  #  image: dataspects/mwmapi:210303
  mysql:
    container_name: mysql_canasta
    image: mariadb:10.5.5
    volumes:
      - ./mysql_data:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
</syntaxhighlight>
|}
|}


Line 163: Line 81:
[[File:Mediawiki-manager-Service-Architecture.png|1000px]]
[[File:Mediawiki-manager-Service-Architecture.png|1000px]]


=== ALcontainerization: Docker ===
=== ALcontainerization: Podman ===


# The [https://hub.docker.com/r/dataspects/mediawiki/tags?page=1&ordering=last_updated mediawiki docker image] contains a [https://github.com/dataspects/dataspectsSystemBuilder/blob/master/docker-images/mediawiki/Dockerfile full MediaWiki installation].
# The [https://hub.docker.com/r/dataspects/mediawiki/tags?page=1&ordering=last_updated mediawiki container image] contains a [https://github.com/dataspects/dataspectsSystemBuilder/blob/master/docker-images/mediawiki/Dockerfile full MediaWiki installation].
# [https://github.com/dataspects/mediawiki-manager/blob/main/cli/install-system/initialize-persistent-mediawiki-service-volumes.sh initialize-persistent-mediawiki-service-volumes.sh] will copy the 5 persistence-relevant files/directories out to the host so they can be volumed in when starting the mediawiki container through [https://github.com/dataspects/mediawiki-manager/blob/main/docker-compose.yml docker-compose.yml].
# [https://github.com/dataspects/mediawiki-manager/blob/main/cli/install-system/initialize-persistent-mediawiki-service-volumes.sh initialize-persistent-mediawiki-service-volumes.sh] will copy the 5 persistence-relevant files/directories out to the host so they can be volumed in when starting the mediawiki container.
# This shall allow for [https://github.com/dataspects/mediawiki-manager/blob/main/cli/manage-system/start-SAFE-MODE.sh start-SAFE-MODE.sh].
# This shall allow for [https://github.com/dataspects/mediawiki-manager/blob/main/cli/manage-system/start-SAFE-MODE.sh start-SAFE-MODE.sh].



Revision as of 10:17, 17 March 2021

What is this about?

  1. Install MediaWiki.
  
  2. Manage (settings), upgrades, extensions, snapshots and content through an independent CLI/API/UI.
  
  3. Put MediaWiki in SafeMode in case of problems.

Development Broadcasting

There are videos about MWStake MWM at dataspects' YouTube channel.

Target User Groups

UGcli: Users willing/able to use the command line

UGclis: Users wanting to script actions

UGui: Users requiring a UI, NOT willing/able to use the command line

Use Cases

Install MW System Instance

Manage MW

Settings

  1. systemSettings.json

Upgrade

  1. upgrades.json


Manage MW Extensions (install/enable/disable/upgrade)

  1. extensions.json

MediaWiki Stakeholders Group Certified Extensions Service

Snapshots (backup/restore/clone)

SafeMode

Idea: if someone corrupts extensions/ and/or LocalSettings.php, then ./start-SAFE-MODE.sh restarts the wiki in safe mode, by falling back to container-internal versions of extensions/ and LocalSettings.php.

MWMSafeModeAlert.png

MWM Normal Mode MWM Safe Mode

Mwm-normal-mode.png

Mwm-safe-mode.png

Manage MW Content (inject/extract/facet/edit)

  1. mediawiki-apps.json

Abstraction Layers

Mediawiki-manager-Service-Architecture.png

ALcontainerization: Podman

  1. The mediawiki container image contains a full MediaWiki installation.
  2. initialize-persistent-mediawiki-service-volumes.sh will copy the 5 persistence-relevant files/directories out to the host so they can be volumed in when starting the mediawiki container.
  3. This shall allow for start-SAFE-MODE.sh.

ALcli: shell scripts using MWAPI and CRUDing files in service volumes

ALapi: MWM API (Go) wrapping and parametrizing ALcli shell scripts and using MWAPI

https://github.com/dataspects/mwmapi

Unit Testing

ALui: MWM UI (React/Material UI) using and parametrizing ALapi endpoints

https://github.com/dataspects/mwmui

Integration Testing