Spiga
Showing posts with label FreeBSD. Show all posts
Showing posts with label FreeBSD. Show all posts

Zenoss on Fedora 8

I've wasted 1.5 day trying to get zenoss from their RPM to run on my F8 laptop using compat-python24 from livna. I've tried lots of ways like recompiling, export PYTHON and PYTHONPATH env variables etc but without much luck. I solved it just now after looking into the python files and noticed that they are all hardcoded with /usr/bin/python instead of /usr/bin/env python. There are even some that uses /opt/zenoss/bin/python. Here's my little hackfix to make zenoss starts cleanly.

Before running this, I recommend existing zenoss install to be removed, rm -rf /opt/zenoss, and reinstall it clean.


#!/bin/sh

ZENOSS_DIR="/opt/zenoss"
PYTHON="/usr/bin/python2.4"
cd $ZENOSS_DIR

find . -type f -exec sed -i "s|/usr/bin/python|${ZENOSS_DIR}/bin/python|g" '{}' ';'

cd $ZENOSS_DIR/bin
rm python
ln -s $PYTHON python


A little description about the above script. It simply change all /usr/bin/python to /opt/zenoss/bin/python and replace the symlink /opt/zenoss/bin/python to point to /usr/bin/python2.4

Now Zenoss can be started using /sbin/service zenoss start.

Happy that I have a test instance now, time to figure out how to install it on freebsd qemu. >.<

IOSN Accessibility Workshop for the Visually Impaired

Yesterday, I joined Khairil Yusof (Kaeru) for IOSN Accessibility Workshop for the Visually Impaired at Malaysian Association for the Blind, KL. It was organized under Free/Open Source Software Society of Malaysia (FOSS-SM) and United Nation's International Open Source Network (IOSN)

I'm still waiting for Kaeru to post a blog about it as he has the most details. But here's my part of the story.

It was very interesting to be there where we actually get first hand information about the blind's concerns about accessible websites and softwares, income opportunities, technical skills, etc. There are blinds who have a high technical capability but their talent are ignored due to their condition.

Orca works great too, though we haven't field test it yet. The GNOME HIG helps for making applications accessible and that is great. However, as usual, the voices are monotonous. It would be great if we can have clearer and nicer voices.

I tested their braille monitor too on my Fedora laptop. At first it couldn't work, but after a little googling I was pointed to brltty, a tty viewer to braille monitors. Brltty, on text-only linux, works very great!. It's very interesting seeing that Fazlin (one of the blind person who attend the workshop) can explore the shell , as perfect as a sighted person, using the braille monitor!. Kaeru and I was quite excited seeing a great opportunity for them to try to get some income as linux/unix sysadmins or open source developers. Its hard nowadays to find people who appreciate the shell even from the sighted - I blame Windows for that - and seeing how the blinds can benefit from the shell, it made us quite excited and happy. If they can try taking LPI and pass it, I don't see any reason why they couldn't find income from it.

However, I couldn't get the braille monitor to work with Orca, I've launched brltty, yum'ed for brlapi, python-brlapi, Pyrex, configured Orca to use braille output, but still, it could not print the braille characters. The braile monitor printed something on but Fazlin said that it printed (I don't remember the exact sentence) "Terminal is not in text mode". Do anybody know what I missed? Anybody know how to fix this and make stuff works?.

FOSS-SM will continue to work with MAB for this research and try to help the visually impaired to have similar, if not same, opportunities for them in accessing information and knowledge easily , finding employment and income opportunities in the ICT world, help them lead a better life and on the same time, spreading the love of Free/Open Source Software throughout Malaysia and the world. I am looking forward for the next meetup for this project and see how I myself can try utilizing and improving stuff for them and maybe push some stuff back to Fedora upstream (Docs, guide, packages, custom tools etc).

p/s: Kaeru want ubuntu for them, I want fedora for them :P - at least theres already one Fedora spin for the visually impaired - SpeakupModified

Automated tar and dump incremental backup script for FBSD

The recent gmirror failure on Gambit caused us to switch to automated dump and tar instead.

Our requirement was like this: Full backup on Mondays (around 3-5am) with daily incremental backups relative to the Monday backup. Whenever a full backup is being performed, the previous backups must not be overwritten until the full backup is done.

And the results::

inigo-tarball-backups.sh - an incremental tar backup script using FreeBSD's Tar

