You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by Minto van der Sluis <mi...@xup.nl> on 2013/03/04 11:54:58 UTC

Re: Karaf in Clerezza

Hi Reto,

Apologies for the delay, due to a vacation I have been offline for a while.

I decided to go for karaf mainly because I was a newby for both the
karaf and sling way of building a distribution. At the time creating my
own distribution based on karaf seemed more simple. I also fancied the
commandline present in Karaf and the ability to brand it.

Regards,

Minto

Op 22-2-2013 18:59, Reto Bachmann-Gmür schreef:
> Hi Minto
>
> I think checking and ensuring interoperability (in both directions) is a
> great sanity check of the architecture. But my concrete motivation was
> exploring way to have clerezza more modular, to have easy way to install
> optional components (like UIMA or CRIS) and maybe to make the launcher
> slimmer.
>
> On the Karaf list I was asked why we don't use a the Karaf framework in
> Clerezza. I'm not sure what advatages/disadvantatges this would bring. I
> think having an executable jar as launcher is quite important. Also I'm not
> sure how well the security stuff would work together.
>
> What are the reasons for you to use Karaf?
>
> Cheers,
> Reto
>
> On Mon, Feb 11, 2013 at 11:03 PM, Minto van der Sluis <mi...@xup.nl> wrote:
>
>> Hi,
>>
>> What I have done is the reverse (clerezza in karaf) and might be of
>> interest to others:
>>
>> I have created a custom karaf based distribution containing:
>> - clerezza components
>> - stanbol rulestore and ontology manager
>> - karaf cli commands to manipulate stanbol rulestore
>> - custom components of my own
>>
>> For both clerezza and stanbol I created karaf features to only contain
>> components used by me. This however can be easily extended to contain
>> all features. It is still up to the distribution to decide which
>> features to load on startup.
>>
>> If there is any interest please let me know. Then I will ask my client
>> if I can share details with the community.
>>
>> Regards,
>>
>> Minto
>>
>> Op 11-2-2013 21:56, Reto Bachmann-Gmür schreef:
>>> My experiments today.
>>>
>>> Goal: Be able to install Karaf features within clerezza
>>>
>>> Approach: use the service org.apache.karaf.features.FeaturesService
>> provided by
>>> the bundle Apache Karaf :: Features :: Core
>>> (org.apache.karaf.features.core) [1].
>>>
>>> Unfortunately this bundle has quite some dependencies which need to be
>>> satisfied. I've chosen a brute force approach and installed the list
>>> of bundles of the karaf-framework feature. Because of chicken and egg
>>> I can't yet install features. So  I needed the following scala on the
>>> command line:
>>>
>>> import java.net._
>>> val url = new
>> URL("mvn:org.apache.karaf.assemblies.features/standard/2.3.0/xml/features")
>>> val conn = url.openConnection
>>> import xml._
>>> val doc = XML.load(conn.getInputStream)
>>>
>>> for (b <- doc\"feature"\"bundle") {
>>>  val mvnUri = b.text
>>>  try {
>>>  val bundle = bundleContext.installBundle(mvnUri)
>>>  bundle.start()
>>>  } catch {
>>>    case ex => out.println("Exception installing bundle", ex)
>>>  }
>>> }
>>>
>>> The bundle org.apache.karaf.features.core is now satisfied but not
>>> exposing any service. For some reason the blueprint service bundle
>>> wasn't activated, activating it over the webconsole made the service
>>> available. As new packages aren't avaiable on already open shells I
>>> have to reconnect via ssh.
>>>
>>> Now I can access the service:
>>>
>>> zz>val fs = $[org.apache.karaf.features.FeaturesService]
>>> fs: org.apache.karaf.features.FeaturesService =
>>> org.apache.karaf.features.internal.FeaturesServiceImpl@9d8957d
>>> zz>fs.[TAB]
>>> addRepository           asInstanceOf            getFeature
>>>  installFeature          installFeatures         isInstalled
>>>   isInstanceOf            listFeatures
>>> listInstalledFeatures   listRepositories        removeRepository
>>>  restoreRepository       toString                uninstallFeature
>>>   validateRepository
>>> zz>fs.listFeatures
>>> res0: Array[org.apache.karaf.features.Feature] = Array()
>>> zz>fs.listRepositories
>>> res1: Array[org.apache.karaf.features.Repository] = Array()
>>>
>>> The next step will be to add a repository.
>>>
>>> Reto
>>>
>>> 1. Thanks to Krzysztoffor pointing me to this:
>>>
>> http://mail-archives.apache.org/mod_mbox/karaf-user/201302.mbox/%3C2960186.kKK1vM5F7L%40dracula%3E
>>>
>>
>> --
>> ir. ing. Minto van der Sluis
>> Software innovator / renovator
>> Xup BV
>>
>> Mobiel: +31 (0) 626 014541
>>
>>


