Friday, July 30, 2010

RHQ (Jopr) tab sweep (updated)

So since the last tab sweep I have accumulated quite some links.

First and foremost there is the Release of RHQ 3.0 (final). As we are phasing out the word "Jopr", the Jopr bits are now always included in RHQ.
This release has been reflected in other publications like

RHQ 3 has a new bundle provisioning feature. This article talks about bundle formats and a simple generator to create bundles for deployment by RHQ.
Mazz explains how to deploy in his article provisioning content via RHQ.

Greg Hinkle wrote three articles that talk about the upcoming GWT UI (parts of this are already in RHQ 3 in the bundle provisioning):
New UI technology, Exposing domain objects to GWT and RHQ and customizable dashboards

Joseph Marques has posted a very good in-depth analysis of the GWT compile performance (in RHQ) and shows how to tweak the settings to get the best results.

Tom Jenkins created a video on how to administrate BlackTie via RHQ plugin - the video actually features the admin console in AS 5

Wednesday, July 14, 2010

Simple Bundle generator for RHQ provisioning feature

So in RHQ 3 we've added this cool new provisioning feature.
This allows you to deploy a bundle to a group of platforms or other resources like e..g JBossAS servers.

So what is a bundle? Basically it is some piece of software to be deployed and a matching recipe file. There are two kinds of recipe files: FileTemplateBundle and AntBundle - I'll only talk about the ant-style recipes here.

When I started looking at the bundle UI, I remembered Mazz' great video, but being on the train, I had no access to it. So how do I deploy?
First thing you need to have is either a valid bundle distribution file or at least a valid recipe file.

A bundle distribution file is (by default) a zip file where all entries lie directly in the root directory like this (actually other is possible):

$ unzip -l
Length Date Time Name
-------- ---- ---- ----
1150 07-12-10 16:27 demo.war
948 07-12-10 16:38 deploy.xml
-------- -------
2098 2 files

In the bundle I have demo.war to provision and the deploy.xml file as recipe. Lets have a look at the recipe file:

<?xml version="1.0"?>
<project name="demo" default="main"
<rhq:bundle name="demo" version="1.0"
description="Just some bundle">
description="Who do we greet?"
<rhq:deployment-unit name="war">
<rhq:archive name="demo.war">
<include name="*.jsp"/>
<target name="main"/>

Some of you will see that this is an ant file with some extra tags in the rhq namespace. Lets go through the sections.

First is the boilerplate code that defines an ant project and then
within that we see one bundle denoted by the <rhq:bundle> tag. The bundle has a name of demo and is at version 1.0.

Next there is an <rhq:input-property> tag which defines that the deploy UI should ask for a property which may be used to replace tokens by the users input. This input-property is optional and can show up multiple times.

The most important part is the <rhq:deployment-unit> tag, which defines the content to deploy in its embedded <archive> tag - demo.war in our case. And then we have a <rhq:replace> element embedded in this which defines a standard ant fileset that defines files in which token replacements can occur, like .jsp files in our example.

While this recipe file is not complicated, it still needs some typing, so I started writing a bundle generator, which is in RHQ 4 master in modules/helpers/bundleGen/ (actually you can use that to define bundles for RHQ 3)

Using the bundle generator

$ java -jar bundleGen-4.0.0-SNAPSHOT-jar-with-dependencies.jar
Please give the project name[myProject]:
Please give the bundle name: demoBundle
Please specify the bundle version[1.0]:
Please describe your bundle: Just testing
Please give the name (only) of your bundle content file: demo.war
Please give the directory (only) of your bundle content file: /tmp/
Please give a patten of files to replace templates: *.jsp
Jul 14, 2010 9:24:31 AM org.rhq.helpers.bundleGen.BundleGen createFile
INFO: Trying to generate /var/folders/m9/m9pXAK2WHoyq22G2P9J8L++++TI/-Tmp-//bundleGen/deploy.xml
Jul 14, 2010 9:24:31 AM org.rhq.helpers.bundleGen.BundleGen run
INFO: Your bundle is now ready in [/tmp/]

So this is asking some questions - those with [text] have this text as default, so you can just press return to accept it.

When the generator has finished it prints where you can obtain the created bundle from - /tmp/ in our case.

The generator is far from finished; for example there is no way to specify <rhq:input-property> tags so far.


One interesting detail is the XmlQuestionsReader which takes input from an XML file about the questions to ask. It partially supports internationalization in the form that you can have basename_lang.xml variants of the input, as you can see here. I am not yet exactly happy with this, as there is no fallback to the default version if a question is not defined.

Also there is no way yet to tell that a certain <question> can be repeated to form a List/Set (as it would be needed for the <rhq:input-property> tags).

So please give me feedback and if you want to help improving the generator, you are free to do so.

Friday, July 09, 2010

RHQ 3 released, but where is Jopr ?

So we've released RHQ 3 two days ago -- but what about Jopr? Isn't that supposed to build on top of RHQ? Shouldn't there be a release as well?

Actually we did release Jopr too -- those bits are now (since last September) included in RHQ, so there will be no more separate artifacts or downloads. When you download RHQ, you'll get Jopr too -- so simple :-)

The documentation wiki has full install instructions.

Btw: DZone has a nice article about all the new features, check it out and vote it up. They also have my announcement post online.

Installing OpenSolaris on Parallels Desktop on Mac

To try some things I wanted to install OpenSolaris 2009.6 on Parallels Desktop on my Mac.

Install of OpenSolaris itself went well, but network was not available.
Searching around the net led to
and finally (or English:

But still no avail.

It turned out that the script change is almost complete, but is missing
one additional line. Below "Compiling driver ..." it should read

cd $tmpdir/$driver && /usr/ccs/bin/make install > /dev/null

After this change dladm show-phys shows the interface and ifconfig ni0 plumb is able to use it. After a reboot, networking is working :-)

Wednesday, July 07, 2010

RHQ 3.0.0 final has been released

The RHQ team is proud to announce the immediate availability of RHQ 3.0.0.

This release features several month of hard work by the development team and external contributors. Many of the changes have been already made available in the past through seven community releases.

Highlights of this release are:

  • Pluggable alert senders
  • Provisioning of
  • Improved search capabilities

You can browse the full release notes on the RHQ wiki.

The release can be downloaded via the RHQ web site or directly from SourceForge