The Fuse ESB command console is the central tool for both managing the Fuse ESB environment and interacting with the Fuse ESB kernel. When you start Fuse ESB the console starts automatically.
Based on Apache Felix Gogo, the console provides commands that you can use to perform basic management of your Fuse ESB environment, including managing services, installing new applications or libraries, and managing their state.
The console uses prefixes to group commands relating to the same functionality. For example commands related to the OSGi framework are prefixed osgi:, and logging-related commands are prefixed log:.
See the ESB product documentation for information about working with Fuse ESB, the Fuse ESB runtime, and the Fuse ESB kernel.
The following sections explain how to access the console commands:
Managing artifacts describes the console subshells provided for managing artifacts deployed in the Fuse ESB runtime.
To start Fuse ESB to access the Fuse ESB kernel console, open a console at the installation directory and enter:
Windows
bin\servicemix.bat
*NIX
bin/servicemix.sh
Fuse ESB starts and the console is ready.
Example 1.1. The Fuse ESB Console
____ _ __ __ _
/ ___| ___ _ ____ _(_) ___ ___| \/ (_)_ __
\___ \ / _ \ '__\ \ / / |/ __/ _ \ |\/| | \ \/ /
___) | __/ | \ V /| | (_| __/ | | | |> <
|____/ \___|_| \_/ |_|\___\___|_| |_|_/_/\_\
Apache ServiceMix (4.4.1-fuse-00-08)
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
karaf@root>
Press Tab to view the commands.
Example 1.2. Console Commands
activemq:browse activemq:bstat activemq:create-broker
activemq:destroy-broker activemq:list activemq:purge
activemq:query admin:change-port admin:connect
admin:create admin:destroy admin:list
admin:start admin:stop config:cancel
config:edit config:list config:propappend
config:propdel config:proplist config:propset
config:update dev:dynamic-import dev:framework
dev:show-tree features:addUrl features:install
features:list features:listUrl features:refreshUrl
features:removeUrl features:uninstall jbi:list
jbi:shutdown jbi:start jbi:stop
log:display log:display-exception log:get
log:set nmr:list obr:addUrl
obr:deploy obr:info obr:list
obr:listUrl obr:refreshUrl obr:removeUrl
obr:source obr:start osgi:bundle-level
osgi:headers osgi:install osgi:list
osgi:ls osgi:refresh osgi:resolve
osgi:restart osgi:shutdown osgi:start
osgi:start-level osgi:stop osgi:uninstall
osgi:update packages:exports packages:imports
shell:cat shell:clear shell:each
shell:echo shell:exec shell:grep
shell:if shell:info shell:java
shell:printf shell:sleep shell:sort
shell:tac ssh:ssh ssh:sshd
wrapper:install
karaf@root>
The help for each command includes the definition, the syntax, and the arguments and options (if any). To display the help for a command, type the full command name with the --help option. For example, type admin:start --help to display the help for that command..
Example 1.3. Help for a Command
karaf@root> admin:start --help
DESCRIPTION
admin:start
Starts an existing container instance.
SYNTAX
admin:start [options] name
ARGUMENTS
name The name of the container instance
OPTIONS
--help
Display this help message
-o, --java-opts
Java options when launching the instance
karaf@root>
Commands are grouped under prefixes according to functionality, similar to the subshells available in the GShell console that shipped with previous versions of Fuse ESB.
To list the commands available in a group, type
then press
Tab. For example, type CommandPrefix
:osgi:
and press
Tab to list the OSGi commands
Table 1.1 summarizes the command groups available in the console. Click on a command group name for more information.
Table 1.1. Fuse ESB Command Groups
Command Group | Description |
---|---|
activemq | Views and manages brokers and messages |
admin | Creates, manages, and destroys Fuse ESB kernel instances |
config | Manages configuration |
features | Performs provisioning |
jbi | Lists JBI artifacts and manages their lifecycle |
log | Displays and configures logging |
nmr | Lists NMR endpoints |
obr | Accesses the OSGi bundle repository |
ode | Manages the Apache ODE BPEL runtime |
osgi | Manages the OSGi bundle repository |
packages | Lists imported and exported packages |
shell | Performs basic console functions |
ssh | Creates and connects to a remote SSH server |
wrapper | Installs a container as a system service |
When running shell or osgi commands, you can
omit the prefix. For example, typing list
produces the same
output as osgi:list
.
One of the most important uses of the command console is managing the artifacts deployed in the Fuse ESB runtime. The following command groups are used to manage deployed artifacts:
osgi
—Provides a set of commands to manage OSGi bundles. See Admin Console Commands.features
—Provides a set commands to manage bundles that are grouped into features. See Features Console Commands.jbi
—Provides a set of commands to manage JBI artifacts, including commands to perform all of the required JBI administrative tasks. See JBI Console Commands.obr
—Provides a set of commands to manage OSGi Bundle Repositories (OBRs). See OSGi Console Commands.