You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org

Nova Resource:Deployment-prep/Add a wiki: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>Mobrovac
m (→‎Step 5: Configure RESTBase: Clarify the deployment procedure for RESTBase patches.)
imported>Urbanecm
(→‎Step 3: Configure Parsoid: parsoid doesn't need to be manually configured anymore)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This guide describes how to add a new wiki project on the beta cluster. This is based on adding a project named <tt>hewiktionary</tt>.
This guide describes how to add a new wiki project on the beta cluster. This is based on adding a project named <tt>hewiktionary</tt>.


== Step 1: Add the wiki to the TLS certificate ==
== Step 1: Create the wiki ==
 
Edit [[Hiera:Deployment-prep/host/deployment-cache-text04]] to add the new domains (including the mobile variant).  See an [https://wikitech.wikimedia.org/w/index.php?title=Hiera:Deployment-prep/host/deployment-cache-text04&diff=1615279&oldid=977981 example] (Wikipedias also get .zero.wikipedia.beta.wmflabs.org in addition to .m.wikipedia.beta.wmflabs.org).  This will cause the TLS certificate to be automatically regenerated.
 
== Step 2: Create the wiki ==


Now create the wiki using the WikimediaMaintenance 'addWiki.php' script:
Now create the wiki using the WikimediaMaintenance 'addWiki.php' script:
Line 68: Line 64:
Done. sync the config as in https://wikitech.wikimedia.org/wiki/Add_a_wiki#MediaWiki_configuration</pre>
Done. sync the config as in https://wikitech.wikimedia.org/wiki/Add_a_wiki#MediaWiki_configuration</pre>


== Step 3: Prepare MediaWiki configuration ==
== Step 2: Prepare MediaWiki configuration ==


Edit the configuration files in {{Git repo|operations/mediawiki-config.git}}. You need to add entries in <tt>dblists/all-labs.dblist</tt>, <tt>wikiversions-labs.json</tt> and (optionally, if the wiki won't be covered by any existing entry) <code>$wgCentralAuthAutoLoginWikis</code> in <tt>CommonSettings.php</tt> (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).
Edit the configuration files in {{Git repo|operations/mediawiki-config.git}}. You need to add entries in <tt>dblists/all-labs.dblist</tt>, <tt>wikiversions-labs.json</tt> and (optionally, if the wiki won't be covered by any existing entry) <code>$wgCentralAuthAutoLoginWikis</code> in <tt>CommonSettings.php</tt> (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 <tt>git log</tt> or using <tt>mwscript eval.php deploymentwiki</tt>
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 <tt>git log</tt> or using <tt>mwscript eval.php testwiki</tt>
 
== Step 4: Configure Parsoid ==
 
In <tt>mediawiki/services/parsoid/deploy.git</tt> add an entry in <tt>conf/wmf/betalabs.localsettings.js</tt>. It will be deployed when the change is merged.
 
Most sites will automatically be picked up from the site matrix.


== Step 5: Configure RESTBase ==
== Step 4: Configure RESTBase ==


In <tt>operations/puppet.git</tt> add an entry in  <tt>modules/restbase/templates/config.labs.yaml.erb</tt>. 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 <tt>mobrovac</tt> or <tt>Pchelolo</tt> in <tt>#wikimedia-services</tt>.
In <tt>operations/puppet.git</tt> add an entry in  <tt>modules/restbase/templates/config.labs.yaml.erb</tt>. 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 <tt>mobrovac</tt> or <tt>Pchelolo</tt> in <tt>#wikimedia-services</tt>.

Latest revision as of 12:32, 15 December 2020

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.