MediaWiki SaaS
From Nasqueron Agora
We maintain an up-to-date MediaWiki installation to serve this wiki, and several others.
If you license your content under an open source license like CC-BY, you're welcome to request hosting.
Hosted wikis
The following wikis are hosted on this service:
- https://agora.nasqueron.org/ — this wiki
- https://www.wolfplex.org/wiki/ — Wolfplex Hackerspace wiki
Repositories
- saas-mediawiki: MediaWiki SaaS entry point: contains the wiki configuration and the MediaWiki bootstrap logic
- saas-service: base entry point for SaaS: serves /status requests and contains some base classes
- rOPS: describes the saas-mediawiki role provisioning instructions
How to add a wiki?
- DNS: <your domain> CNAME saas-mediawiki.nasqueron.org
- Send a change to the Operations repository
- nginx: add your server block to the webserver-legacy role, you need to use
include includes/mediawiki-root
to serve /Article pages, orinclude includes/mediawiki-wiki
to serve /wiki/Article pages (useful if you've other services than a wiki on this domain) - data directory: add your canonical host to the pillar/saas/mediawiki.sls file in the mediawiki_datastores section
- nginx: add your server block to the webserver-legacy role, you need to use
- Deploy operations changes with Salt
- Nginx vhost.
salt-call --local state.sls roles/webserver-legacy/nginx
or sometimes saas-mediawiki/nginx instead - Datastores.
salt-call --local state.sls roles/saas-mediawiki/data
- Nginx vhost.
- Declare the dbname/host name pair for the new instance in the configuration
- Create a database
- In every case, GRANT ALL PRIVILEGES on wikis.* TO 'mediawiki-saas'@'localhost';
- If you migrate an existing wiki from its db: mysql yourwiki < dump.sql + mw update yourwiki works well
- If it's a fresh new wiki: mw addWiki yourwiki will create the database and populate the tables
To deploy changes with Salt
How to deploy an extension or a skin?
- Ensure it's available on the service
- If it's hosted on gerrit.wikimedia.org, add it to pillar/saas/mediawiki.sls file in the rOPS repository
- If not, you need to provide custom logic at roles/saas-mediawiki/mediawiki
- Configure it
- Edit the saas-mediawiki config/Settings.php folder, saasUseExtensionFoo will load the Foo extension and saasUseSkinBar will load the bar skin.
- If you need more advanced logic, config/CommonsSettings.php contain a good example for Scribunto
How to run a script against a wiki?
The mw <script to run> <wiki name>
command allow to run a maintenance script to a specific wiki.
For example sudo -u mediawiki mw update agora will run update.php for this wiki.