-- 
ir. ing. Minto van der Sluis
Software innovator / renovator
Xup BV

Mobiel: +31 (0) 626 014541


Re: Karaf in Clerezza

Posted by Reto Bachmann-Gmür <re...@apache.org>.
Hi Minto,

Would be interested to know what other think about this.

I think that it wouldn't be necessary to have all in one file (as unzipping
a zip isn't that hard) but I think that its cool not to require platform
specific launcher scripts. It would be cool to have our jar check the
memory setting and starting a new vm with the required one if needed so
that it is really double-clickable.

Cheers,
Reto

On Fri, Mar 8, 2013 at 8:32 AM, Minto van der Sluis <mi...@xup.nl> wrote:

> Hi Reto,
>
> You've mentioned it a couple of times, but I wonder why is an executable
> jar so important to you?
>
> Regards,
>
> Minto
>
> Op 7-3-2013 18:20, Reto Bachmann-Gmür schreef:
> > Hi Minto
> >
> > Thanks.
> >
> > Yes Clerezza offers no easy and documented way to create custom
> launchers.
> > The disadvantage of Karaf I see is that one has no executable jar. I
> think
> > a good approach would be to have a rather small executable jar and the
> > ability to add features at runtime. That's whey I was experimenting in
> > adding the karaf services for installing features.
> >
> > Reto
> >
> > On Mon, Mar 4, 2013 at 11:54 AM, Minto van der Sluis <mi...@xup.nl>
> wrote:
> >
> >> Hi Reto,
> >>
> >> Apologies for the delay, due to a vacation I have been offline for a
> while.
> >>
> >> I decided to go for karaf mainly because I was a newby for both the
> >> karaf and sling way of building a distribution. At the time creating my
> >> own distribution based on karaf seemed more simple. I also fancied the
> >> commandline present in Karaf and the ability to brand it.
> >>
> >> Regards,
> >>
> >> Minto
> >>
> >> Op 22-2-2013 18:59, Reto Bachmann-Gmür schreef:
> >>> Hi Minto
> >>>
> >>> I think checking and ensuring interoperability (in both directions) is
> a
> >>> great sanity check of the architecture. But my concrete motivation was
> >>> exploring way to have clerezza more modular, to have easy way to
> install
> >>> optional components (like UIMA or CRIS) and maybe to make the launcher
> >>> slimmer.
> >>>
> >>> On the Karaf list I was asked why we don't use a the Karaf framework in
> >>> Clerezza. I'm not sure what advatages/disadvantatges this would bring.
> I
> >>> think having an executable jar as launcher is quite important. Also I'm
> >> not
> >>> sure how well the security stuff would work together.
> >>>
> >>> What are the reasons for you to use Karaf?
> >>>
> >>> Cheers,
> >>> Reto
> >>>
> >>> On Mon, Feb 11, 2013 at 11:03 PM, Minto van der Sluis <mi...@xup.nl>
> >> wrote:
> >>>> Hi,
> >>>>
> >>>> What I have done is the reverse (clerezza in karaf) and might be of
> >>>> interest to others:
> >>>>
> >>>> I have created a custom karaf based distribution containing:
> >>>> - clerezza components
> >>>> - stanbol rulestore and ontology manager
> >>>> - karaf cli commands to manipulate stanbol rulestore
> >>>> - custom components of my own
> >>>>
> >>>> For both clerezza and stanbol I created karaf features to only contain
> >>>> components used by me. This however can be easily extended to contain
> >>>> all features. It is still up to the distribution to decide which
> >>>> features to load on startup.
> >>>>
> >>>> If there is any interest please let me know. Then I will ask my client
> >>>> if I can share details with the community.
> >>>>
> >>>> Regards,
> >>>>
> >>>> Minto
> >>>>
> >>>> Op 11-2-2013 21:56, Reto Bachmann-Gmür schreef:
> >>>>> My experiments today.
> >>>>>
> >>>>> Goal: Be able to install Karaf features within clerezza
> >>>>>
> >>>>> Approach: use the service org.apache.karaf.features.FeaturesService
> >>>> provided by
> >>>>> the bundle Apache Karaf :: Features :: Core
> >>>>> (org.apache.karaf.features.core) [1].
> >>>>>
> >>>>> Unfortunately this bundle has quite some dependencies which need to
> be
> >>>>> satisfied. I've chosen a brute force approach and installed the list
> >>>>> of bundles of the karaf-framework feature. Because of chicken and egg
> >>>>> I can't yet install features. So  I needed the following scala on the
> >>>>> command line:
> >>>>>
> >>>>> import java.net._
> >>>>> val url = new
> >>
> URL("mvn:org.apache.karaf.assemblies.features/standard/2.3.0/xml/features")
> >>>>> val conn = url.openConnection
> >>>>> import xml._
> >>>>> val doc = XML.load(conn.getInputStream)
> >>>>>
> >>>>> for (b <- doc\"feature"\"bundle") {
> >>>>>  val mvnUri = b.text
> >>>>>  try {
> >>>>>  val bundle = bundleContext.installBundle(mvnUri)
> >>>>>  bundle.start()
> >>>>>  } catch {
> >>>>>    case ex => out.println("Exception installing bundle", ex)
> >>>>>  }
> >>>>> }
> >>>>>
> >>>>> The bundle org.apache.karaf.features.core is now satisfied but not
> >>>>> exposing any service. For some reason the blueprint service bundle
> >>>>> wasn't activated, activating it over the webconsole made the service
> >>>>> available. As new packages aren't avaiable on already open shells I
> >>>>> have to reconnect via ssh.
> >>>>>
> >>>>> Now I can access the service:
> >>>>>
> >>>>> zz>val fs = $[org.apache.karaf.features.FeaturesService]
> >>>>> fs: org.apache.karaf.features.FeaturesService =
> >>>>> org.apache.karaf.features.internal.FeaturesServiceImpl@9d8957d
> >>>>> zz>fs.[TAB]
> >>>>> addRepository           asInstanceOf            getFeature
> >>>>>  installFeature          installFeatures         isInstalled
> >>>>>   isInstanceOf            listFeatures
> >>>>> listInstalledFeatures   listRepositories        removeRepository
> >>>>>  restoreRepository       toString                uninstallFeature
> >>>>>   validateRepository
> >>>>> zz>fs.listFeatures
> >>>>> res0: Array[org.apache.karaf.features.Feature] = Array()
> >>>>> zz>fs.listRepositories
> >>>>> res1: Array[org.apache.karaf.features.Repository] = Array()
> >>>>>
> >>>>> The next step will be to add a repository.
> >>>>>
> >>>>> Reto
> >>>>>
> >>>>> 1. Thanks to Krzysztoffor pointing me to this:
> >>>>>
> >>
> http://mail-archives.apache.org/mod_mbox/karaf-user/201302.mbox/%3C2960186.kKK1vM5F7L%40dracula%3E
> >>>> --
> >>>> ir. ing. Minto van der Sluis
> >>>> Software innovator / renovator
> >>>> Xup BV
> >>>>
> >>>> Mobiel: +31 (0) 626 014541
> >>>>
> >>>>
> >>
> >> --
> >> ir. ing. Minto van der Sluis
> >> Software innovator / renovator
> >> Xup BV
> >>
> >> Mobiel: +31 (0) 626 014541
> >>
> >>
>
>
> --
> ir. ing. Minto van der Sluis
> Software innovator / renovator
> Xup BV
>
> Mobiel: +31 (0) 626 014541
>
>

