-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Apache Karaf as a runtime container #194
Comments
Using Apache Karaf would bring a couple of features for openHAB:
Possible risks of this move:
If any expert on Karaf could comment on these risks, it would be great :-) |
I for one would like to see OH2 running in Karaf. While I'm no Karaf expert, I use it for Camel and I find it very easy to monitor and manage remotely. The only reason I can think of to not switch is if it expands the memory footprint more than a trivial amount, as there is already an uncomfortable size gap between OH1 and dedicated systems like Vera. |
As I am already using Karaf for OH2 I prefer to support it mainline, too. ;-) |
@maggu2810 Do you have any opinion about the concern of an increasing size and thus higher performance requirements? Does it e.g. still run on a RaspPi1? |
Never tested it with a RespPi1. 2015-04-29 11:17 GMT+02:00 Kai Kreuzer notifications@github.com:
|
No, I don't think (hope!) that there will be any additional overhead per bundle - my concern is only the "base" that is added as Karaf has Spring/Blueprint as a mandatory part and a few other components that I think are not really relevant for an openHAB container, but cannot be removed from Karaf, so it feels like some unnecessary ballast. |
From karaf.apache.org: Logging System: using a centralized logging back end supported by Log4J, Karaf supports a number of different APIs (JDK 1.4, JCL, SLF4J, Avalon, Tomcat, OSGi) I seriously hope that we can bolt SLF4j underneath karaf as I would love to ship my OpenHab logs to a logstash server. Mainly, my OpenHab server is running on a Raspberry 2, and I want to avoid lots of log file writing on the small SD card if possible. |
What I said is
slf4j is the API, logback and log4j two possible logger implementations. openHAB currently uses logback and as far as I understand Karaf uses log4j. |
I'm interested in openHAB on Karaf/RasPi2. Karaf 4 will be released soon: The 4.0.x line will ship with OSGi Rev5 support via Felix 4.4.1 and Equinox 3.9.1-v20140110-1610, and a completely refactored internal framework without Blueprint for internal usage. From a users point of view these changes will yield a smaller, more efficient Karaf core. |
Yes, I am already using 4.0.0M2 and waiting for M3 to be released soon. That Blueprint is optional now is a good thing! |
Can you provide a quickstart guide and/or Karaf Feature (compiling my own right now for use with EnOcean) to get SmartHome/openHAB up and running on Karaf? I've some spare time and would like to see openHAB, Karaf, RasPi 1/2, EnOcean Pi 868/EnOcean USB 300 and my PEHA Easyclick devices playing together finally. |
@oliverlietz you have spare time? Sounds fantastic as I am currently struggling with Karaf and not getting much further... In there, I have replaced the whole p2 feature build by one KAR: https://github.com/kaikreuzer/openhab2/tree/karaf/features/ |
Btw, my goal is to have quite finegrained features, so that every addon can be installed as a feature individually as well as things like MQTT support, the Paper UI, HABmin, etc. |
I changed your project pom to use Karaf 4.0.0.M2 instead of 4.0.0-SNAPSHOT (karaf.version).
So, perhaps we need to change who win, if a file is available in both locations. Will have a brief look, if I found something that could help. |
IMHO this is the related issue: |
I switched from M2 to SNAPSHOT because of http://mail-archives.apache.org/mod_mbox/karaf-user/201504.mbox/%3C551E8912.1030006@imag.fr%3E: |
You could try that one: kaikreuzer/openhab-addons@karaf...maggu2810:karaf |
Wait a moment... ;-) You have written:
and you have written:
So, is the problem (config.properties of resources is overwritten by config.properties of karaf) already solved if you are using the SNAPSHOT? |
Are you sure that the
is required? That does not seem to make much sense... |
No, this wasn't me, that was someone else reporting the problem about the pom.xml.zip filename.
No, it isn't. |
I just tried to get a workaround for the problem and pushed it, so you can test it. But yes, it seems that the lines are required to prevent creation of target/classes. Feels very hackish. It feels also very strange, that we have to use filtered=true if we want to overwrite the files. |
I'm maintaining Sling's Karaf Features and have something similar in mind for my SmartHome/openHAB features - so features first, custom distribution second. I had to set version of The last time I played with openHAB was in 2013. Is the EnOcean support now useable? Any hints to get quick results? Seeing/receiving signals from my switches in openHAB connected to EnOcean Pi 868/EnOcean USB 300 would be sufficient. |
Sounds good - having someone with experience defining the features is great! Btw, what do you think: Should we also define Karaf features on the Eclipse SmartHome side (such as "esh-core", "esh-rest", "esh-dsl" etc. and include them in openHAB 2 features? Or would you suggest to define all of them only within openHAB for the moment?
Not at all, I have removed it now: a802790
It works pretty well with the 1.x EnOcean binding through the compat layer - I am using it myself regularly for demos with the PTM210. But better ask @maggu2810, he is the better expert for EnOcean :-) |
Indeed - unfortunately, there is no solution... Thanks for posting the problem at https://issues.apache.org/jira/browse/KARAF-2742 |
I think we should have a look at the overhead to maintain that all. At the moment there are still some difference between Tycho and the Eclipse IDE (at least for the karaf console bundle).
@oliverlietz, We should not mix the topics in this issue. Contact me if you want some information, my email address should be visible.
Doesn't the very ugly workaround / hack (filtered resources, ...) work for you?
You're welcome. |
One thing seems to be solved (http://karaf.922171.n3.nabble.com/4-0-0-M2-feature-install-system-bundle-td4040561.html). |
It seems to be known, so let's wait for the fix... |
…intained anymore Signed-off-by: Kai Kreuzer <kai@openhab.org> (github: @kaikreuzer)
So, I started again to move openHAB 2 to a Karaf based distribution. |
I think the migration to the Karaf container is in a working state for a review. |
Okay, I know the source of the problem, will report it to ESH. |
Problem solved with eclipse-archived/smarthome#446 |
3 questions:
|
|
@dvanherbergen contact me and I will give you further instructions, how you could work with my current development branch |
|
@kaikreuzer I'll start working on pull requests to get karaf branch inline with the master, so you don't have to spend time on that for now. |
@kaikreuzer Please add the karaf tag |
@dvanherbergen Great to have you back on board at openHAB :-) |
@kaikreuzer glad to be back. I'll give it a go, if I get stuck, you will hear about it.. |
Note that I have just merged #519, so you should be fine to work here on the Karaf branch and don't have to use @maggu2810's fork. |
Thanks! |
#521 should merge the current master. |
@maggu2810 There is a first version of the jetty config available here https://github.com/dvanherbergen/openhab2/commit/55772bea5ff5254eecfa4320371ff5908ec2c439
|
Imho we should leave out the whole web application support. The only thing to consider might be an optional folder for serving static content, see #311. |
Done and available at https://github.com/openhab/openhab-distro |
Signed-off-by: Kai Kreuzer <kai@openhab.org>
No description provided.
The text was updated successfully, but these errors were encountered: