MWStake MediaWiki Manager
Jump to navigation
Jump to search
SUBPAGES
GitHub Repo Tag "CreateCampEMWCon2021" Code Base at https://github.com/dataspects/mediawiki-manager Development Discussion at https://riot.im/app/#/room/#mwdeployment:matrix.org
Project Reasoning and Potential Goals
Facilitate managing all aspects and use cases regarding the operation of MediaWiki instance(s)
- Across set up modes and operating systems
- Targeting all user groups accordingly
- Conveying best practices
- Component monitoring and certification services
- Not integrated, but besides MediaWiki instance(s)
- 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)
- Inject/extract/facet/edit/consolidate/import/export/remove apps/structures/ontologies
- MediaWiki Stakeholders Group Certified Apps Service
- Script/automate/schedule tasks
- Package/move/archive/migrate system(s)
- ORTHOGONAL MODULARITY
Backlog
- Permissions (owner, group, rwx, executing user, etc.)
- Apache (SSL, configuration)
- Certified extensions and apps catalog (selection, fields, mechanisms, policies, stewardship)
- SSO
- Search
MWM Implementation Aspects
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 "mariadb" + config envs
Config envs
Pending: podman secret
# my-new-system.env
export WG_DB_PASSWORD=8n65f%6n5
|
⇒ envsubst ⇒ | # mediawiki-manager.yml
...
containers:
- image: docker.io/dataspects/mediawiki:1.35.0-2104121740
name: mediawiki
env:
- name: WG_DB_PASSWORD
value: 8n65f%6n5
- ...
...
|
⇒ | # Localsettings.php
$wgDBpassword = getenv("WG_DB_PASSWORD");
|
Config database
<?php
# addToMWMSQLite.php
$name = $argv[1];
$localsettingsdirectives = $argv[2];
$db = new SQLite3('mwmconfigdb.sqlite');
$stmt = $db->prepare('INSERT INTO extensions (name, localsettingsdirectives) VALUES ( :name, :localsettingsdirectives)');
$stmt->bindValue(':name', $name, SQLITE3_TEXT);
$stmt->bindValue(':localsettingsdirectives', $localsettingsdirectives, SQLITE3_TEXT);
$stmt->execute();
|
⇒ | <?php
# updateMWMLocalSettings.php
$db = new SQLite3('mwmconfigdb.sqlite');
$stmt = $db->prepare('SELECT localsettingsdirectives FROM extensions');
$result = $stmt->execute();
$mwmLocalSettingsString = "";
while($res = $result->fetchArray(SQLITE3_ASSOC)){
$mwmLocalSettingsString .= trim($res["localsettingsdirectives"])."\n";
}
$mwmLS = fopen("mwmLocalSettings.php", "w");
fwrite($mwmLS, "<?php\n".$mwmLocalSettingsString);
fclose($mwmLS);
|
⇒ | # Localsettings.php
$mwmls = "../mwmLocalSettings.php";
# MWStake MediaWiki Manager
if(file_exists($mwmls)) {
require_once($mwmls);
} else {
echo "ERROR: ".$mwmls." include not loaded.";
}
|
Target User Groups
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)
- Favored path: Kubernetes-based only for mwmITLocal, mwmITIntra and mwmITCloud
Where | How | Why |
---|---|---|
mwmITLocal: locally on a single computer | containerized | for personal/private/development use |
mwmITIntra: in an intranet |
containerized |
for corporate internal use |
mwmITCloud: on the internet/in the cloud | containerized | for corporate internal/external/public use |
Install/enable/disable/upgrade/configure extensions
MWStake MediaWiki Manager/MWStakeServices/ExtensionsCatalog
Backup/restore/clone/compare/consolidate system(s) (snapshots)
Inject/extract/facet/edit/consolidate/import/export/remove apps/structures/ontologies
CLI (Bash)
https://github.com/dataspects/mediawiki-manager/tree/main/cli/manage-content
Scripting
CLI (Bash)
https://github.com/dataspects/mediawiki-manager/blob/main/cli/manage-extensions/tests.sh
Package system(s)
MWStake MWM Service Portfolio
MWStake_MediaWiki_Manager/MWStakeServices
Abstraction Layers
ALcontainerization: Podman
- The mediawiki container image contains a full MediaWiki installation.
- initialize-persistent-mediawiki-service-volumes.sh will copy persistence-relevant files/directories out to the host so they can be volumed in when starting the mediawiki container.
ALcli: shell scripts using MWAPI and CRUDing files in service volumes
ALapi: MWM API wrapping and parametrizing ALcli shell scripts and using MWAPI
Unit Testing
ALui: MWM UI using and parametrizing ALapi endpoints
Integration Testing
Development Broadcasting
There are videos about MWStake MWM at dataspects' YouTube channel.