Tuesday, April 30, 2013

Apache Karaf 2.2.11 Released!

The Apache Karaf team is pleased to announce the availability of Apache Karaf 2.2.11.

This release of Apache Karaf is based off of the 2.2.x series branch, representing an update to Apache Karaf 2.2.10. It contains bug fixes identified in the prior release, and introduces improvements including; repaired command history, allowing LDAP login module to properly pick up keystore and/or truststore, and a fix for when Karaf scripts contain spaces in paths.


To help make the transition from previous Apache Karaf 2.2.x releases to 2.2.11 easier we've put together a table of changed dependencies which you can view here. For more information please see the release notes.

For those whom have been keeping track, this Karaf release's wine was Bersano Costalunga Barbera D'asti 2008. Which I've not been able to taste as I'm currently on the road on client site. Upon my return I believe that bottle will find itself being served promptly. As to music I enjoyed listening to Rush albums - they're finally inducted into the Rock and Roll hall of fame!

Now that this patch release is out, I can't wait for the up coming 2.3.2, 2.4.0, and 3.0.0 kits - so much OSGi goodness!

Happy developing!

Sunday, April 21, 2013

Apache Karaf update April 14 - 20, 2013

In this Apache Karaf update report you'll find notes on development progress towards Apache Karaf 2.2.11, 2.3.2, 2.4.0, and 3.0.0 as up coming releases. All of the information here is collected from following Karaf's issues mailing list, and cross referencing with the community's issue tracker. The summary form is presented here courtesy of Savoir Technologies to help make keeping up with the community's fast pace a little easier.

Note: These past two weeks there has been concentrated efforts on Karaf Cellar and EIK projects - this weekly update tracks core issues.

Apache Karaf 2.2.11:


New Issues:
N/A

Updated Issues:
N/A

Resolved Issues:
N/A



Apache Karaf 2.3.2:


New Issues:
Karaf-2270 Service wrapper assumes java is on system path
Karaf-2276 SSH public key authentication missing in Karaf 2.3.X

Updated Issues:
N/A

Resolved Issues:
Karaf-2269 Servicemix Specs Activator/OsgiLocator Broken due to KARAF-2136
Karaf-2273 Turn blueprint as synchronous by default

Apache Karaf 2.4.0:



New Issues:
Karaf-2270 Service wrapper assumes java is on system path

Updated Issues:
N/A

Resolved Issues:
Karaf-2269 Servicemix Specs Activator/OsgiLocator Broken due to KARAF-2136
Karaf-2273 Turn blueprint as synchronous by default

Apache Karaf 3.0.0:


New Issues:
Karaf-2270 Service wrapper assumes java is on system path
Karaf-2279 Upgrade to OSGi Core 5.0.0

Updated Issues:
Karaf-2266 Warn and override when feature can not install files
Karaf-2177 Upgrade to Felix Framework 4.2.1
Karaf-576 introduce start-level attribute for feature element in features.xml
Karaf-2247 Upgrade to Equinox 3.8.2.v20130124-134944
Karaf-2240 Incompatible Equinox version

Resolved Issues:
Karaf-2269 Servicemix Specs Activator/OsgiLocator Broken due to KARAF-2136
Karaf-2273 Turn blueprint as synchronous by default

Un-versioned Issues:


Wednesday, April 17, 2013

Learning Apache Karaf

One of the most common challenges I encounter when working with the Apache SOA stack is introducing developers to Apache Karaf and its OSGi underpinnings. Many developers are already familiar with Apache Maven based build systems, and Spring for IoC but trip up when learning about Bundles, Blueprint, Pax Exam, JPA/JTA, modularity and the complexity of dynamic life cycles and their dependencies. To conquer these challenges and help promote confidence in development teams' use of these technologies I'll often spend many hours white boarding samples, and walking through demo code.

These routine sessions prompted Johan Edstrom and I to develop our Instant OSGi Starter book to assist developers pick up the required technologies and methodologies. The book however could only cover so much material, so we embarked upon developing a formal training program to help guide teams through the foundation concepts up to best practices for developing and deploying production systems on Apache Karaf.

Our vision for the training was to provide a hands on environment in which we'd present concepts and immediately follow up with targeted laboratory units designed to re-enforce learning, cementing skills. A full details of the training program can be found here, but for the curious here is an outline of the topics we cover:

Day 1

