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 hewiktionary.

Step 1: Create the wiki

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

$ mwscript extensions/WikimediaMaintenance/addWiki.php --wiki=aawiki \
    he wiktionary hewiktionary he.wiktionary.beta.wmflabs.org
Creating database hewiktionary for he.wiktionary (עברית)
Initialising tables
Initialising external storage cluster1...
Initialising external storage flow_cluster1...
Writing main page to עמוד_ראשי
Writing sidebar donate link to MediaWiki:Sitesupport-url
content index...
        Fetching Elasticsearch version...2.3.5...ok
        Scanning available plugins...
                analysis-icu, experimental-highlighter, extra, swift-repository
        Inferring index identifier...hewiktionary_content_first
        Picking analyzer...default
        Creating index...ok
                Validating number of shards...ok
                Validating replica range...ok
                Validating shard allocation settings...done
                Validating max shards per node...ok
        Validating analyzers...ok
        Validating mappings...
                Validating mapping...different...corrected
        Validating cache warmers...
        Validating aliases...
                Validating hewiktionary_content alias...alias is free...corrected
                Validating hewiktionary alias...alias not already assigned to this index...corrected
                Updating tracking indexes...done
general index...
        Fetching Elasticsearch version...2.3.5...ok
        Scanning available plugins...
                analysis-icu, experimental-highlighter, extra, swift-repository
        Inferring index identifier...hewiktionary_general_first
        Picking analyzer...default
        Creating index...ok
                Validating number of shards...ok
                Validating replica range...ok
                Validating shard allocation settings...done
                Validating max shards per node...ok
        Validating analyzers...ok
        Validating mappings...
                Validating mapping...different...corrected
        Validating cache warmers...
        Validating aliases...
                Validating hewiktionary_general alias...alias is free...corrected
                Validating hewiktionary alias...alias not already assigned to this index...corrected
                Updating tracking indexes...done
                Deleting namespaces...done
                Indexing namespaces...done
done.
Making sure mwstore://local-multiwrite/local-public exists...making 'mwstore://local-multiwrite/local-public' public...done.
Making sure mwstore://local-multiwrite/local-thumb exists...making 'mwstore://local-multiwrite/local-thumb' public...done.
Making sure mwstore://local-multiwrite/local-transcoded exists...making 'mwstore://local-multiwrite/local-transcoded' public...done.
Making sure mwstore://local-multiwrite/local-temp exists...making 'mwstore://local-multiwrite/local-temp' private...done.
Making sure mwstore://local-multiwrite/local-deleted exists...making 'mwstore://local-multiwrite/local-deleted' private...done.
Making sure mwstore://local-multiwrite/timeline-render exists...making 'mwstore://local-multiwrite/timeline-render' public...done.
Done. sync the config as in https://wikitech.wikimedia.org/wiki/Add_a_wiki#MediaWiki_configuration

Step 2: 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 deployment host (deployment-tin.deployment-prep.eqiad.wmflabs) and verify the change got properly deployed by changing to /srv/mediawiki-staging looking at git log or using mwscript eval.php testwiki

Step 4: Configure RESTBase

In operations/puppet.git add an entry in modules/restbase/templates/config.labs.yaml.erb. After the change is merged, it will deployed in the next RESTBase deploy cycle, which usually happens 1-2 times per week. If you need change visible ASAP, please ping mobrovac or Pchelolo in #wikimedia-services.