Page MenuHomeDevCentral

Provide configuration for wikis
ClosedPublic

Authored by dereckson on Mar 18 2018, 02:41.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 01:36
Unknown Object (File)
Tue, Nov 26, 01:36
Unknown Object (File)
Tue, Nov 26, 01:35
Unknown Object (File)
Tue, Nov 26, 01:35
Unknown Object (File)
Tue, Nov 26, 01:35
Unknown Object (File)
Tue, Nov 26, 01:35
Unknown Object (File)
Tue, Nov 26, 01:35
Unknown Object (File)
Tue, Nov 26, 01:35
Subscribers
None

Details

Summary

Prepare the MediaWiki configuration for every wiki of the farm.

This service responsibility is to resolve host to a specific database
and set of configuration and populate the relevant MediaWiki configuration.

This acts as the SaaS MediaWiki entry point.

Ref T845

Test Plan
  • Ensure $wgConf is coherent
  • Check we've a wiki up in root URL scheme (agora)
  • Check we've a wiki up in wiki URL scheme (wolfplex)

Diff Detail

Repository
rSAASMW SaaS MediaWiki
Lint
No Lint Coverage
Unit
No Test Coverage
Branch
master
Build Status
Buildable 2267
Build 2515: arc lint + arc unit

Event Timeline

dereckson created this revision.
dereckson added inline comments.
LocalSettings.php
3

So, if we're called by another entrypoint than index.php, we should also construct an instance of the Service class.

config/CommonSettings.php
14

We could also create a directory with rules like this.

That would allow to use autodiscovery listing this directory.

Each rule would be a class extending BaseCommonSetting.

33

Exception class to prepare.

config/Instances.php
17

I've registered wolfplex.org back.

Perhaps .org is a better canonical?

config/Settings.php
15

ToMapSettings?

42

agora too is a /$1

44

That's important to set even when the uploads are disabled, e.g. if a wiki wants to do stuff like TeX maths.

70

We should triple check all wikis are CC-BY.

98

Set wgInstantCommons at true, it's used on every wiki I think.

index.php
10

This part should be moved to a service.php, so it can be require_once when needed, here (entry point is index.php) or in LocalSettings.php (other entry points).

src/InstancesRepository.php
33

Exception class to prepare

src/Service.php
37

To prepare.

52

Override isExisting:

try
    Instances::getDatabaseFromHost($this->host)
    return true
catch InstanceNotFoundException
    return false
  • add exceptions classes
  • code review and proofreading
  • 502 error
  • instructions to setup a new wiki
  • document through PHPDoc when an exception is thrown
This comment was removed by dereckson.

Move library code to saas-service repository (see D1443)

Switch dotenv to dev-master so we can use safeLoad if .env is absent. Fix syntax errors in Service class.

dereckson marked 6 inline comments as done and an inline comment as not done.

Still a work in progress, I'm currently reviewing settings.

Use nasqueron/saas-service (rSAASSVC) Composer package, use / instead of /w to simplify nginx configuration, override group permissions.

Looks good from PHP internal server perspective.

Next step is to test from nginx.

Scribunto, Wolfplex namespaces

wgArticlePath, CLI tool to get the host

This revision is now accepted and ready to land.Mar 21 2018, 23:13

Handle /wiki /w URL scheme. Deploy ParserFunctions extension.

dereckson retitled this revision from WIP: Provide configuration for Ysul wikis to Provide configuration for wikis.
dereckson edited the summary of this revision. (Show Details)
dereckson edited the test plan for this revision. (Show Details)

Ready for a first beta.

Will need refactoring to get rid of most the /config part as PHP code.

This revision was automatically updated to reflect the committed changes.