MWStake MediaWiki Manager: Difference between revisions

From MWStake
Jump to navigation Jump to search
No edit summary
Line 8: Line 8:
</gallery>
</gallery>


Video: [https://www.youtube.com/watch?v=MTYq2a2Xsls First glimpse at the idea of an MWStake MediaWiki Manager]
== Development ==


== Resources ==
There are videos about MWStake MWM at [https://www.youtube.com/channel/UCoP-EgZJPhB0UE4WaKCHR1w dataspects' YouTube channel].


https://github.com/dataspects/mediawiki-manager
* [https://www.youtube.com/watch?v=MTYq2a2Xsls First glimpse at the idea of an MWStake MediaWiki Manager]
https://github.com/dataspects/mwmui
ย 
https://github.com/dataspects/mwmapi
=== Fundamentals ===
ย 
==== Target User Groups ====
ย 
===== UGCL: Users willing/able to use the command line =====
ย 
===== UGUI: Users NOT willing/able to use the command line =====
ย 
==== Use Cases ====
ย 
===== Install MW System Instance =====
ย 
===== Manage MW System Settings =====
ย 
# [https://github.com/dataspects/mediawiki-manager/blob/main/catalogues/systemSettings.json systemSettings.json]
ย 
===== Manage MW Extensions (install/enable/disable/upgrade) =====


# [https://github.com/dataspects/mediawiki-manager/blob/main/docker-compose.yml docker-compose.yml] ([https://github.com/dataspects/dataspectsSystemBuilder/tree/master/docker-images/mediawiki MediaWiki Dockerfile])
# [https://github.com/dataspects/mediawiki-manager/blob/main/catalogues/extensions.json extensions.json]
# [https://github.com/dataspects/mediawiki-manager/blob/main/catalogues/extensions.json extensions.json]
====== MediaWiki Stakeholders Group Certified Extensions Service =======
* Some background:
** [[Action:7]]
** [[Talk:MWStake_incorporation/Board_meeting]]
* Format right now: https://github.com/dataspects/mediawiki-manager/blob/main/catalogues/extensions.json
* Management, roles, responsibilities, privileges, processes, QA?
* Hosting?
===== Upgrade MW =====
# [https://github.com/dataspects/mediawiki-manager/blob/main/catalogues/versions.json upgrades.json]
# [https://github.com/dataspects/mediawiki-manager/blob/main/catalogues/versions.json upgrades.json]
# [https://github.com/dataspects/mediawiki-manager/blob/main/catalogues/apps.json mediawiki-apps.json]
# [https://github.com/dataspects/mediawiki-manager/blob/main/catalogues/systemSettings.json systemSettings.json]
# [https://github.com/dataspects/mediawiki-manager/tree/main/mwmapi mwmapi.php] (MediaWiki Manager API), new: [https://github.com/dataspects/mwmapi Go]
# [https://github.com/dataspects/mwmui mwmui] (User Interface)
# [https://github.com/dataspects/mediawiki-manager/blob/main/mwmapi/test.php Integration Testing]


=== MediaWiki Manager ===
===== Snapshots (backup/restore/clone) =====


==== Usecase: safe mode ====
===== Safe Mode =====


'''Idea''': if someone corrupts <code>extensions/</code> and/or <code>LocalSettings.php</code>, then <code>./start-SAFE-MODE.sh</code> restarts the wiki in safe mode, by falling back to container-internal versions of <code>extensions/</code> and <code>LocalSettings.php</code>.
'''Idea''': if someone corrupts <code>extensions/</code> and/or <code>LocalSettings.php</code>, then <code>./start-SAFE-MODE.sh</code> restarts the wiki in safe mode, by falling back to container-internal versions of <code>extensions/</code> and <code>LocalSettings.php</code>.
Line 125: Line 147:
|}
|}


=== MediaWiki Manager API ===
===== Manage MW Content (inject/extract/facet/edit) =====


* PHP right now, moving to new https://github.com/dataspects/mwmapi (Go)
# [https://github.com/dataspects/mediawiki-manager/blob/main/catalogues/apps.json mediawiki-apps.json]
* Security review (e.g. exec commands)


==== Usecase: edit system settings ====
==== Abstraction Layers ====


Experimental, see https://github.com/dataspects/mediawiki-manager/blob/main/catalogues/systemSettings.json
===== AL0: shell scripts using MWAPI and CRUDing files =====


==== Usecase: enable (install) and disable extension ====
https://github.com/dataspects/mediawiki-manager


* https://github.com/dataspects/mediawiki-manager/blob/ca621f9dab7ba784c6d16f6fa71f0d500e9544d8/mwmapi/extension.php
# [https://github.com/dataspects/mediawiki-manager/blob/main/docker-compose.yml docker-compose.yml] ([https://github.com/dataspects/dataspectsSystemBuilder/tree/master/docker-images/mediawiki MediaWiki Dockerfile])
ย 
==== Usecase: upgrade MediaWiki "package" ====
ย 
See https://github.com/dataspects/mediawiki-manager/blob/ca621f9dab7ba784c6d16f6fa71f0d500e9544d8/mwmapi/system.php#L12
ย 
==== Usecase: take snapshot ====
ย 
See https://github.com/dataspects/mediawiki-manager/blob/ca621f9dab7ba784c6d16f6fa71f0d500e9544d8/mwmapi/snapshots.php#L19


==== Usecase: inject dataspects ontology ====
===== AL1: MWM API (Go) wrapping AL0 =====


See https://github.com/dataspects/mediawiki-manager/blob/ca621f9dab7ba784c6d16f6fa71f0d500e9544d8/mwmapi/app.php#L27
https://github.com/dataspects/mwmapi


=== MediaWiki Manager UI ===
====== Unit Testing ======


* Gatsby/React/MaterialUI
===== AL2: MWM UI (React/Material UI) using AL1 =====
* Security review
* Protection: .htaccess or own user management?
ย 
=== MediaWiki Stakeholders Group Certified Extensions Catalogue ===
ย 
* Some background:
** [[Action:7]]
** [[Talk:MWStake_incorporation/Board_meeting]]
* Format right now: https://github.com/dataspects/mediawiki-manager/blob/main/catalogues/extensions.json
* Management, roles, responsibilities, privileges, processes, QA?
* Hosting?


=== Integration Testing ===
https://github.com/dataspects/mwmui


# https://github.com/dataspects/mediawiki-manager/blob/main/mwmapi/test.php
====== Integration Testing ======

Revision as of 05:11, 12 March 2021

Manage (settings), upgrades, extensions, snapshots and content through an independent UI/API

Development

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

Fundamentals

Target User Groups

UGCL: Users willing/able to use the command line
UGUI: Users NOT willing/able to use the command line

Use Cases

Install MW System Instance
Manage MW System Settings
  1. systemSettings.json
Manage MW Extensions (install/enable/disable/upgrade)
  1. extensions.json
MediaWiki Stakeholders Group Certified Extensions Service =
Upgrade MW
  1. upgrades.json
Snapshots (backup/restore/clone)
Safe Mode

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

https://github.com/dataspects/mediawiki-manager/blob/main/start.sh
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}

Mwm-safe-mode.png

https://github.com/dataspects/mediawiki-manager/blob/main/start-SAFE-MODE.sh
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}
Manage MW Content (inject/extract/facet/edit)
  1. mediawiki-apps.json

Abstraction Layers

AL0: shell scripts using MWAPI and CRUDing files

https://github.com/dataspects/mediawiki-manager

  1. docker-compose.yml (MediaWiki Dockerfile)
AL1: MWM API (Go) wrapping AL0

https://github.com/dataspects/mwmapi

Unit Testing
AL2: MWM UI (React/Material UI) using AL1

https://github.com/dataspects/mwmui

Integration Testing