Re: Karaf in Clerezza

Posted by Minto van der Sluis <mi...@xup.nl>.
Hi Reto,

You've mentioned it a couple of times, but I wonder why is an executable
jar so important to you?

Regards,

Minto

Op 7-3-2013 18:20, Reto Bachmann-Gmür schreef:
> Hi Minto
>
> Thanks.
>
> Yes Clerezza offers no easy and documented way to create custom launchers.
> The disadvantage of Karaf I see is that one has no executable jar. I think
> a good approach would be to have a rather small executable jar and the
> ability to add features at runtime. That's whey I was experimenting in
> adding the karaf services for installing features.
>
> Reto
>
> On Mon, Mar 4, 2013 at 11:54 AM, Minto van der Sluis <mi...@xup.nl> wrote:
>
>> Hi Reto,
>>
>> Apologies for the delay, due to a vacation I have been offline for a while.
>>
>> I decided to go for karaf mainly because I was a newby for both the
>> karaf and sling way of building a distribution. At the time creating my
>> own distribution based on karaf seemed more simple. I also fancied the
>> commandline present in Karaf and the ability to brand it.
>>
>> Regards,
>>
>> Minto
>>
>> Op 22-2-2013 18:59, Reto Bachmann-Gmür schreef:
>>> Hi Minto
>>>
>>> I think checking and ensuring interoperability (in both directions) is a
>>> great sanity check of the architecture. But my concrete motivation was
>>> exploring way to have clerezza more modular, to have easy way to install
>>> optional components (like UIMA or CRIS) and maybe to make the launcher
>>> slimmer.
>>>
>>> On the Karaf list I was asked why we don't use a the Karaf framework in
>>> Clerezza. I'm not sure what advatages/disadvantatges this would bring. I
>>> think having an executable jar as launcher is quite important. Also I'm
>> not
>>> sure how well the security stuff would work together.
>>>
>>> What are the reasons for you to use Karaf?
>>>
>>> Cheers,
>>> Reto
>>>
>>> On Mon, Feb 11, 2013 at 11:03 PM, Minto van der Sluis <mi...@xup.nl>
>> wrote:
>>>> Hi,
>>>>
>>>> What I have done is the reverse (clerezza in karaf) and might be of
>>>> interest to others:
>>>>
>>>> I have created a custom karaf based distribution containing:
>>>> - clerezza components
>>>> - stanbol rulestore and ontology manager
>>>> - karaf cli commands to manipulate stanbol rulestore
>>>> - custom components of my own
>>>>
>>>> For both clerezza and stanbol I created karaf features to only contain
>>>> components used by me. This however can be easily extended to contain
>>>> all features. It is still up to the distribution to decide which
>>>> features to load on startup.
>>>>
>>>> If there is any interest please let me know. Then I will ask my client
>>>> if I can share details with the community.
>>>>
>>>> Regards,
>>>>
>>>> Minto
>>>>
>>>> Op 11-2-2013 21:56, Reto Bachmann-Gmür schreef:
>>>>> My experiments today.
>>>>>
>>>>> Goal: Be able to install Karaf features within clerezza
>>>>>
>>>>> Approach: use the service org.apache.karaf.features.FeaturesService
>>>> provided by
>>>>> the bundle Apache Karaf :: Features :: Core
>>>>> (org.apache.karaf.features.core) [1].
>>>>>
>>>>> Unfortunately this bundle has quite some dependencies which need to be
>>>>> satisfied. I've chosen a brute force approach and installed the list
>>>>> of bundles of the karaf-framework feature. Because of chicken and egg
>>>>> I can't yet install features. So  I needed the following scala on the
>>>>> command line:
>>>>>
>>>>> import java.net._
>>>>> val url = new
>> URL("mvn:org.apache.karaf.assemblies.features/standard/2.3.0/xml/features")
>>>>> val conn = url.openConnection
>>>>> import xml._
>>>>> val doc = XML.load(conn.getInputStream)
>>>>>
>>>>> for (b <- doc\"feature"\"bundle") {
>>>>>  val mvnUri = b.text
>>>>>  try {
>>>>>  val bundle = bundleContext.installBundle(mvnUri)
>>>>>  bundle.start()
>>>>>  } catch {
>>>>>    case ex => out.println("Exception installing bundle", ex)
>>>>>  }
>>>>> }
>>>>>
>>>>> The bundle org.apache.karaf.features.core is now satisfied but not
>>>>> exposing any service. For some reason the blueprint service bundle
>>>>> wasn't activated, activating it over the webconsole made the service
>>>>> available. As new packages aren't avaiable on already open shells I
>>>>> have to reconnect via ssh.
>>>>>
>>>>> Now I can access the service:
>>>>>
>>>>> zz>val fs = $[org.apache.karaf.features.FeaturesService]
>>>>> fs: org.apache.karaf.features.FeaturesService =
>>>>> org.apache.karaf.features.internal.FeaturesServiceImpl@9d8957d
>>>>> zz>fs.[TAB]
>>>>> addRepository           asInstanceOf            getFeature
>>>>>  installFeature          installFeatures         isInstalled
>>>>>   isInstanceOf            listFeatures
>>>>> listInstalledFeatures   listRepositories        removeRepository
>>>>>  restoreRepository       toString                uninstallFeature
>>>>>   validateRepository
>>>>> zz>fs.listFeatures
>>>>> res0: Array[org.apache.karaf.features.Feature] = Array()
>>>>> zz>fs.listRepositories
>>>>> res1: Array[org.apache.karaf.features.Repository] = Array()
>>>>>
>>>>> The next step will be to add a repository.
>>>>>
>>>>> Reto
>>>>>
>>>>> 1. Thanks to Krzysztoffor pointing me to this:
>>>>>
>> http://mail-archives.apache.org/mod_mbox/karaf-user/201302.mbox/%3C2960186.kKK1vM5F7L%40dracula%3E
>>>> --
>>>> ir. ing. Minto van der Sluis
>>>> Software innovator / renovator
>>>> Xup BV
>>>>
>>>> Mobiel: +31 (0) 626 014541
>>>>
>>>>
>>
>> --
>> ir. ing. Minto van der Sluis
>> Software innovator / renovator
>> Xup BV
>>
>> Mobiel: +31 (0) 626 014541
>>
>>


