Ich bin in meinem Job als Business Intelligence Berater durch den Einsatz einer für mich neuen Technologie in einem Projekt auf das Produkt Apache Karaf gestoßen. Da der Wikipedia Artikel dazu nur auf Apache Felix weiterleitet, jedoch nicht ein einziges mal das Wort „Karaf“ erwählt habe ich recherchiert nach mehr Informationen. Auf der Homepage von Karaf ist es auch nicht direkt ersichtlich.
In einem historischen, englischen Wikipedia Artikel aus dem Februar 2016 bin ich fündig geworden. Wenn in diesem Artikel oben auf „newer Version“ klickt, bemerkt man dass der Artikel „abgebaut“ wurde.. warum auch immer.
Hier jedenfalls der Inhalt:
Apache Karaf is a top level Apache Project that consists of set of projects that provides a dual polymorphic container and application bootstrapping paradigms to the enterprise application development and application hosting. Karaf Container provides enterprise ready features such as a shell console, remote access, hot deployment, dynamic configuration and many more. Karaf projects provide additional features like clustering, complete monitoring and alerting and application repository.
Apache Karaf can trace it’s origins back to the Apache Servicemix project’s Kernel. As early as 2008 the first blog posts regarding its development can be observed. The first GA release was on September 18th, 2008. Subsequent releases soon followed, introducing new features. The Servicemix Kernel was off to a great start, eventually however by spring 2009 the project grew to the point that it was thought best to leave Servicemix and join it to the Apache Felix community. It was felt that this would allow awareness to grow about the project, and to expand the Kernel community.
Once established in the Apache Felix community Karaf again started to grow and mature, once again coming to the point that it was felt that another growth spurt was required – becoming a top level Apache project. This occurred mid 2010. Since then Apache Karaf has released it’s first GA as 2.0, and several point releases and patches. The community is now busy readying the next major point release, and preparing for its future 4.1.x.
Apache Karaf Projects
Apache karaf consists of multiple project, each facilitating different aspects of enterprise application development and deployment such as application hosting, project artifact repository management, clustering and application monitoring and alerting.
Karaf Container is a modern and polymorphic container. It’s a lightweight, powerful, and enterprise ready container powered by OSGi. By polymorphic, it means that Karaf Container can host any kind of applications: OSGi, Spring, WAR, and much more. Here is a short list of features supported by the Karaf Container.
- Hot deployment: Karaf Container supports hot deployment of OSGi bundles by monitoring jar files inside the [home]/deploy directory. Each time a jar is copied in this folder, it will be installed inside the container run time. One can then update or delete it and changes will be handled automatically. In addition, the Karaf Container also supports exploded bundles and custom deployers (blueprint and spring ones are included by default).
- Dynamic configuration: Services are usually configured through the ConfigurationAdmin OSGi service. Such configuration can be defined in Karaf Container using property files inside the [home]/etc directory. These configurations are monitored and changes on the properties files will be propagated to the services.
- 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)
- Provisioning: Provisioning of libraries or applications can be done through a number of different ways, by which they will be downloaded locally, installed and started.
- Native OS integration: Karaf Container can be integrated into the Operating System as a service so that the life cycle will be bound to the Operating System.
- Extensible Shell console: Karaf Container features a text console where the user can manage the services, install new applications or libraries and manage their state. This shell is extensible by deploying new commands dynamically along with new features or applications.
- Remote access: using any SSH client, user can connect to the Karaf Container and issue commands in the console
- Security framework based on JAAS
- Managing instances: Karaf Container provides simple commands for managing multiple instances. User can create, delete, start and stop instances of Karaf Container through the console.
Karaf Boot is a work in progress (not yet available). The purpose is to simplify the design and development of applications, and provide an easy way to build a „run everywhere“ artifact, embedding the Karaf Container.
Cellar is a clustering solution for Apache Karaf Container powered by Hazelcast. Cellar allows to manage a cluster of Karaf instances, providing synchronization between instances. Here is a short list of provided features:
- Discovery: each Karaf Cellar node is discovered automatically by the others. User can use multicast or unicast for discovery.
- Cluster group: a Karaf Cellar node could be part of one or more cluster group. Each Karaf unit (features, config, etc) is targeted to a group.
- Distributed Configuration Admin: Karaf Cellar distributes the configuration data. The distribution is event-driven and filtered by cluster group.
- Distributed Features: Karaf Cellar distributes the features and repositories information. It’s also event-driven.
- Distributed Bundles: Karaf Cellar distributes the bundles, on an event-driven base.
- Local event distribution (optional): cellar-eventadmin feature provides broadcast of the local events to the cluster.
- Distributed OSGi (optional): cellar-dosgi provides support of Distributed OSGi, allowing to call an OSGi service present on a remote node.
- WebConsole (optional): cellar-webconsole provides Karaf WebConsole plugins, allowing you to monitor and administrate the cluster using a browser interface.
Karaf Cave is an implementation of OSGi Repository R5 specification, providing a resources repository for the Karaf Features Resolver. It still provides an OBR server, but also a full Maven repository. It provides remote access via a HTTP service, and a REST API for management. Cave deals with the requirements and capabilities of all artifacts.
Apache Karaf Cave provides the following features:
- Storage: Cave includes a storage backend. The default one is a simple filesystem backend. As the Cave backend is designed in a plugin way, one can implement their own backend (for instance, JDBC or LDAP backend).
- Repository Metadata Generation: Cave creates the repository metadata, using the artifacts presents in the repository storage.
- Maven support: Cave repositories act as a complete Maven repository, allowing to use Cave directly with Maven.
- REST API: Cave provides a REST API to manipulate the repositories.
- Artifact Upload: Users can upload OSGi bundle in a Cave repository. It supports URLs like mvn:groupId/artifactId/version,file:, http:, etc.
- Repository proxy: Cave is able to proxy an existing repository, for instance an existing Maven repository. The artifacts are located on the „external“ repository, Cave handles the repository metadata. Cave supports file: and http: URLs, it means that Cave is able to browse a remote HTTP Maven repository for instance.
- Repository population: Cave is able to get artifacts present on an „external“ repository (local file: orremote http:), looking for OSGi bundles, and copy the artifacts in the Cave repository storage.
Decanter provides ready to use monitoring solution. It’s also completely extensible and customizable. 
- The collectors harvest the monitored data (JMX metrics, log messages, …).
- A dispatcher (powered by OSGi EventAdmin) forwarding the collected data to the appenders and SLA.
- The appenders receive the collected data and store data into a back end (elasticsearch, cassandra, JDBC, …).
- SLA (Service Level Agreement) is a special kind of appender, checking the collected data, and eventually raising an alert (to a back end).
Eclipse Integration for Karaf
Apache Karaf EIK (Eclipse Integration for Karaf) is the integration of the Apache Karaf container and the Eclipse IDE. Notable features include:
- Custom Eclipse perspective for Apache Karaf development: places Karaf runtime information in one location
- Apache Karaf installation management in the workspace: Karaf installations are managed as workspace projects giving the developer visibility in to the runtime. Each Karaf installation is automatically synchronized with developer’s workspace, including additional bundles, configuration files
- Run and debug Karaf installations with a single Eclipse Launcher: the launch configuration allows developers to fine tune how Karaf will launch
- Automatic deployment of workspace plugin projects:create plugin-projects and have them deployed automatically
- Advanced instrumentation of the running Karaf instance:watch bundles deploy in real time and examine the OSGi service registry from within the Eclipse IDE
- Access Eclipse platform IDE plugins from within a running Karaf instance:all Eclipse plugins are presented as an OBR
Apache Karaf is an Apache Software Foundation project, available under the Apache v2 license. Community maintains following mailing lists.
Wichtig war für mein Verständnis folgende Information:
- Karaf Container can host any kind of applications: OSGi, Spring, WAR.
Es werden also Webservices Bereitgestellt u.a. nach der Java-Servlet-Spezifikation