One of our customers wants me to document our application in MediaWiki. I’m not too big into working remotely, especially not when I’m working with a tool that’s new to me. So I thought by myself, it would be nice to install MediaWiki on my desktop PC.
But… the installation manual is such a big book!
Easier said than done. You need an Apache, you need PHP with a couple of plugins, you need a database and I’ve read something about installing Ruby. I didn’t want to install all this stuff on my computer just to run a short-lived experiment.
Vagrant to the rescue. Last week I reported about a couple of tools that are popular in the Continuous Delivery community. The main goal of these tools is to automate the installation process of complex software. Now if someone already had taken the trouble to prepare a vagrant box… Bingo! A quick internet search revealed a vagrant box, and guess what? I found it on the MediaWiki homepage. Clearly a good sign.
I already had installed a virtual machine – VirtualBox – and Vagrant on my machine. So all I had to do was to clone a GitHub repository, run a setup.bat file and start MediaWiki by typing “Vagrant up” on the command line. The first start takes a lot of time (maybe half an hour if you’re on a fast network), but it runs unattended. When I returned from my jogging trail, MediaWiki was up and running.
The nice thing about it is, that all the gory details of the installation are sandboxed in a single directory on your hard disk.1 There’s hardly any risk of running into compatibility problems with the software you already have. Plus, you can reinstall your MediaWiki installation by simply calling “Vagrant destroy” and “Vagrant up” consecutively.
- A co-worker of mine told me that this is not exactly true. There are at least two directories: the vagrant folder and the virtual machine. However, the bottom line is that both directories have nothing to do with your operation system. For instance, the sandboxed MediaWiki installation doesn’t register DLLs with your desktop PC’s Windows operation system. ↩