Heterogeneous deployment/old

From Wikitech
This page contains historical information. It may be outdated or unreliable.

Below are miscellaneous notes about past implementation of this idea. For the latest information, see Heterogeneous deployment.

Roan's quick&dirty implementation

A q&d implementation of het deploy is currently used to serve 1.17 on test2wiki and will be used to do a partial deployment of 1.17 soon.

What lives where

  • Files for 1.16 live in /home/wmf-deployment/common/wmf-deployment , files for 1.17 live in /home/wikipedia/common/php-1.17
  • The 1.17 tree has a separate set of configuration files in php-1.17/wmf-config
  • The list of wikis on 1.17 is in /home/wikipedia/common/1.17.dblist. Wikis not in this list are on 1.16
  • The magic to switch between 1.16 and 1.17 is in /home/wikipedia/common/live-1.5/MWVersion.php. The original version without any het deploy-related changes has been preserved as MWVersion.php-before-Roan-started-messing-with-it
  • URLs with /w/skins-1.5 and /w/extensions point to the 1.16 tree, /w/skins-1.17 and /w/extensions-1.17 point to the 1.17 tree. 1.17 wikis have $wgStylePath and $wgExtensionAssetsPath set up to point to the latter two
  • On the Apaches, CDB cache for 1.16 lives in /tmp/mw-cache, for 1.17 it's in /tmp/mw-cache-1.17

How to do stuff

  • To update the 1.17 code, simply run svn up in the php-1.17 directory
  • To sync files in the 1.17 tree, use sync-common-file php-1.17/filename (this does not check PHP syntax!)
  • The 1.17 tree will be synced in its entirety when sync-common-all or scap is run, along with many other things
  • To switch a wiki to 1.17 or back to 1.16, add/remove it in /home/wikipedia/common/1.17.dblist and run sync-dblist
    • After downgrading a wiki, run echo '$wgMessageCache->clear();' | php /home/wikipedia/common/wmf-deployment/maintenance/eval.php --wiki=blah to fix an issue with customized messages getting stuck
  • Be careful when running maintenance scripts. The magic switch thing does NOT work for them, so you have to find out which version the relevant wiki is on and run the script from wmf-deployment for 1.16 wikis and from php-1.17 for 1.17 wikis

Notes for future project

Project notes for multiple extension/core version deployment.

Requirements

  • Multiple core versions
  • Multiple extension versions
  • Ability to have at least staging + production

Nice to have

  • A/B testing

Issues:

  • bits: $wgExtensionAssetsPath and $wgStyleSheetPath
  • l10n cache
  • separate $IP, but shared configuration
  • other path elements in configuration that don't use $IP
  • scap pushing multiple versions
  • downgrading
  • (figure out if there are any other shared caches)
  • APC cache size
  • maintenance script location (and other things that might need to be symlinked)

Plan:

  1. Replace scap with wmsync
  2. devise a way to list which sites get which version
  3. tweak MWVersion.php for 'live' (w/) stub scripts to check the above list and divert to appropriate $IP
  4. ...
  5. profit!

(ok....we don't have a full blown plan yet, but we know scap needs work)