Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.
Philipp Haussleiter edited this page Nov 25, 2015 · 1 revision

Command Line Interface (CLI)

The command line interface (CLI) is implemented as a separate bundle. It hooks right into the (for now only Equinox) console and can easily be used from there.
Help for the different commands can be obtained by typing “help” at the prompt.

Right now two kinds of commands are implemented:

  • status information
  • bundle lifecycle actions

To ensure uniqueness, all commands are prefixed with a bb.

Status information

To obtain grid status information, simply type:

osgi> bbstatus

It will display information about the grid and its nodes.

Sample output for a grid with just one node:

BundleBee grid with 1 node(s).

BundleBee node 7102630813341167302:
        Manager URL     http://192.168.1.2:48110/bundlebee/manager
        Repository URL  http://192.168.1.2:48110/bundlebee/repository/repository.xml
        Memory          1040kb of 65088kb are free
        Bundles         15

To obtain information about a specific node, simply type:

osgi> bbstatus 7102630813341167302

Sample output:


BundleBee node 7102630813341167302:
Manager URL http://192.168.1.2:48110/bundlebee/manager
Repository URL http://192.168.1.2:48110/bundlebee/repository/repository.xml
Memory 1040kb of 65088kb are free
Bundles 15

Bundles on node 7102630813341167302:

State Bundle
ACTIVE org.eclipse.osgi.services/3.1.200.v20071203
ACTIVE javax.servlet/2.4.0.v200806031604
ACTIVE org.bundlebee.testbundle/0.5.0.SNAPSHOT
ACTIVE org.bundlebee.carrier/0.5.0.SNAPSHOT
ACTIVE org.eclipse.osgi.util/3.1.300.v20080303
ACTIVE org.apache.felix.bundlerepository/1.2.1
ACTIVE org.eclipse.equinox.http/1.0.200.v20080421-2006
ACTIVE org.bundlebee.watchdog/0.5.0.SNAPSHOT
ACTIVE org.bundlebee.manager/0.5.0.SNAPSHOT
RESOLVED org.bundlebee.weaver/0.5.0.SNAPSHOT
ACTIVE org.osgi.service.obr/1
ACTIVE org.bundlebee.cli/0.5.0.SNAPSHOT
RESOLVED org.bundlebee.pulsar/0.5.0.SNAPSHOT
ACTIVE org.eclipse.osgi/3.4.2.R34x_v20080826-1230
ACTIVE org.bundlebee.repository/0.5.0.SNAPSHOT

Bundle Lifecycle Actions

To control the lifecycle of a bundle on one or many nodes, you can use the following lifecycle actions:

  • bbinstall
  • bbstart
  • bbstop
  • bbuninstall

All four commands take the same parameters:

symbolicname/version | localBundleId | url [nodeId]*

So in essence you can either provide a symbolicname/version (you need to provide symbolic name, slash, version, not just version or name), a local bundle id as displayed by the container or a URL.
(Note that if you use the URL, the bundle is always first installed in the local OSGi framework)
Additionally you may specify one or more nodes at which you want your action to be targeted.

Example:

osgi> bbinstall org.bundlebee.pulsar/0.5.0 7102630813341167302

Sample output:

INSTALLing org.bundlebee.pulsar/0.5.0 ...
        on http://192.168.1.2:48110/bundlebee/manager: SUCCESS
Operation completed.
Clone this wiki locally