Monday, September 25, 2006

mysql-ha alpha-6

I've released alpha-6 of mysql-ha just a few minutes ago.
This release includes a working version of setup_replication.sh, tested only on Fedora Core 5.
This script asks a few questions (mostly passwords and paths) and properly sets up MySQL version 5 replication on the mentioned distribution.

I'm in need of testers willing to invest some time and run the script on different distros, so we can be
as distribution agnostic as possible.

Work will now focus on alpha-7, which will include the takeover/failover mechanisms tested on Fedora Core 5.

Check the release at http://www.seriema-systems.com/mysql-ha/index.php?page=downloads
or just go straight to https://svn.sourceforge.net/svnroot/mysql-ha/trunk/mysql-ha/setup_replication.sh
if you're only interested on testing the script.

Wednesday, September 20, 2006

The media center adventure...

I'm suspending work on mysql-ha until friday, because I need to get some progress on the media center demo machine.

So far, I've tried freevo (great if you want to build a 'black box' machine) and improvements on regular software (like the xmms cdcover plugin).

As usual, my test system is a FC5 box with no tv tuner now, but hopefully a linux-supported pinnacle
board will be on next week.

In order to get freevo running on FC5 you need to:

Configure the repositories

freevo.repo:

[freevo]
name=Freevo RPM Repository for Fedora Core
baseurl=http://freevo.sf.net/fedora/$releasever
gpgkey=http://freevo.sourceforge.net/fedora/tcwan_freevo_key.asc
enabled=1
gpgcheck=0

dries and/or (I'm not sure yet!) freshrpms for dependencies:

[dries]
name=RPMForge: Dries
mirrorlist=http://apt.sw.be/dries/fedora/fc$releasever/mirrors-rpmforge
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY.dries.txt
gpgcheck=0
enabled=1

[freshrpms]
name=RPMForge: Freshrpms
baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms/
mirrorlist=http://ayo.freshrpms.net/fedora/linux/$releasever/mirrors-freshrpms
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-freshrpms
gpgcheck=0
enabled=1

Get freevo

At this point, yum install freevo will work, but it won't get some of the dependencies. To be fair, it
will get anything you need to actually run the thing, but, for instance, if you don't have mplayer or xine, it won't be installed.

Running freevo


For the first time, you need to run freevo setup. This will create a ~/.freevo/freevo.conf file, which you
shouldn't mess around with since it's automatically generated. Instead, if you want to alters freevo's behaviour, you should write a ~/.freevo/local_conf.py file. In fact, you need this file before you can run freevo, with at least a line containing CONFIG_VERSION = 5.15

Now you're ready to run freevo, which can start as an X application, or can be started from a console session with the -fs option, which will start another X session and run freevo on it.

Things I've tried

The audio.coversearch plugin, which uses Amazon's web services (you'll need a developer account, and they're free) in order to fetch the cover of the CD you're currently playing. The downside is you need to press 'e' while listening to the CD to get a menu that will let you fetch the cd cover. I'm working on changing the default behaviour so that the cover is fetched automatically.

The headlines plugin, which I couldn't get to work with google news (other rss feeds worked OK so maybe I'm doing something wrong).

You'll probably need to manually specify the CD-ROM drive(s) by setting the ROM_DRIVES variable in the config file.

Here's my entry, as an example:
ROM_DRIVES = [ ('/media/cdrom', '/dev/hdc', 'CD') ]

If that doesn't look like a typical config setting, take into account that this is a py file after all, so freevo will be configured by running this file through the python interpreter (hence, the file contents must be valid python code).

So far I'm still messing around with it and I still have a lot of work to do, but I like the architecture very much. Python code is easily hackable (I had nice experiences with anaconda in the past) and everything here is written as a plugin, which you can enable/disable at will.

There's a wiki at the freevo site (freevo.sf.net) and it includes documentation on writing your own plugins.

More news on this tomorrow or friday.

Regards,

Monday, September 18, 2006

setup_replication.sh and home media centers

I'm really close to getting serup_replication.sh to run smoothly on FC5. In fact, it already installs with no
errors, but replication doesn't work afterwards.

