Friday 20 March 2009

Installng Metavid

As we are developing and testing the Wikiation Installer, we are recreating  relevant configurations. Metavid is the open video archive of the US Congress and the Metavid software will be the basis of video support for MediaWiki. People are interested in learning about these software developments and being able to build such environment is fun.
The metavid profile brought several things to me that were new. There are programs external to MediaWiki, programs that are not part of the LAMP stack that are prerequistites. We do not want to install such programs from within the installer but we do want to be able to test for such prerequistites. At this stage, we do not test for this, we leave this on our "wish list". 
I had to install a SQL script in order to install metavid tables in the MediaWiki database. This was beyond me. Kim helped me out and now I have an example that I can copy. Now that the files install, I also needed a way to know that the files had installed. Michael Dale, the developer of Metavid suggested to use phpmyadmin. This was an attractive suggestion but, it does add to the clutter in what should be a clean environment. 
What to do.. With hindsight the answer was obvious; one of the tests checks if new tables have been added to the database. So eating our own dogfood was in order. The isolation check was revived and indeed tables proved to have been added for Metavid.
I may have done a good job. I do not know as I do not how to test the functionality of this metavid environment
Thanks,
       GerardM

3 comments:

Andrew said...

To run an SQL script against a MediaWiki instance, run php maintenance/sql.php /path/to/script.sql

In the PHP MediaWiki command-line environment (where I hope you are writing your installation scripts if you're being at all sensible), you can also just use dbsource( '/path/to/script.sql' );

GerardM said...

Hoi,
The installer is written in python and bash. Obviously we share the software we develop. Our software is in the Wikimedia SVN.

The choice for python was made before I got involved. In the end it matters little; you can run Python from PHP and vice versa.

The importance of re-building environments is that testing is only relevant when the tests are based on a realistic environment.
Thanks,
GerardM

Bernard said...

The choice of Python was made because it is a very powerful object oriented language. MediaWiki itself is written in PHP and most MediaWiki extensions are also writen in PHP, as everybody knows.
Wikiation_installer it is quite isolated from MediaWiki (versions) and from the (specific) extensions it self. And it should be isolated also.
That is the reason for Python and I still feel that was a good choice.