life.i.think -

Virtualization with Xen on Ubuntu
Scribbled on August 18th. 0 comments.

Here at work we’ve started the procedure of running Xen on all of our new servers. If you’re interested in the procedure I’ve gone through to do this, I’ve been cleaning up and maintaining the XenOnUbuntu page of the Ubuntu docs. We evaluated VMWare and Xen, but eventually went with Xen. The reasons for this are:

  • Doesn’t depend on CPU extensions for near-native performance. We do not standardize on one server type, or one processor type for that matter, so we can’t count on having Intel’s VT or AMDs Pacifica instruction sets available. Using Xen, we can use Xen Hypervisor compatible kernels.
  • Real time migration. Xen provides real time migration of VMs with no downtime. With VMWare you must purchase their ESX Server (expensive!) as well as VMotion. They recently released a free version of their server of course (most likely due to pressure from the rise of xen), but this doesn’t support live migrations.
  • OpenSource and related backing. Xen is opensource, and is being backed by major opensource players (no Microsoft jokes here!).

The thing is, I love VMWare. I love their tools. They have web based VM managers, as well as clientside tools for both Gnome and Windows. I love their attitude. They are very OSS friendly ( they released their custom widgets for the Gnome client back to the community). They generally care about virtualization. I really enjoy reading posts from some of their developers, for example Christian Hammond. In our case though, Xen was just a better fit for our needs.

Rumble in the Jungle - The CMS vs The Custom Application
Scribbled on August 17th. 1 comment.

I just stumbled a great read on Disposable Software, the idea being that as RAD (Rapid Application Development) improves (and it is at such an alarming rate!), developers are provided with the opportunity to easily kick out small applications that curtail to a very simple need. This need is often content based, which brings us to Content Management Systems, which I am somewhat adverse to due to the “one size fits all” mentality.

That article was written on August 16, 2005, but it is just now that content oriented Disposable Software is quickly becoming a reality, mostly do to:

  • Dynamic programming languages like Ruby and Python and the respective web frameworks written around them.
  • Modules for these frameworks that allow for easy content management.

With Django (python based), we have the admin interface, but since I’m a Ruby guy, there are a couple plugins on the horizon that look interesting:

I bring this up because I am writing a content based system for a Lexington Community Sustainability project here in town, which aims to help network various community focused efforts here in town (bike lane proponents, greenroof proponents, etc …).

So, do I use a styled Wiki? A CMS? Or an application I’ve written from scratch that uses one of the above additions or just Rails scaffolding to edit basic content? Who wins the bout? In this case, I’ve decided to evaluate the above 3 plugins a bit, with basic scaffolding as a fallback. Regardless, here’s to disposable applications! I’ll post more opinions on the above modules after I’ve played with each a bit.

Migrating SVN and Trac from Ubuntu Breezy to Dapper
Scribbled on August 11th. 0 comments.

There are a couple of packages that get updated when moving to dapper. This may apply to other distro upgrades as well.

Trac

Moving from Breezy to Dapper means an upgrade from sqlite2 to sqlite3. If you are using sqlite to store your trac data, you have to migrate.
sudo apt-get install sqlite sqlite3
cd /var/trac/project/db
mv trac.db trac.db2
sqlite trac.db2 .dump | sqlite3 trac.db
chown www-data:www-data trac.db (or your respective webserver's user)
rm trac.db2

I’ve written a small shell script to automate this for all your trac instances: migrate_trac.sh

SVN

You may get some errors in relation to the upgrade of the Berkely DB (most likely related to the log files). The output I got when running svnadmin recover is this:
Repository lock acquired.
Please wait; recovering the repository may take some time...
svnadmin: DB_RUNRECOVERY: Fatal error, run database recovery
svnadmin: bdb: mbs/db/log.0000000999: log file open failed: No such file or directory
svnadmin: bdb: PANIC: No such file or directory
svnadmin: bdb: DB_ENV->log_put: 999: DB_RUNRECOVERY: Fatal error, run database recovery
So if svnadmin recover isn’t working …
svnadmin list-unused-dblogs ./repository | xargs rm
svnadmin recover ./repository
If you get a message like:
svnadmin: DB_VERSION_MISMATCH: Database environment version mismatch
svnadmin: bdb: Program version 4.3 doesn't match environment version
rm ./repository/db/__db.00*
svnadmin recover ./repository

And of course, if you get permissions errors you must make sure your webserver can access the repository:

chown -R www-data:www-data ./repository