opensource.luminis.net
 

Deployment Admin

Apache Felix has accepted this code donation. The code is now integrated in the Apache Felix project, the newest version of the Deployment Admin can be found there.

Background

Updating existing software components and installing new ones after a gateway has been deployed becomes more and more important for developers, manufacturers, operators and even end users.

Within the OSGi framework, the management agent is responsible for the runtime configuration and its consistency. This is quite an extensive task that includes installing, updating and deleting bundles, configurations, permissions and various other resources.

Before the Deployment Admin specification was defined, all aspects of the management agent were left to the implementor. This lead to bad interoperability between OSGi frameworks and management agents, because people had to implement features like transactional installation of multiple bundles and rollback themselves.

Deployment Admin now standardizes this whole process. It defines deployment packages that can include all types of resources and custom processors. Originally, this was part of the mobile spec, but since R4.1 it is in the standard compendium, chapter 114. The next chapter, 115, contains the auto configuration specification, which builds on the Deployment Admin.

Compiling

The source archive should integrate nicely with the Felix build. It contains a folder called "deploymentadmin" which you can extract to the Felix trunk and everything should be in place. A Maven 2 pom.xml has been provided.

Usage

Basically the Deployment Admin is used like any other bundle. However, there are a few dependencies to keep in mind:

Dependency Required Description
Dependency Manager Yes The dependencies are managed dynamically by the Dependency Manager
R4.1 Compendium/Mobile interfaces Yes* The Deployment Admin interfaces should be available.
PackageAdmin Yes Needed to do a refresh when starting the bundles from a deployment package
EventAdmin No For sending out lifecycle events on a deployment package level
LogService No Logging...

* For now, these are bundled with the Deployment Admin because the compendium used in Felix does not yet contain these interfaces.

When these dependencies are satisfied the bundle will publish a DeploymentAdmin service:

Service overview (edited for brevity)
-> services 21
Apache Felix Deployment Admin (21) provides:
--------------------------------------------
objectClass = org.osgi.service.deploymentadmin.DeploymentAdmin

-> services -u 21
Apache Felix Deployment Admin (21) uses:
----------------------------------------
objectClass = org.osgi.service.packageadmin.PackageAdmin
objectClass = org.osgi.service.event.EventAdmin
objectClass = org.osgi.service.log.LogService 

Files

The following files are available for download:

Filename Description
deploymentadmin.zip Deployment Admin sources and Felix compatible build script
org.apache.felix.deploymentadmin-1.0.0-SNAPSHOT.jar Binary release of the Deployment Admin bundle
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Powered by JIRA Studio 2.2 | Terms of Use | Bug/feature request | Request Support | Help/Documentation