I'm in big need for testers so if you have a couple of spare boxes (virtual or otherwise) and some minutes, jump to https://svn.sourceforge.net/svnroot/mysql-ha/trunk/mysql-ha/setup_replication.sh and get the
script to run on your system.

If you're on another distro, please test it anyway (you might encounter many path issues but not much more, I hope..). While my current focus is getting it to work on FC5, mysql-ha has traditionally worked on Debian too.

I'm also working hard to get a gnu/linux based home media center for an exhibition coming next month.
The current setup of choice is FC5 (was ubuntu, but I couldn't get freevo to work there) with freevo, and I'll try mythtv too.

I plan to post an entry with detailed installation instructions once I get this thing going.

Tuesday, September 12, 2006

mysql-ha revival

I've started to work on the mysql-ha project once again. This project provides a highly available database server using MySQL.

Right now, I'm working on automating the replication setup process, according to the instructions provided in the 5.0 manual.

Tasks pending for the next release:
  • get a list of the master's databases in order to populate the my.cnf file's replicate-do-db entries
  • backup all files before applying changes made by the script
  • get replication to start automatically after the changes have been applied

While the release is made, you can check out the code from CVS and, soon (at most in 24 hours) from SVN too.

If anyone is willing to test this please comment this post.

Regards,

Sunday, September 10, 2006

Fedora Core on the Presario V2617LA


Recently, I became the happy owner of a Compaq Presario V2000, model V2617LA.
This is a reasonable good notebook, particularly regarding it's price, and my distribution of choice (Fedora Core) installs smoothly on it.

Every device I use works properly under Linux (I haven't checked the modem, and I don't think I'll be doing that anytime soon), with the drivers included in the distro, except for the wireless card, which needs ndiswrapper and the Windows driver.

What's included

The machine comes with Windows XP Home edition, for which I was forced to purchase a license that doesn't even include a CD. You're entitled to a rescue media set, on your choice of CD or DVD, but if you're interested in keeping Windows, take good care of that media because you can only create the set
once.

Fortunately, I wasn't interested in this so I proceeded to boot off the FC5 cdrom and wipe XP out of the hard disk.

Installing Fedora Core

You can just hit enter on the isolinux boot screen, since the setup procedure properly detects and configure the display and video adapter (Proprietary ATI drivers are needed later, in case you want to make use of the board's 3D features).

The installation process is smooth, and includes detection and configuration of the ethernet board.

Once it's over, the screen resolution is set to 800x600, which is awful for the widescreen display.
However, as I said, the board and display are detected properly, so all you have to do is edit /etc/X11/xorg.conf and manually add the 1280x768 and 1024x768 (in case you want it) modes to the Screen section.

In order to get the wireless LAN working, you'll need the windows drivers. These are available from the hp/compaq web site if, just like me, you forget to back it up before wiping out XP (you'll need the
SP31463A exe).

I installed them with wine, which of course failed, but nevertheless uncompressed the files, which was my goal anyway.

Once available, you must install it with ndiswrapper, like this:

ndiswrapper -i bcmwl5.inf # installs the driver with ndiswrapper
ndiswrapper -l # verifies the driver installation process
modprobe ndiswrapper # loads the driver into the kernel
ndiswrapper -m # fixes /etc/modprobe.conf accordingly

You must also blacklist the open source bcm43xx driver, since it doesn't work properly on this board. In order to do this, add the line blacklist bcm43xx to /etc/modprobe.d/blacklists

If you can't connect to your AP, be sure to check that you've physically enabled the wifi card (the button to the left of 'power').

With this problem solved, you can safely say that FC5 is installed on the notebook.

Some issues:
  • pm-hibernate doesn't always detect the LCD-closed event.
  • The wifi card is physically disabled after hibernation and it must be manually turned on.
  • After several 'hibernations', the battery charge is reported wrong (this happened just once).
  • The sempron is configured to low speed even with the power on. I use cpuspeed to fix this.

All in all, the V2617LA is a good notebook for it's price, and runs gnu/linux smoothly and with just one proprietary driver (or two, if you really need 3D video).