1) Introduction to OSGi.
2) Lab – Install and configure Apache Felix.
3) OSGi Bundles, the base unit of OSGi modularity.
4) Lab – Bundles.
5) OSGi Life Cycle, fine grain control of software life.
6) Lab – Life Cycle.
7) OSGi Services, inter-bundle services sometimes referred to as “SOA in a JVM”.
8) Lab – Services.
9) Core Services Review.
10) Lab – Core Services.

Day 2

1) Compendium Services Review.
2) Lab – Compendium Services.
3) Whiteboard and Extender Patterns.
4) Lab: Extender Pattern.
5) Bundle Host/Fragment.
6) Lab: Build Bundle Host and Fragment.
7) Aries JPA/JTA.
8) Lab: JPA/JTA.
9) Bundle Testing.
10) Lab: Pax Exam.



Day 3

1) Introduction to Apache Karaf.
2) Lab – Install and configure Apache Karaf.
3) Karaf Consoles.
4) Lab – Console familiarity.
5) Application Logging.
6) Lab – Logging.
7) Provisioning Applications.
8) Lab – Karaf Feature based project.
9) Deploying Applications.
10) Lab – Karaf Deployer.

For more details please feel free to contact us, we're happy to share our years of expertise with your team.

Tuesday, April 16, 2013

Adventure Time! Apache Karaf on Raspberry Pi

I usually work with Apache Karaf on very large systems (dozens of CPU cores, hundreds of Gigabytes of memory, blazingly fast IO subsystems), this project however I've had the pleasure of getting to play with a Raspberry Pi - a small, inexpensive computer which at its heart runs a 700 MHz Low Power ARM1176JZ-F Applications ProcessorCPU with 512MB ram.

Before I dive into the specifics of getting Apache Karaf to run on the Raspberry Pi, lets spend a little bit of time reviewing the base system:

Out of the Box


I ordered from Newark / Element 14 their Raspberry Pi Model B developers kit. Their kit shipped promptly, arriving with the Raspberry Pi Model B system board, miniature USB keyboard, USB mouse, USB powered HUB, AC/DC converter with mini-usb connector, a plastic enclosure, and a 4GB SD card containing a pre-installed copy of Raspbian (a Debian Linux distribution specifically for the Raspberry Pi). The only component I'd have to supply myself was a monitor that supported HMDI or an RCA connection, luckily I have a small LCD TV on hand with the HMDI port.

Assembling the kit took less than 5 minutes. The powered USB HUB wasn't strictly required for this build as the Raspberry has 2 USB ports built in - it is nice however to have the extra ports available to accept other devices such as memory sticks.

  With the miniature computer connected to my TV set I plugged in an ethernet cable, and the unit's power - a few seconds later the configuration screen appeared.

For my project I accepted the default configuration options, enabling the built in SSHD service so that I may operate the machine remotely from my Macbook.

Setting up my environment


To be able to start my Apache Karaf experiments I would have to collect three tools:

  1. A JDK for Raspbian "wheezy" (this version of the OS supports hard floating point - so the regular arm JDK6 and 7 builds won't work).
  2. The latest Apacbe Maven 3.0.x release.
  3. A Subversion client, so I could checkout the latest version of the Karaf 2.3.x code base.

Quickly setting up my environment, I set the machine to compile the Karaf 2.3.1 kit from tags... about an hour later (not bad considering the m2 repo population required) the kit was produced and ready to go!

There was a small hitch in getting the kit to start though. The JVM option "server" was not supported on the JDK 1.8.0-ea kit for ARM. A quick edit of the default java options in the bin/karaf start script to remove that flag resolved the immediate issue.

Issuing commands on Karaf's console worked as I'd expect them too albeit with some delay on more complex commands which is perfectly acceptable given the computer's specs.

AMQ Persistent Messaging - the only disk benchmark that matters ;)


For fun I downloaded Apache ActiveMQ 5.8.0 in order to run it's bundled KahaDB Disk Benchmark utility. The utility's purpose is to provide a guideline on the I/O subsystem performance of the host computer - the sync write statistic being of the most interest under normal operations given their role in persistent messaging. The score of the Raspberry Pi was quite favorable when compared to the Vostro 2420 I review several months ago in regards to sync writes. In all other scores however the stock SD card wasn't nearly as performant.

