Nova Resource:Deployment-prep/Add a wiki

From Wikitech

This guide describes how to add a new wiki project on the beta cluster. This is based on adding a project named loginwiki.

Step 1: prepare MediaWiki configuration

Edit the configuration files in operations/mediawiki-config.git. You need to add entries in dblists/all-labs.dblist, wikiversions-labs.json and (optionally, if the wiki won't be covered by any existing entry) $wgCentralAuthAutoLoginWikis in CommonSettings.php (if you want to enable CentralAuth's auto login), submit and get it merged. Jenkins will deploy the change on the cluster and refresh the compiled list of databases (.cdb files).

Connect on the beta bastion host (deployment-bastion) and verify the change got properly deployed by changing to /srv/mediawiki-staging looking at git log or using mwscript eval.php deploymentwiki

Step 2: Create the wiki

Now create the wiki using the WikimediaMaintenance 'addWiki.php' script:

$ mwscript extensions/WikimediaMaintenance/addWiki.php --wiki=aawiki \
    en wikimedia loginwiki
Creating database loginwiki for en.wikimedia (English)
Initialising tables
Writing main page to Main_Page
Writing sidebar donate link to MediaWiki:Sitesupport-url
Adding to dblists
PHP Notice:  Undefined variable: wmfRealm in /data/project/apache/common-local/wmf-config/db-labs.php on line 5
PHP Notice:  Undefined variable: wgLBFactoryConf in /data/project/apache/common-local/refresh-dblist on line 105
warning: commands will be executed using /bin/sh
job 9 at Mon Jul 22 11:29:00 2013
Script ended. You still have to:
	* Add any required settings in InitialiseSettings.php
	* Run sync-common-all

Step 3: configure Parsoid

In mediawiki/services/parsoid/deploy.git add an entry in conf/wmf/betalabs.localsettings.js. It will be deployed when the change is merged.

Step 4: configure RESTBase

In operations/puppet.git add an entry in modules/restbase/templates/config.labs.yaml.erb. It will be deployed when the change is merged.

TODO: Swift? Wikidata?