Orain is a community-driven, not-for-profit wiki network that I help to maintain.

It runs Mediawiki and has been around for the past couple of years. Over the years it has been hosted on VPSs from multiple different providers and its technical layout has changed massively from each provider. Below I will try to summaries it’s current layout! This will include:

  • The machines / VPSs – ( how many there are, what they are doing and why )
  • The management of these – ( using ansible )
  • The configuration of Mediawiki – ( how Orain is running the ‘wikifarm’ )

Hosting

Digital Ocean LogoAll Orain services are currently hosted with DigitalOcean.

Previous to this Orain services have been hosted with Amazon on AWS and on Ramnode.

Everything is currently hosted in the EU although previously things have been hosted in the US.

Machines

The services have always made use of VPSs rather than physical machines.

Currently Orain has 8 instances of varying sizes (either the smallest or second smallest droplets on DO).

  • prod5 – Database server (Contains dbs for centralauth and allthetropeswiki)
  • prod6 – DNS, Nagios & Email
  • prod7 – DNS, Redis, NFS
  • prod8 – Mediawiki webserver
  • prod9 – Mediawiki webserver
  • prod10 – HAProxy Load Balancer
  • prod11 – Mediawiki webserver
  • prod12 – Database server (Contains all dbs other than those contained on prod5)

Currently the below diagram can ‘kind of’ be used to reflect how everything sits together.

A rough map showing Orain instances during April 2015 and how they interact with each other

A rough map showing Orain instances during April 2015 and how they interact with each other.

 

Managment

All instances are controlled use ansible. Our playbook can be found on github.

Managing Orain in this way means that everyone that uses the services can also contribute back into how the service is run easily.

The way in which Orain uses ansible is currently broken, ansible is meant to be run on a single host machine which then ssh’s to all other machines. Currently Orain runs ansible on every machine.

Quick parts of ansible currently run every 10 mins on all machine. Tasks tagged as slow in the playbook are currently executed every hour.

The Orain playbook needs a lot of tidying up, currently the whole playbook gets run over and over again, fixing this would probably mean a big save in performance!

Mediawiki

MediaWiki logoOrain tries to stay up to date with major releases of Mediawiki (and of course security releases). Orain deployed mediawiki from our github fork and thus the tagged version that we are following (currently REL1_24).

Extensions are loaded from the playbook and specifically this file.

All extensions are loaded on the extload wiki in order to be able to rebuild the i18n cache. This also provides us with a single location to check for broken extensions. All traffic to extload wiki is passed to a single MediaWiki webserver meaning log files are easier to track and follow.

To make Orain a ‘Wikifarm’ it uses the CentralAuth and CreateWiki extensions.

FAQ

  • Why are your databases split between 2 smaller servers
    • Currently DO has a very strict set of droplet sizes that can be created. The Databases currently need more space than we could afford if we stuck all dbs on a single host. (Eg. From the $10 plan droplet that contains 30GB disk we would need to switch to the $40 plan in order to double the disk to 60GB).
  • Have you ever thought about moving to dedicated servers?
    • Yes
  • Have you ever thought of moving to a different VPS host? AWS maybe?
    • Yes