Richard:

I am all for eating our own dog food at all, but from my point of view it would be great to be able to get the basics (i.e., remote Felix shell access) working without having to have a lot of other dependencies. For example, could we come up with a scheme to get shell access without requiring Config Admin (and Metatype) and setting up a configuration in it?

Currently package deps are:
org.osgi.framework,
org.osgi.service.cm (the ConfigurationAdmin, maybe reduceable to API only?)
javax.crypto (only required for SSH; part of the JRE)
javax.crypto.spec (only required for SSH; part of the JRE)
org.slf4j (Logging, may be replaced by commons-logging or the log service) org .apache .commons .collections ,org .apache.commons.collections.buffer,org.apache.commons.collections.list (commons-collections bundle)

Bundle deps are:
cm
logging (currently with SLF4J, may do with bare OSGi log service)
commons-collections


Metatype is only required for the management console to work, because the meta information is used to display sense making dialogs to the user.

A management console is maybe not required, if one uses a scheme like pax-conf propsloader, or Peter's FileInstall. Also it would be possible to add a default configuration from the Felix Shellconsole bundle itself.

To make things work without the ConfigurationAdmin won't be easy, because of the design around the ManagedServiceFactory idea from the OSGi specs.

Does not seem so much to me, though here we are talking about "felix's requirements" and that's up to felix to decide.

Of course, perhaps this first version is just a proof of concept and you expect to there to be a simpler approach too...

The problem seems to be that I designed telnetd-osgi to be generic and modular. One of the reasons why I "ported" to OSGi was actually the standardized configuration mechanism....

Kind of the thing that makes OSGi frustrating for me sometimes:
You know a standard solution is there (like for configuration) but you still need to figure and implement yet another non standard way. (No offense taken or intended; just expressing a point of view here; perfectly understand your point too.)

I don't know how this is handled in other bundles, maybe somebody got a hint (probably being only API bundle dependent, but not on the service implementation and try to hack around loading some property files?).

If absolute (i.e. no API either) ConfigurationAdmin independence is an indispensable requirement, then I am open to discuss it and help to make it, but I personally won't use it, because I need the genericity of the factories for the platform I am working on.

Regards,
Dieter


Otherwise, this all seems excellent.

Thanks :)



-> richard

Dieter Wimberger wrote:
Craig:

The actual listener (in the telnetd-osgi bundle) is a ManagedServiceFactory. This means, that you can get instances of independent and configurable telnet/ssh listeners through the configuration mechanism.

From a glimpse at the PAX page, you may be able to use pax-confman- propsloader-0.2.1.jar to load a configuration for the factory (factoryPid is net.wimpi.telnetd.service.TelnetListenerServiceFactory).

Check out
http://wiki.ops4j.org/confluence/display/ops4j/Pax+ConfMan
for usage.

The properties file may look something like:

secure=false
connection.startshell=org.apache.felix.shellconsole.ConsoleShell
name=Telnet Service
connection.housekeeping.interval=60000
port=6667
pkeypass=
floodprotection=10
connection.idle.warning=3000000
connection.idle.logout=60000
pkey=
connection.inputmode=character
connection.max=100
listener.autostart=true

I haven't tried it, but I think it may be doable.

Regards,
Dieter



On 24 Jun 2008, at 08:30, Craig Phillips wrote:

Hi,

I have the bundles installed and started... I seemingly only needed to grab and install "commons.collection"; I have config admin running, although I'm not sure about metatype... everything resolved, but that doesn't necessarily mean I'm 100% operational... speaking of operational...

OK, I apologize but I may need a bit of hand holding here...

So, I was doing netstat -a and I don't seem to find a listen port for which to connect to a la telnet... I noticed a config xml with a port default of 23... I tried that to no avail... I noticed you mention a management utility like webconsole, which I also have no knowledge of myself...

If someone out there can give me a hand / pointer, that would be greatly appreciated...

here's my bundle list in config.properties:
felix.auto.start.1= file:bundle/commons-collections-3.2.1.jar file:bundle/telnetd-osgi.jar file:bundle/ org.apache.felix.shellconsole.jar file:bundle/ org.osgi.compendium-1.0.1.jar file:bundle/ org.apache.felix.shell-1.0.1.jar file:bundle/ org.apache.felix.shell.tui-1.0.1.jar file:bundle/ org.apache.felix.configadmin-1.0.1.jar file:bundle/ org.apache.felix.bundlerepository-1.0.3.jar file:bundle/ org.apache.felix.scr-1.0.0.jar file:bundle/pax-logging- api-1.0.0.jar file:bundle/pax-logging-service-1.0.0.jar file:bundle/pax-confman-propsloader-0.2.1.jar file:bundle/ example00.jar
Thanks again, Craig Phillips



From: Dieter Wimberger
Sent: Tue 6/24/2008 1:54 AM
To: [email protected]
Subject: Re: Telnet bundle


Richard, Craig:

I spend some hours to hack together:

1) a telnetd-osgi bundle with the min requirements (including SSH; but no templates, Beanshell etc.). Imports: org .osgi .framework ,org .osgi .service .cm ,javax .crypto ,javax .crypto .spec ,org .slf4j ,org .apache .commons .collections ,org .apache .commons.collections.buffer,org.apache.commons.collections.list

You'll need the metatype and the configuration admin bundles, as well as a commons-collections bundle.

2) a shellconsole bundle that registers a simple shell that represents a glue to the Felix Shell Service (cleanroom, no old code used at all)

You can temporally find the two bundles here:
http://www.karanet.at/~wimpi/felix/org.apache.felix.shellconsole.jar
http://www.karanet.at/~wimpi/felix/telnetd-osgi.jar

Note that the listeners are actually configured through the CM, which means you need some management utility (like the webconsole, which I honestly don't manage to run in felix yet).

The configuration for the start shell is:
org.apache.felix.shellconsole.ConsoleShell

Also, character mode is required for the telnet listener to behave correctly.

Hope that you can run it; feedback is welcome.

Regards,
Dieter


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to