Introduction
Excerpt |
---|
This quickstart is intended to show guide shows the basic functionality of ACE: deploying bundles to a remote OSGi framework running a management agent. |
Using ACE to
...
create a remote
...
file installer
Apache Felix FileInstall can be used to automatically 'watch' directories for new bundles and configuration files, which will be processed.
To get roughly the same functionality as FileInstall, but remote, we can use the simplest server target available. After building ACE, it can be found under
- Build Apache ACE from source
- Start the server from the
core/deploy/target/dev-server-filebased
...
- directory by launching the
run.sh
orrun.bat
file - Start a gateway from the
...
core/deploy/target/dev-gateway
...
- directory by launching the
run.sh
orrun.bat
file. The target will show some exceptions relating to auditlog information; that's correct,
...
- this server does not support auditlog information
...
- .
- Create a version directory (anywhere), should comply with: deploymentpackage version e.g.
1.0.0
- Copy your bundles-to-be-deployed into the
1.0.0
version directory. Suggestion: usecore/lib/servicebased.host-1.0.0.jar
. Once deployed a UI will popup. - Next, find the
store
directory in the server folder - Create a <gatewayId> directory in the store-dir: in this case
configuredGatewayID
- Copy the entire version directory,
1.0.0
with the containing jar intoconfiguredGatewayID
- Optionally check the available version with your browser, see http://cwiki.apache.org/confluence/display/ACE/Communication+Gateway+and+Server
- That's it! Notice the gateway has started your bundle.
To update a target, add directories with higher version numbers. In this directory, add a new directory for each target (the default target uses "configuredGatewayID"), and in that, add directories for all versions (note that the versions should actually be valid OSGi deployment package version, so 1.0.0
is valid, but 1
is not). In these version directories, drop any bundles you want to have provisioned. That's it!
Remember that any version you create will be installed at most once: if you create a version directory, and then start adding files to it, you run the risk that your empty folder will get installed, and all additional bundles will be removed from the target. It's easiest to create the version folder somewhere else on your system, and move it to the target's directory when you're done.
...