Ansible role for MediaWiki
Go to file
Jakub Sokołowski c454e22c13
add Ansible role metadata
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-09-25 15:09:26 +02:00
defaults add files from infra-office repo 2024-09-25 14:58:11 +02:00
meta add Ansible role metadata 2024-09-25 15:09:26 +02:00
tasks add files from infra-office repo 2024-09-25 14:58:11 +02:00
templates add files from infra-office repo 2024-09-25 14:58:11 +02:00
vars add files from infra-office repo 2024-09-25 14:58:11 +02:00
README.md add files from infra-office repo 2024-09-25 14:58:11 +02:00

README.md

Description

This role deploys and instance of MediaWiki, which is a collaborative editing software written in PHP.

Configuration

A bare minimum configuration would include:

mediawiki_domain: 'wiki.example.org'
mediawiki_email: 'devops@example.org'
mediawiki_sitename: 'Logos'
mediawiki_bitnami_debug: false
mediawiki_admin_username: 'admin'
mediawiki_admin_password: 'super-secret-admin-password'
mediawiki_db_pass: 'super-secret-db-password'
mediawiki_secret_key:  'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
mediawiki_upgrade_key: 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'

You should also configure email sending:

mediawiki_smtp_enabled: true
mediawiki_smtp_host: 'smtp.example.org'
mediawiki_smtp_port: 587
mediawiki_smtp_user: 'username'
mediawiki_smtp_password: 'super-secret-password'

In addition custom skinds and assets are installed using:

mediawiki_skin_repo_url: 'https://github.com/example-org/mediawiki-skin.git'

Unfortunately this does not support an actual skin repo but instead assumes the repo contains a folders called Vector, languages and resources. This of course makes absolutely no sense, but it is what it is.

Management

Service

Deployment and management is done using Docker Compose:

admin@node-01.do-ams3.wiki.logos:/docker/mediawiki % docker-compose ps
    Name                   Command                  State                      Ports
---------------------------------------------------------------------------------------------------
mediawiki-app   /opt/bitnami/scripts/media ...   Up             0.0.0.0:8080->8080/tcp, 8443/tcp
mediawiki-db    docker-entrypoint.sh --per ...   Up (healthy)   127.0.0.1:3306->3306/tcp, 33060/tcp

Users

Two plugins have been installed to manage users: and

They make available two special pages under:

Known Issues

The initialization scripts in bitnami Docker image do not run install.php if any volumes under /bitnami/mediawiki are mounted. For that reason we do not add the volumes at first startup, and allow the bootstrapping process - especially database schema creation - to run. Once that is done we can create and mount our own config and skins.

Links