forked from wikimedia/operations-mediawiki-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
104 lines (72 loc) · 2.83 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
operations/mediawiki-config.git
-------------------------------
Files in this repository are almost a mirror of the Wikimedia Foundation
cluster configuration. Omitted files include passwords and security measures.
*.dblist
List of databases. To vary by realm (e.g. 'production', 'labs'), add the realm
as a suffix before the extension, separated with a dash. Example:
"all-labs.dblist".
wikiversions.json, wikiversions.cdb
wikiversions-labs.json, wikiversions-labs.cdb
Let us associate a database with a specific copy of MediaWiki (generally a
branch). The .cdb file is updated by editing wikiversions.json first and then
running multiversion/refreshWikiversionsCDB. To vary by realm, add a suffix
before the extension, e.g. "wikiversions-labs.json".
docroot/
The Apache document root for several of our VirtualHosts.
images/
Shared pictures for the unified login system.
w/
The "w/" directory in the docroot of any MediaWiki-serving VirtualHost.
tests/
Hold some PHPUnit tests.
wmf-config/
The MediaWiki configuration for all database. Think of it like a huge
LocalSettings.php.
wmf-config/CommonSettings.php
Generic configuration such as including extensions or calling over piece
of configuration. This is mostly shared among all wikis.
wmf-config/InitialiseSettings.php
Per wiki configuration.
wmf-config/db.php
Databases related configuration.
wmf-config/mc.php
Memcached configuration.
wmf-config/*-labs.php
Files used by the beta cluster to override production settings.
By using getRealmSpecificFilename(), from multiversion/MWRealm.php, one can
have configuration loaded depending on the realm or the datacenter the file is
executed on. The function will test out several file suffixes and return the
filename of the first match. The detection order is:
- realm datacenter
- realm
- datacenter
Falling back to the filename given as argument.
Example, per datacenter:
Given the files:
- mc-pmtpa.php
- mc.php
The call to getRealmSpecificFilename( 'mc.php' ) will return:
- on pmtpa: mc-pmtpa.php
- on any other datacenter (e.g. eqiad): mc.php
Example per realm with a non php file extension:
Given the files
- db-production.log
- db-labs.log
The call to getRealmSpecificFilename( 'db.log' ) will return:
- in a labs instance: 'db-labs.log'
- on a production server: 'db-production.log'
A more complicated example:
Given the files:
- log-production.php
- log-eqiad.php
- log.php
The call to getRealmSpecificFilename( 'log.php' ) will return:
- in labs eqiad: 'log-eqiad.php'
- in labs pmtpa: 'log.php'
- in production pmtpa: 'log-production.php'
- in production eqiad: 'log-production.php'
The last case is because the realm takes precedence over the datacenter.
You can also use a realm/datacenter suffix:
'log-production-eqiad.php'.
You can find more examples in tests/multiversion/MWRealmTest.php.