iain
iain

Reputation: 39

alternative to apache felix web console for OSGi

I am trying to find a CLI alternative to the apache felix web console. I am new to OSGi but am using a project that is built with it. It currently uses the web console to configure managed services. I need to set this up on a remote device though so would prefer a CLI method. I have read that there is a Config Admin CLI but cannot find any documentation or tutorial on how to use one.

Upvotes: 0

Views: 444

Answers (2)

Milen Dyankov
Milen Dyankov

Reputation: 3062

You could use Felix Gogo (apparently latest version is much better and allows to SSH into it) but AFAIK it will not help you much as far as configuring managed services is concern. While in Gogo you can easily write commands that you execute from the shell, I'm not aware of any existing gogo command that will allow you to change configuration.

Karaf on the other hand uses its own shell (better IMHO). It allows to SSH remotely and it does have commands to add/update configurations. Unfortunately Karaf commands are not compatible with Gogo ones. And Karaf's shell also assumes the runtime is Karaf and thus it's hot directly useful in other environments. However it is possible to install it after some adjustments (I'm currently working on a prototype that integrates it with Liferay for example).

Upvotes: 1

Paul M
Paul M

Reputation: 357

Felix Gogo https://felix.apache.org/documentation/subprojects/apache-felix-gogo.html provides a local console, which may be what you are looking for.

Apache Karaf provides a SSH access to a Gogo console. You might want to investigate how it achieves this. It may be easier to run your project in Karaf than to add SSH support to another project.

Alternatively you could implement a simple tcp server manually, and just interact with config admin directly.

Upvotes: 2

Related Questions