Wednesday, June 02, 2010

Fight with OpenNMS on OpenSolaris

I've tried to install OpenNMS on OpenSolaris from standalone installer (shipped in one single JAR file that you suppose to run). Everything fine (mostly) as long as you follow the instructions, but some ugly things needs to be mentioned:
  • Your JRE is not enough. See, OpenNMS will ask you to install full blown JDK. What for — I have no idea. But that's why we hate most Java developers: they are unable to make cute small things in most cases.
  • Your PostgreSQL will say something rude to the installer and latter will be upset, asking you personal questions. So make sure, in prior to running the installer, you did the following:
    postgres=# create user opennms with password 'opennms';

    postgres=# alter user opennms with password 'opennms';
    ALTER ROLE

    postgres=# create database opennms owner opennms;
    CREATE DATABASE

    postgres=# grant all privileges on database opennms to opennms;
    GRANT
  • You changed your passwords for "opennms" user in DB and also you fixed your trust store where password it "changeit".
Everything else should work, as long as your ports are opened properly. In order to know if something wrong (and it usually is), try to see what's running and what's not by issuing a command:

$OPEN_NMS/bin/opennms -v status

This will list all the processes and will show you the status.

Thursday, May 13, 2010

Cloud vs Grid computing

Folks, enough!
There is no such thing as "versus" and it is not anything that you don't know yet. Grid computing is an engine on a chassis, where cloud computing is a complete car that you drive on. Hence, grid computing is how data is distributed in heterogeneous fashion skipping geographical constraints, while cloud computing is how data is accessed. So the complete product is all these things working together. End of story.
And, yes, it has been around for last 20 years: "The Network Is The Computer", if you still didn't noticed...

Monday, March 29, 2010

DTrace. Quick start.

Here.

OpenSolaris and ISO images

You have an OpenSolaris box and you also want to archive some things on DVD (well, just in case). Here the things everyone on Solaris should know (in case you don't):
  1. First, make an ISO out of the directory that allows full 31 character filenames, instead to truncate them 8.3 format which is compatible with MS-DOS. You also might consider "joliet-long" option in order to allow Joliet filenames to be up to 103 Unicode characters. This breaks the Joliet specs, but appears to work. The following example is just a straight-forward:
    mkisofs -J -l -o foobar.iso /path/to/the/folder
  2. Second, you want to test and verify it. In Solaris, prior to mounting, you should make a block device from the file, first. In this case, lofiadm is your friend in this way:
    pfexec lofiadm -a foobar.iso
    Please note that you will need to escalate a privileges, because it will create a new device in /dev/lofi directory. To know all the list, simply run lofiadm as is. In this example it appears as "/dev/lofi/1" device.
  3. Now is a time to mount the device. Create some directory (e.g. /tmp/foobar) and mount the device (not the .iso file):
    pfexec mount -F hsfs /dev/lofi/1 /tmp/foobar/
    Things looks OK? :)
  4. Un-mount your filesystem and remove mount point to cleanup the mess behind you:
    pfexec umount /tmp/foobar; rmdir /tmp/foobar
  5. Remove block device (same mess):
    pfexec lofiadm -d /dev/lofi/1
  6. I usually don't burn CD/DVD's on a server remotely due to a number of issues with that, but if you like, you can do it. Normally, you want to use "cdrw" on Solaris (SUNWcdrw package in IPS, in case you haven't it installed) like this:
    cdrw -C -i /path/to/your/foobar.iso
    This will also detect automatically you're burning DVD or CD, will check the size and so on.
  7. Probably remove your .iso image as well. :-)
That's was a Solaris way and is slightly different that on a typical Linux box.

Friday, March 26, 2010

Mail.app, show me a plain text!

I hate HTML messages. Especially, when you ask your mates not to send HTML for simple text. They do. You won't shoot em, because you will have to do their job as well (this leads to lack of sleep). So there is other way: force Mail.app display a plain text. Normally, there is no checkbox in Preferences, but Mail.app still "eats" this preference in plist, like this:
<key>PreferPlainText</key>
<true/>
Cool. So we can do this:
defaults write com.apple.mail PreferPlainText -bool TRUE

Now restart Mail.app and you've done.

Monday, February 01, 2010

What 2010 is going to bring us?

I am thinking: is 2010 is a year for epic failures? Project Kenai is going to be closed "for better user experience" which means "no more Kenai for the rest of us", only for those, who pays to the god Oracle goddamn money. And Jobs with his strange not-really-an-iPhone XXL, called iPad — next laptop will be 4x times bigger as well?

Now, recently new NetBeans 6.8 tutor came out — http://netbeans.org/kb/docs/web/hibernate-webapp.html — with a multitude of the code, that results to a simple CRUD. Tendency is ridiculous again: now with embedding parts of query language right into your code. "Brilliant" design! — they welcomed things which they wanted go away from.

Wait, a president elections in my country now happening...

Thursday, January 14, 2010

Bye-bye, Postfix...

Times ago I've dumped Sendmail and replaced with a Postfix. Now, after a while, having a number of requirements that needs to be implemented with something more sophisticated, it is a time to replace Postfix for something better, easier and more flexible.

My choice is now Apache James (http://james.apache.org/).

Tests went fine, things works as expected. Configuration is dull easy, like for those, who see an email server for the first time in their life. Apache James looks pretty good inside (source code), is extensible, has nice plugins and great API to make your own, if you like (that's exactly what I really need). Some folks reports it handles about 3K messages per a minute. I think, that's impressive number, but I don't need such anyways. :-)

The greatest thing of all this story: this particular mail server is a 100% pure Java.