I'm writing to report on progress with Mediawiki-Vagrant, and to tell
you a bit about how it could be useful to you. If you've looked at
MediaWiki-Vagrant in the past and thought, 'big deal -- I know how to
configure MediaWiki', this e-mail is for you.
But first, a small snippet to whet your appetite:
# == Class: role::mobilefrontend
# Configures MobileFrontend, the MediaWiki extension which powers
# Wikimedia mobile sites.
class role::mobilefrontend {
include role::mediawiki
include role::eventlogging
mediawiki::extension { 'MobileFrontend':
settings => {
wgMFForceSecureLogin => false,
wgMFLogEvents => true,
}
}
}
MW-V has evolved to become a highly organized and consistent Puppet
code base for describing MediaWiki development environments. Puppet,
you'll recall, is the same configuration management and software
automation tool that TechOps uses to run the cluster. Puppet provides
a domain-specific language for articulating software configuration in
a declarative way. You tell Puppet what resources are configured on
your machine and what relationships inhere among them, and Puppet
takes your description and executes it.
MW-V uses Puppet to automate the configuration of MediaWiki & related
bits of software. But MW-V goes a bit further, too: it exploits the
flexibility of Puppet's syntax and semantics to give MediaWiki
developers a set of affordances for describing their own development
setup. The description takes the concrete form of a Puppet 'role'.
These can be submitted as patches against the MW-V repo and thus
shared with others. The combination of Vagrant / Puppet / VirtualBox
make it quite easy to select and swap machine roles.
Roles can be toggled by adding or removing a line, 'include
role::<name>', from puppet/manifests/site.pp. The current set of roles
are listed here:
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/vagrant.git;a=blob;f=pupp…
They include a VisualEditor role that is powered by a local Parsoid
instance, and roles for Selenium testing, Echo, MobileFrontend,
GettingStarted, and EventLogging.
If you're interested in checking it out:
0. Delete any old instances.
1. Download & install VirtualBox:
https://www.virtualbox.org/wiki/Downloads
2. Download & instal Vagrant:
http://downloads.vagrantup.com/tags/v1.2.2
3. git clone
https://gerrit.wikimedia.org/r/p/mediawiki/vagrant.git
4. Edit puppet/manifests/site.pp and uncomment the role you want to check out.
5. Run 'vagrant up' from the repository's root directory.
Finally: wait! The first run takes an obnoxiously long time (15-20
minutes). Subsequent runs are much faster (~5 seconds if there are no
major configuration changes.)
The documentation on
MediaWiki.org is still meager, but it is
concentrated here:
http://www.mediawiki.org/wiki/Mediawiki-Vagrant
If you're interested in using MW-V to document and automate your
development setup, get in touch -- I'd be happy to help. I'm 'ori-l'
on IRC, and I'll be at the Amsterdam Hackathon later this month too.
Finally, if you're interested in how this relates to Labs (short
answer: the use-cases are largely complementary), Andrew Bogott and I
have an open submission for a Wikimania talk on this subject:
https://wikimania2013.wikimedia.org/wiki/Submissions/Turnkey_Mediawiki_Test…