-- 
ir. ing. Minto van der Sluis
Software innovator / renovator
Xup BV

Mobiel: +31 (0) 626 014541


Re: Karaf in Clerezza

Posted by Reto Bachmann-Gmür <re...@apache.org>.
Hi Minto

Thanks.

Yes Clerezza offers no easy and documented way to create custom launchers.
The disadvantage of Karaf I see is that one has no executable jar. I think
a good approach would be to have a rather small executable jar and the
ability to add features at runtime. That's whey I was experimenting in
adding the karaf services for installing features.

Reto

On Mon, Mar 4, 2013 at 11:54 AM, Minto van der Sluis <mi...@xup.nl> wrote:

> Hi Reto,
>
> Apologies for the delay, due to a vacation I have been offline for a while.
>
> I decided to go for karaf mainly because I was a newby for both the
> karaf and sling way of building a distribution. At the time creating my
> own distribution based on karaf seemed more simple. I also fancied the
> commandline present in Karaf and the ability to brand it.
>
> Regards,
>
> Minto
>
> Op 22-2-2013 18:59, Reto Bachmann-Gmür schreef:
> > Hi Minto
> >
> > I think checking and ensuring interoperability (in both directions) is a
> > great sanity check of the architecture. But my concrete motivation was
> > exploring way to have clerezza more modular, to have easy way to install
> > optional components (like UIMA or CRIS) and maybe to make the launcher
> > slimmer.
> >
> > On the Karaf list I was asked why we don't use a the Karaf framework in
> > Clerezza. I'm not sure what advatages/disadvantatges this would bring. I
> > think having an executable jar as launcher is quite important. Also I'm
> not
> > sure how well the security stuff would work together.
> >
> > What are the reasons for you to use Karaf?
> >
> > Cheers,
> > Reto
> >
> > On Mon, Feb 11, 2013 at 11:03 PM, Minto van der Sluis <mi...@xup.nl>
> wrote:
> >
> >> Hi,
> >>
> >> What I have done is the reverse (clerezza in karaf) and might be of
> >> interest to others:
> >>
> >> I have created a custom karaf based distribution containing:
> >> - clerezza components
> >> - stanbol rulestore and ontology manager
> >> - karaf cli commands to manipulate stanbol rulestore
> >> - custom components of my own
> >>
> >> For both clerezza and stanbol I created karaf features to only contain
> >> components used by me. This however can be easily extended to contain
> >> all features. It is still up to the distribution to decide which
> >> features to load on startup.
> >>
> >> If there is any interest please let me know. Then I will ask my client
> >> if I can share details with the community.
> >>
> >> Regards,
> >>
> >> Minto
> >>
> >> Op 11-2-2013 21:56, Reto Bachmann-Gmür schreef:
> >>> My experiments today.
> >>>
> >>> Goal: Be able to install Karaf features within clerezza
> >>>
> >>> Approach: use the service org.apache.karaf.features.FeaturesService
> >> provided by
> >>> the bundle Apache Karaf :: Features :: Core
> >>> (org.apache.karaf.features.core) [1].
> >>>
> >>> Unfortunately this bundle has quite some dependencies which need to be
> >>> satisfied. I've chosen a brute force approach and installed the list
> >>> of bundles of the karaf-framework feature. Because of chicken and egg
> >>> I can't yet install features. So  I needed the following scala on the
> >>> command line:
> >>>
> >>> import java.net._
> >>> val url = new
> >>
> URL("mvn:org.apache.karaf.assemblies.features/standard/2.3.0/xml/features")
> >>> val conn = url.openConnection
> >>> import xml._
> >>> val doc = XML.load(conn.getInputStream)
> >>>
> >>> for (b <- doc\"feature"\"bundle") {
> >>>  val mvnUri = b.text
> >>>  try {
> >>>  val bundle = bundleContext.installBundle(mvnUri)
> >>>  bundle.start()
> >>>  } catch {
> >>>    case ex => out.println("Exception installing bundle", ex)
> >>>  }
> >>> }
> >>>
> >>> The bundle org.apache.karaf.features.core is now satisfied but not
> >>> exposing any service. For some reason the blueprint service bundle
> >>> wasn't activated, activating it over the webconsole made the service
> >>> available. As new packages aren't avaiable on already open shells I
> >>> have to reconnect via ssh.
> >>>
> >>> Now I can access the service:
> >>>
> >>> zz>val fs = $[org.apache.karaf.features.FeaturesService]
> >>> fs: org.apache.karaf.features.FeaturesService =
> >>> org.apache.karaf.features.internal.FeaturesServiceImpl@9d8957d
> >>> zz>fs.[TAB]
> >>> addRepository           asInstanceOf            getFeature
> >>>  installFeature          installFeatures         isInstalled
> >>>   isInstanceOf            listFeatures
> >>> listInstalledFeatures   listRepositories        removeRepository
> >>>  restoreRepository       toString                uninstallFeature
> >>>   validateRepository
> >>> zz>fs.listFeatures
> >>> res0: Array[org.apache.karaf.features.Feature] = Array()
> >>> zz>fs.listRepositories
> >>> res1: Array[org.apache.karaf.features.Repository] = Array()
> >>>
> >>> The next step will be to add a repository.
> >>>
> >>> Reto
> >>>
> >>> 1. Thanks to Krzysztoffor pointing me to this:
> >>>
> >>
> http://mail-archives.apache.org/mod_mbox/karaf-user/201302.mbox/%3C2960186.kKK1vM5F7L%40dracula%3E
> >>>
> >>
> >> --
> >> ir. ing. Minto van der Sluis
> >> Software innovator / renovator
> >> Xup BV
> >>
> >> Mobiel: +31 (0) 626 014541
> >>
> >>
>
>
> --
> ir. ing. Minto van der Sluis
> Software innovator / renovator
> Xup BV
>
> Mobiel: +31 (0) 626 014541
>
>