OSGi deployment made easy with FAB

If I had a dollar each time people had a challenge with OSGi deployments ... I could solve the finance crisis in Europe. Okay I am of course exaggerating; but there is a grain of truth in there ;)

So if you are a developer who wants to be productive, and be able to go home on time, and drink beer with your friends, play sports, and generally have fun and be happy ... then read on.

So to understand what FAB is and why it can make your life easier, then I refer you to the following material.

A FAB (Fuse Bundles) is basically a new way of deploying applications into an OSGi container that can make your life a whole lot easier. This technology has been developed by my engineering colleagues at FuseSource and is open sourced at Github, (ASL 2.0 licensed)

Fintan Bolton and his video team have created 2 new excellent introduction videos about FAB.
To go along the videos we have documentation at the Fuse Fabric website. I encourage you to read the material, as its in the minds of James Strachan, who is a driving force behind FAB.
FAB comes out of the box in the new Fuse ESB Enterprise product, however as FAB is open source and freely available, you can use it in general purpose containers such as Apache ServiceMix or Apache Karaf. 

At github there is a number of examples with full source code, that is also provided out of the box with the Fuse ESB Enterprise product. 


Unknown said...

Hi Claus, i have read your "camel in action" book, really like it. May be not the right place to comment/ask this, but not sure how to contact you. I posted a question on stackoverflow, if you get a chance, could you please answer it.


Thank you

jamie said...

OSGi is such a great technology and it has saved our butt in the past. Especially in cases where we need to send quick patches to customers ASAP. We simply send them a simple OSGi bundle (e.g. jar) files.

The issue I had with OSGi was bridging the maven world with OSGi. It became a management nightmare. Now that FABs are available we will be making the switch likely soon.

Pramod said...

Hi Clause,

nice blog on the FAB. This is what i was looking for!. i had a lot of issues in OSGI bundle deployment. i am sure it will be solved now :)

i have one question though!
Can we have profiles using FAB inside fuse fabric? if so how do we achieve this?
the reason why i am asking is i want to control the port on which it runs on and the child containers in Fabric. can you please explain this?

Claus Ibsen said...

Yes you can use FAB in Fuse Profiles. If you use FMC as the web console UI, then it has a nice profile editor where you have a tab for FAB, and you can then add/remove/edit FAB bundles.

Though to define a FAB in a profile its just like any regular OSGi bundle, but you then prefix it with fab:

To control port numbers on child containers. Then this is being improved in JBoss Fuse 6.0/6.1. Though you can specify some profile and/or JVM sustem properties to control this.

As well when you create the fabric you can set some minimum and maximum port ranges etc.

You can check out the fabric web page at: http://fabric.fusesource.org/

And also the Red Hat JBoss Fuse documentation at:

Or get in touch with the fabric project community at: http://fuse.fusesource.org/community.html

Unknown said...

We have got an enterprise application which uses Apache Service Mix for deployment. The application consists of various services and each is created as separate Maven project (bundle).During development, we are actually building each service separately and in-order to deploy it,its being put in the deploy folder. Also, we have to uninstall the bundle from the container(say; karaf) and then install it again from the console to bring the new changes in effect. This is fine during the development phase.

Now we want to deploy the code to an UAT environment (Amazon EC2) for the client to do the testing. We are now confused about how to deploy the bundles to the remote environment. Do we have a standard approach for CI using Jenkins(or some other tool) to automate the build and deploy process , so that someone who has no knowledge about the bundles(SMX) can deploy the code. We are using Github for source code management.

We have searched a lot in this regard and couldn't find any resources which provide some leads/hints on this.