Returning to Apache Karaf on Raspberry Pi, I'm just starting to really dig into what improvements, bug fixes, and other concerns users would have trying to use the container on this platform. A sensible JVM tuning will not be practical until Java 1.8.0 is in full release, that said setting JVM min and max memory to fit within the Pi's envelope is a given (64 MB of the 512 MB ram is allocated to the frame buffer, leaving little for the OS and JVM). I look forward to other optimizations such as tweaking  garbage collection, perm gen, and stack setting.

This is going to be a fun on going project, be sure to drop back to my blog for updates.

Sunday, April 14, 2013

Apache Karaf update April 7 - 13, 2013

In this Apache Karaf update report you'll find notes on development progress towards Apache Karaf 2.2.11, 2.3.2, 2.4.0, and 3.0.0 as up coming releases. All of the information here is collected from following Karaf's issues mailing list, and cross referencing with the community's issue tracker. The summary form is presented here courtesy of Savoir Technologies to help make keeping up with the community's fast pace a little easier.

Apache Karaf 2.2.11:


New Issues:
N/A

Updated Issues:
N/A

Resolved Issues:
Karaf-2236 karaf scripts fail when paths contain spaces




Apache Karaf 2.3.2:


New Issues:
N/A

Updated Issues:
Karaf-2121 Add Support For Displaying Gogo Commands in Karaf Shell Help

Resolved Issues:
Karaf-2236 karaf scripts fail when paths contain spaces

Apache Karaf 2.4.0:



New Issues:
N/A

Updated Issues:
Karaf-2121 Add Support For Displaying Gogo Commands in Karaf Shell Help

Resolved Issues:
Karaf-2236 karaf scripts fail when paths contain spaces

Apache Karaf 3.0.0:


New Issues:
Karaf-2264 MBean operation errors are not raised correctly
Karaf-2266 Warn and override when feature can not install files

Updated Issues:
Karaf-2240 Incompatible Equinox version
Karaf-2121 Add Support For Displaying Gogo Commands in Karaf Shell Help

Resolved Issues:
Karaf-2257 SCR Component Updates
Karaf-2236 karaf scripts fail when paths contain spaces

Un-versioned Issues:

Karaf-2261 Startup issues without kar file
Karaf-1724 Blueprint bundle deadlocks in "Stopping" status when update-ing/dev:watch bundle
Karaf-2265 org.apache.felix.fileinstall logs to data\cache\.log
Karaf-2125 "Components" tab not shown in WebConsole

Sunday, April 7, 2013

Apache Karaf update March 31 - April 6, 2013

In this Apache Karaf update report you'll find notes on development progress towards Apache Karaf 2.2.11, 2.3.2, 2.4.0, and 3.0.0 as up coming releases. All of the information here is collected from following Karaf's issues mailing list, and cross referencing with the community's issue tracker. The summary form is presented here courtesy of Savoir Technologies to help make keeping up with the community's fast pace a little easier.

Apache Karaf 2.2.11:


New Issues:
Karaf-2258 Release Apache Karaf 2.2.11

Updated Issues:
N/A

Resolved Issues:
N/A




Apache Karaf 2.3.2:


New Issues:
N/A

Updated Issues:
N/A

Resolved Issues:
Karaf-2259 jetty.xml has old RolePrincipal class name
Karaf-2229 Adapt karaf.webconsole package-imports/exports to felix.webconsole all-in-one bundle
Karaf-2234 Thrown Exception in shell commands should be logged as ERROR

Apache Karaf 2.4.0:



New Issues:
N/A

Updated Issues:
N/A

Resolved Issues:
Karaf-2259 jetty.xml has old RolePrincipal class name
Karaf-2229 Adapt karaf.webconsole package-imports/exports to felix.webconsole all-in-one bundle
Karaf-2234 Thrown Exception in shell commands should be logged as ERROR

Apache Karaf 3.0.0:


New Issues:
Karaf-2257 SCR Component Updates

Updated Issues:
Karaf-2240 Incompatible Equinox version

Resolved Issues:
Karaf-2229 Adapt karaf.webconsole package-imports/exports to felix.webconsole all-in-one bundle
Karaf-2234 Thrown Exception in shell commands should be logged as ERROR

Un-versioned Issues:

Karaf-2256 Deadlock when refreshing bundles
Karaf-2260 Overloaded put methord with List comment parameter in InstallKarMojo$CommentProperties