inigo-disk-dumps.sh - an incremental live dump script using FreeBSD's Dump - now, I wish Linux's Dump have live dump support.

gnu-tar-incremental-backup.sh - an incremental tar backup script using GNU's Tar - I wrote this before the FreeBSD's Tar script on my Fedora laptop, but was surprised that FreeBSD's Tar doesn't have --listed-incremental option (-_-)".


For the scheduling, I just use cron.

Do inform me if you have suggestions to improve the scripts or if you found any risky bug it in.

update: Anybody knows how to properly tar a live directory? (eg: /var/log/).

A month with FreeBSD, Zope and Plone

For the past month, I have been working as an intern at Inigo Tech. The company focuses on Zope and Plone deployment and customization and I'm the sysadmin of the company server.

FreeBSD

The company server uses FreeBSD as the OS with several BSD Jails on top of it. BSD Jails is one of the virtualization technology on the OS level. Unlike Xen, Qemu and VirtualBox, Jails is a very lightweight virtualization where the Guest environment does not run any kernel on it. While Xen, Qemu and VirtualBox allows different OSes running as Guest, Jails can only support another BSD installations.

I found that Jails is very useful for those who only needs better process and environment separation and doesn't need another full blown OS features. Interested to know what available on the Linux world for this, I went googling and found the Linux-Vserver Project and the OpenVZ Project. However, the RPM packages provided by both of them (especially the kernel) are quite not in sync with the current Fedora repositories. So, if anybody thinking of trying them out, I would recommend installing on CentOS or a Debian derivative instead as the packages does not being updated as fast as Fedora. Btw, if anybody successfully deployed a OpenVZ guest, can you post me an easy to follow guide??. As I'm quite confused with the OpenVZ documentations (the templates etc).

But so far, I think thats the only thing I liked from the BSD world. Everything else, are kindof PITA and not elegant in my point of view. Perhaps because I have been pampered by RPM way too much. Ports, while have quite a large collection of packages, is not as elegant as RPM or DEB in package management. If only for installation and removal of packages, Ports works quite well, but if I want to do extra stuff to the installed files, everything went messy. Dependency hell, I dont know how many times i've faced that in Ports. Updating and removing packages feels quite scary when it might causes another app, hidden somewhere, to have a library problem. For the filesystem hierarchy and file placements, is another messy thing as trying to separate stuff that maintained by package manager and stuff that are done by local user is not as clear as in RPM distros. But for this, I might be biased as I come from the Red Hat Linux / Fedora Linux origins and still not that experienced in BSD. Perhaps after exploring and learning more about the BSD way of doing stuff, I might change my opinion on this.

Zope and Plone

In Inigo Tech, I was introduced for the first time to Zope and Plone. I have heard about it before, and followed the debate on Fedora mailing list about why Fedora 7 could not support Zope and Plone due to Python2.5, but I had never tried using it firsthand. What I know about during that time Zope was that its something like Tomcat but in Python, with Plone as one of the most popular app running on Zope.

After this whole month of using Zope and Plone, I grown to like it and the ideas it brought together. I have been a fan of proper separation of services and environments since I learned about virtualization. So, I feel Zope is a great platform. A virtual filesystem on an ORDB? Cool!. Full separation of the web environment and the host server? Great!. Using Instances instead of a full copy of files? Yay!. Plugins architechture, of which different instances can have different set of Plugins? Superb!. All in all, I love Zope, except for maybe, the ZMI which looks kind of cluttered, but looks good or not is a matter of who looking at it :).

As for Plone, Inigo sees it as an alternative to Microsoft SharePoint. As I had never tried out SharePoint, I couldn't comment much about their differences/similarities. But one thing I know, Plone offers more features that SharePoint in term of document management and sharing, Plone is easier to use than SharePoint, Plone can work nicely with commodity softwares while SharePoint requires you to upgrade to IE7, Vista, Office 2007 etc, and best of all, Plone is Free! and SharePoint is dictated by Microsoft (>.<) . So, that makes it Plone is better than SharePoint right? So if your company want to buy SharePoint, how about you look at Plone first before deciding ;).

======

All in all, working with Inigo is fun with all these. I'm glad I took Kaeru's offer and not other internship offers with other companies. Plus, I got to telecommute. Saved some hassle of transportation, food, etc :D