MWStake MediaWiki Manager: Difference between revisions
Lex Sulzer (talk | contribs) No edit summary |
Lex Sulzer (talk | contribs) (→�) |
||
Line 155: | Line 155: | ||
== Use Cases == | == Use Cases == | ||
=== {{mlb|Install/configure/upgrade system(s)}} === | === {{mlb|Install/configure/upgrade/run/operate system(s)}} === | ||
<div style="margin:20px; padding:50px; border-radius:50px; background-color:beige;"> | |||
{|class=wikitable | {|class=wikitable | ||
!Where | !Where | ||
Line 181: | Line 182: | ||
|} | |} | ||
[[File:Mediawiki-manager-InteractionLogics.png]] | [[File:Mediawiki-manager-InteractionLogics.png]] | ||
</div> | </div> |
Revision as of 09:56, 13 April 2021
Project Reasoning and Potential Goals
Slide 1/10: Why and What?
- Your kitchen / hotel chain kitchens
- appliances vs. parts
- integration levels and interfaces
- MWM:
git clone
install.sh
- manage:
- Install/configure/upgrade system(s)
- Install/enable/disable/upgrade/configure extensions
- MediaWiki Stakeholders Group Certified Extensions Service
- Backup/restore/clone/compare/consolidate system(s) (snapshots)
- Troubleshoot/safe mode
- Inject/extract/facet/edit/consolidate/import/export/remove apps/structures/ontologies
- MediaWiki Stakeholders Group Certified Apps Service
- Scripting/automate/schedule tasks
- Package/move/archive/migrate system(s)
MWM Implementation Aspects
Slide 2/10: How and Why?
- Dissect system…
- …into as few as possible but into as many as necessary interfacing components…
- …in order to fulfill all intended use cases…
- …in accordance with corresponding users' capabilities and needs.
Abstraction Layers
CLI <-- API <-- UI
- UI is GUI for API
- API wraps CLI
- CLI means bash scripts covering all use cases
Podman-managed MWM Kubernetes deploy manifest ("Containers")
- Pod "mwm"
- Container "mediawiki" + user volumes and config envs
- Container "mediawiki-safemode" + config envs
- Container "mariadb" + config envs
Config envs
# mediawiki-manager.yml
...
containers:
- image: docker.io/dataspects/mediawiki:1.35.0-2104121740
name: mediawiki
env:
- name: WG_DB_PASSWORD
value: wgdbpassword
- ...
...
|
⇒ | # Localsettings.php
$wgDBpassword = getenv("WG_DB_PASSWORD");
|
Install
envsubst < mediawiki-manager.tpl > mediawiki-manager.yml # <-- Customize system
podman play kube mediawiki-manager.yml # <-- Schedule system (runs normal mediawiki container)
podman container stop mwm-deployment-pod-0-mediawiki-safemode # <-- Stop safe mode mediawiki container
Normal mode
# From scratch
podman pod start mwm-deployment-pod-0 # <-- Run pod
podman container stop mwm-deployment-pod-0-mediawiki-safemode # <-- Stop safe mode mediawiki container
# Returning from safe mode
podman container stop mwm-deployment-pod-0-mediawiki-safemode # <-- Stop safe mode mediawiki container
podman container stop mwm-deployment-pod-0-mediawiki # <-- Start normal mediawiki container
Safe mode
podman container stop mwm-deployment-pod-0-mediawiki # <-- Stop normal mediawiki container
podman container start mwm-deployment-pod-0-mediawiki-safemode # <-- Start safe mode mediawiki container
/images
still volumed in- still uses production database
- mostly unchanged envs
- "volumed out" and falling back to reliable container-internal versions:
- LocalSettings.php containing
$wgReadOnly = true; $wgSiteNotice = "================ MWM Safe Mode ================";
- extensions
- skins
- vendor
- composer.json
- LocalSettings.php containing
Target User Groups
Slide 2/10: Who can use the concepts in MWM how? Here I try to segregate target users into groups that share capabilities and needs.
User Group | Point/Select/Type/Click | CLI/SSH | Scripting | Edit configuration junior | Edit configuration senior |
---|---|---|---|---|---|
Examples | "Web Interface" | Automate/schedule tasks
|
|
PLUS
| |
UGUI "WebAdmin" | Yes | - | "Macro" style only from within UI ("Excel Record Macro Style") |
- | - |
UGAdmin "SysAdmin" | Yes | Yes | Run/arrange .sh scripts | Yes | - |
UGCoder "Developer" | Yes | Yes | Run/arrange/compose/create/edit .sh scripts including API calls | Yes | Yes |
Use Cases
Install/configure/upgrade/run/operate system(s)
Where | How | Why |
---|---|---|
locally on a single computer | as a containerized app | for personal/private/development use |
in an intranet |
|
for corporate internal use |
on the internet/in the cloud |
|
for corporate internal/external/public use |
Install/enable/disable/upgrade/configure extensions
CLI (Bash)
The command:
./cli/manage-extensions/show-extension-catalogue.sh
parses https://github.com/dataspects/mediawiki-manager/blob/main/catalogues/extensions.json to offer the selection of "certified" extensions upon which the commands:
./cli/manage-extensions/enable-extension.sh <EXTNAME>
and./cli/manage-extensions/disable-extension.sh <EXTNAME>
can be executed.
Backup/restore/clone/compare/consolidate system(s) (snapshots)
Troubleshoot/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
.
MWM Normal Mode | MWM Safe Mode |
---|---|
Inject/extract/facet/edit/consolidate/import/export/remove apps/structures/ontologies
Scripting
Package system(s)
MediaWiki Stakeholders Group Certified Extensions Service
- Some background:
- Format right now: https://github.com/dataspects/mediawiki-manager/blob/main/catalogues/extensions.json
- Management, roles, responsibilities, privileges, processes, QA?
- Hosting?
MWStake MWM Service Portfolio
Abstraction Layers
ALcontainerization: Podman
- The mediawiki container image contains a full MediaWiki installation.
- 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 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
Development Broadcasting
There are videos about MWStake MWM at dataspects' YouTube channel.