Console Reference
Quick access to the Apache Karaf shell commands packaged under JBoss Fuse.
Copyright © 2011-2020 Red Hat, Inc. and/or its affiliates.
Abstract
Chapter 1. Using the Command Console
Overview
Starting the command console
Windows | bin\fuse |
*NIX | bin/fuse |
_ ____ ______ | | _ \ | ____| | | |_) | ___ ___ ___ | |__ _ _ ___ ___ _ | | _ < / _ \/ __/ __| | __| | | / __|/ _ \ | |__| | |_) | (_) \__ \__ \ | | | |_| \__ \ __/ \____/|____/ \___/|___/___/ |_| \__,_|___/\___| JBoss Fuse (6.0.0.redhat-xxx) http://www.redhat.com/products/jbossenterprisemiddleware/fuse/ Hit '<tab>' for a list of available commands and '[cmd] --help' for help on a specific command. Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown JBoss Fuse. JBossFuse:karaf@root
Getting help
- console help—lists all of the commands along with a brief summary of the commands function
- command help—provides a detailed description of a command and its arguments
Example 1.1. Console Help
JBossFuse:karaf@root>
help
COMMANDS activemq:browse activemq:bstat activemq:create-broker Creates a broker instance. activemq:destroy-broker Destory a broker instance. activemq:list activemq:purge activemq:query admin:change-opts Changes the Java options of an existing container instance. admin:change-rmi-registry-port Changes the RMI registry port (used by management layer) of an existing container instance.
...JBossFuse:karaf@root>
--help
option. As shown in Example 1.2, “Help for a Command”, entering admin:start --help
displays the help for that command.
Example 1.2. Help for a Command
JBossFuse: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
JBossFuse:karaf@root>
Command completion
active
followed by Tab, a list similar to Example 1.3, “Console Commands” is shown.
Example 1.3. Console Commands
activemq:browse activemq:bstat activemq:create-broker activemq:destroy-broker activemq:list activemq:purge activemq:query JBossA-MQ:karaf@root>
Command groups
Command Group | Description |
---|---|
activemq | Views and manages brokers and messages. |
admin | Creates, manages, and destroys containers. |
camel | Manages Apache Camel contexts and routes |
config | Manages configuration. |
cxf | Manages Apache CXF buses and endpoints. |
dev | Utilities that are useful for a developer while testing bundles in the container. |
fab | Manages the dependency resolution mechanism used by Fuse Application Bundles. |
fabric | Performs provisioning and configuration using Fuse Fabric. |
features | Performs provisioning based on Apache Karaf feature specs. |
jaas | Manages the console's security settings. |
jbi | Manage deployed JBI artifacts. |
log | Displays and configures logging. |
nmr | Lists NMR endpoints. |
obr | Accesses the OSGi Bundle Repository (OBR). |
osgi | Manages OSGi bundles. |
packages | Lists imported and exported packages. |
patch | Manages patches. |
shell | Performs basic console functions |
ssh | Creates and connects to a remote SSH server |
web | Lists the WARs deployed in the container. |
zk | Accesses and modifies entries in the Zookeeper registry. |
Short version
- shell
- osgi
- admin
About console input
FuseMQ:karaf@root>
echo 0123 123FuseMQ:karaf@root>
echo 00.123 0.123FuseMQ:karaf@root>
Chapter 2. Shell Console Commands
shell:
then press Tab at the prompt to view the commands in this group.
2.1. shell:cat, cat
Abstract
Synopsis
shell:cat
[
-n
] [
--help
] {[
path
] | [
URL
]}
Arguments
Argument | Interpretation |
---|---|
-n | Display line numbers. |
--help | Displays the online help for this command |
path | The path(s) of the file to display, separated by whitespace (separated by - for STDIN) |
URL | The URL(s) to display, separated by whitespace (separated by - for STDIN) |
2.2. shell:clear, clear
Abstract
Synopsis
shell:clear
[
--help
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
2.3. shell:each, each
Abstract
Synopsis
shell:each
[
--help
] {
values
} {
function
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
values | The collection of arguments to iterate over. |
function | The function to execute. |
2.4. shell:echo, echo
Abstract
Synopsis
shell:echo
[
--help
] [
-n
] {
argument
...}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
-n | Do not print the trailing newline character. |
argument | Specifies a space delimited list of arguments to print. |
2.5. shell:exec, exec
Abstract
exec more /path/to/fuse.log
. Doing this can lead to performance degradation.
Synopsis
shell:exec
[
--help
] {
command
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
command | Specifies the command, with arguments, to execute. |
2.6. shell:grep, grep
Abstract
Synopsis
shell:grep
[
--help
] [[
-i
] | [
--ignore-case
]] [[
-w
] | [
--word-regexp
]] [[
-n
] | [
--line-number
]] [[
-x
] | [
--line-regexp
]] [[
-v
] | [
--invert-match
]] {
regex
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
-i, --ignore-case | Ignore case distinctions in both the regex and the input files. |
-w, --word-regexp |
Select only lines containing matches that form whole words.
A match qualifies if it meets one of the following conditions:
|
-n, --line-number | Display the line number of the match within its input file. |
-x, --line-regexp | Selects only those matches that exactly match the whole line. |
-v, --invert-match | Select non-matching lines. |
regex | Specifies the regular expression to match. |
2.7. shell:head, head
Abstract
Synopsis
shell:head
[
--help
] [
-n numLines
] {[
path
] | [
URL
]}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
-n | Specifies the number of lines to display. Default is 1. |
path | The path(s) of the file to display, separated by whitespace (separated by - for STDIN) |
URL | Specifies the URL(s) to display, separated by whitespace (separated by - for STDIN) |
2.8. shell:history, history
Abstract
Synopsis
shell:history
[
--help
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
2.9. shell:if, if
Abstract
Synopsis
shell:if
[
--help
] {
condition
} {
ifTrue
} [
ifFalse
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
condition | Boolean condition. |
ifTrue | Function to evaluate, if condition is true. |
ifFalse | Function to evaluate, if condition is false. |
2.10. shell:info, info
Abstract
Synopsis
shell:info
[
--help
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this utility |
2.11. shell:java, java
Abstract
Synopsis
shell:java
[
--help
] [[
-m
] | [
--method
] methodName
] {
className
} [
arguments
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-m , --method | Specifies the name of a method to invoke. The default is main() . |
className | Specifies the name of the class to invoke. |
arguments | Specifies the arguments to pass to the method of the given className. |
2.12. shell:logout, logout
Abstract
Synopsis
shell:logout
[
--help
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
2.13. shell:more, more
Abstract
Synopsis
shell:more
[
--help
] [
--lines numLines
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
--lines | Specifies the number of lines to display before pausing. |
2.14. shell:new, new
Abstract
Synopsis
shell:new
[
--help
] {
class
} [
arg
...]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
class | The class of the object to create. |
args | The constructor arguments. |
2.15. shell:printf, printf
Abstract
Synopsis
shell:printf
[
--help
] {
format
} {
arguments
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
format | The output format pattern to use |
arguments | The arguments for the given format pattern |
2.16. shell:sleep, sleep
Abstract
Synopsis
shell:sleep
[
--help
] [[
-s
] | [
--second
]] {
duration
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-s, --second | Specify the duration in seconds (instead of milliseconds). |
duration | The time to sleep in milliseconds (default) or in seconds (with the -s option). |
2.17. shell:sort, sort
Abstract
Synopsis
shell:sort
[
--help
] [[
-t
] | [
--field-separator
] sep
] [[
-b
] | [
--ignore-leading-blanks
]] [[
-f
] | [
--ignore-case
]] [[
-r
] | [
--reverse
]] [[
-k
] | [
--key
] keys
] [[
-n
] | [
--numeric-sort
]] [[
-u
] | [
--unique
]] {
file
...}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-t , --field-separator | Specifies a character to use as a field separator. The default is whitespace. |
-b , --igonore-leading-blanks | Igonores leading blanks. |
-f , --ignore-case | Ignores case when sorting. |
-r , --reverse | Reverses the result of the sort. |
-k , --key | Specifies a space delimited list of fields to use for sorting. |
-n , --numeric-set | Compares according to string numerical value. |
-u , --unique | Outputs only the first of an equal run. |
files | Specifies a space delimited list of files to sort. |
2.18. shell:source, source
Abstract
Synopsis
shell:source
[
--help
] {
script
} [
arguments
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
script | A URI pointing to the script |
arguments | Arguments to pass to the script |
2.19. shell:tac, tac
Abstract
Synopsis
shell:tac
[
--help
] [
-f fileName
]
Arguments
Option | Interpretation |
---|---|
--help | Displays the online help for this command |
-f | Specifies the name of the file into which the output is written. |
2.20. shell:tail, tail
Abstract
Synopsis
shell:head
[
--help
] [
-n lineNum
] [
-s seconds
] [
-f
] {[
path
] | [
URL
]...}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
-n | Specifies the number of lines to display. The default is 1. |
-s | Specifies the interval, in seconds, to sleep before checking for changes to display. |
-f | Follow file changes. |
path | A space delimited list of file paths to display. |
URL | A space delimited list of file URLs to display. |
2.21. shell:watch, watch
Abstract
Synopsis
shell:watch
[
--help
] [[
-n
] | [
--interval
] seconds
] {
command
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-n ,--interval | Specifies the interval, in seconds, between executions of the command. The default is 1. |
command | Specifies the command to watch and refresh. |
Chapter 3. ActiveMQ Console Commands
activemq:
then press Tab at the prompt to view the available commands.
3.1. activemq:browse, browse
Abstract
Synopsis
activemq:browse
{
--amqurl brokerURL
} [
--msgsel
{
msgsel
...}
] [
--factory className
] [
--passwordFactory className
] [
--user username
] [
--password password
] [
--view
{
attr
...}
] [[
-Vheader
] | [
-Vcustom
] | [
-Vbody
]] [
--version
] [[
--help
] | [
-h
] | [
-?
]]
destName
Arguments
Argument | Interpretation |
---|---|
--amqurl brokerURL | Specifies the URL of the broker to which you are connecting. |
--msgsel msgsel1,msgsel2,... | Displays messages matched by the message selector. |
--factory className | Load className as the javax.jms.ConnectionFactory to use for creating connections. |
--passwordFactory className | Load className as the org.apache.activemq.console.command.PasswordFactory for retrieving the password from a keystore. |
--user username | Username to use for JMS connections. |
--password password | Password to use for JMS connections. |
-Vheader | Shows all the standard JMS message headers. |
-Vcustom | Shows all the custom fields added to each JMS message. |
-Vbody | Shows the body of the message. |
--view attr1,attr1,... | Selects the specific attribute of the message to view. |
--version | Displays the version information. |
-h, -?, --help | Displays the online help for this command. |
Message filters
--msgsel
option take the form header=value
. Table 3.2, “Message Headers for Filtering” lists the headers you can use to filter messages.
Name | Type |
---|---|
JMSCorrelationID | String |
JMSDeliveryMode | 1 -Non-Persistent, 2 -Persistent |
JMSDestination | javax.jms.Destination |
JMSExpiration | long |
JMSMessageID | String |
JMSPriority | int |
JMSRedelivered | boolean |
JMSReplyTo | javax.jms.Destination |
JMSTimestamp | long |
JMSType | String |
Examples
TEST.FOO
on a broker:
JBossA-MQ:karaf@root>
activemq:browse --amqurl tcp://localhost:61616 TEST.FOO
TEST.FOO
queue:
JBossA-MQ:karaf@root>
activemq:browse --amqurl tcp://localhost:61616 -Vbody TEST.FOO
10
:
JBossA-MQ:karaf@root>
activemq:browse --amqurl tcp://localhost:61616 --msgsel JMSMessaageID='*:10' TEST.FOO
3
, enter:
JBossA-MQ:karaf@root>
activemq:browse --amqurl tcp://localhost:61616 --msgsel JMSPriority=3 TEST.FOO
JBossA-MQ:karaf@root>
activemq:browse --amqurl tcp://localhost:61616 --msgsel JMSMessaageID='*:10',JMSPriority=3 TEST.FOO
3.2. activemq:bstat, bstat
Abstract
Synopsis
activemq:bstat
[
--jmxurl JMXUrl
] [
--pid PID
] [
-jmxuser userName
] [
-jmxpassword password
] [
-jmxlocal
] [
--version
] [[
--help
] | [
-h
] | [
-?
]] {
brokerName
}
Arguments
Argument | Description |
---|---|
--jmxurl URL | Sets the JMX URL used to locate brokers. |
--pid PID | Set the pid to connect to (only on Sun JVM). |
--jmxuser user | Sets the JMX user, used for authentication. |
--jmxpassword password | Sets the JMX password, used for authentication. |
--jmxlocal | Use the local JMX server instead of a remote server. |
--version | Displays the version information. |
-h, -?, --help | Displays the online help for this command. |
brokerName | The name of the broker |
3.3. activemq:list
Abstract
Synopsis
activemq:list
[
--jmxurl JMXUrl
] [
--pid PID
] [
-jmxuser userName
] [
-jmxpassword password
] [
-jmxlocal
] [
--version
] [[
--help
] | [
-h
] | [
-?
]]
Arguments
Argument | Interpretation |
---|---|
--jmxurl URL | Sets the JMX URL to connect to |
--pid PID | Set the pid to connect to (only on Sun JVM). |
--jmxuser user | Sets the JMX user, used for authentication |
--jmxpassword password | Sets the JMX password, used for authentication |
--jmxlocal | Specifies to use the local JMX server instead of a remote server |
--version | Displays the version information |
-h, -?, --help | Displays the online help for this command |
3.4. activemq:purge, purge
Abstract
Synopsis
activemq:purge
[
--msgsel
{
msgsel
...}
] [
--pid PID
] [
--jmxurl JMXUrl
] [
-jmxuser userName
] [
-jmxpassword password
] [
-jmxlocal
] [
--version
] [[
--help
] | [
-h
] | [
-?
]] {
destName
}
Arguments
Option | Interpretation |
---|---|
--msgsel msgsel1,msgsel2,... | Purges messages matched by the message selector. See the section called “Message filters”. |
--jmxurl URL | Sets the JMX URL used to locate the broker. |
--pid PID | Set the pid to connect to (only on Sun JVM). |
--jmxuser user | Sets the JMX user, used for authentication. |
--jmxpassword password | Sets the JMX password, used for authentication. |
--jmxlocal | Specifies to use the local JMX server instead of a remote server |
--version | Displays the version information |
-h, -?, --help | Displays the online help for this command |
destName | The specified message destination(s) |
Examples
TEST.FOO
on a broker:
JBossA-MQ:karaf@root>
activemq:purge TEST.FOO
10
:
JBossA-MQ:karaf@root>
activemq:purge --msgsel JMSMessaageID='*:10' TEST.FOO
3
, enter:
JBossA-MQ:karaf@root>
activemq:purge --msgsel JMSPriority=3 TEST.FOO
JBossA-MQ:karaf@root>
activemq:purge --msgsel JMSMessaageID='*:10',JMSPriority=3 TEST.FOO
3.5. activemq:query, query
Abstract
Synopsis
activemq:query
[
-QMBeanType=name
] [
-xQMBeanType=name
] [
--objname query
] [
--xobjname query
] [
--view
{
attr
...}
] [
--jmxurl JMXUrl
] [
--pid PID
] [
-jmxuser userName
] [
-jmxpassword password
] [
-jmxlocal
] [
--version
] [[
--help
] | [
-h
] | [
-?
]]
Arguments
Argument | Interpretation |
---|---|
-Q type=name | Adds to the search list the specific object type matched by the defined object identifier. |
-xQ type=name | Removes from the search list the specific object type matched by the object identifier. |
--objname query | Adds to the search list objects matched by the query similar. |
--xobjname query | Removes from the search list objects matched by the query. |
--view attr1,attr2,... | Selects the specific attribute of the object to view. By default, all attributes are displayed. |
--jmxurl URL | Sets the JMX URL to connect to. |
--pid PID | Set the pid to connect to (only on Sun JVM). |
--jmxuser user | Sets the JMX user, used for authentication |
--jmxpassword password | Sets the JMX password, used for authentication |
--jmxlocal | Specifies to use the local JMX server instead of a remote server |
--version | Displays the version information |
-h, -?, --help | Displays the online help for this command |
Examples
JBossA-MQ:karaf@root>
activemq:query
TEST.FOO
:
JBossA-MQ:karaf@root>
activemq:query -QTopic=TEST.FOO
host
:
JBossA-MQ:karaf@root>
activemq:query -QBroker=*host
JBossA-MQ:karaf@root>
activemq:query -QQueue=*
.FOO
except those that also begin with ActiveMQ.Advisory.
:
JBossA-MQ:karaf@root>
activemq:query -QTopic=*.FOO -xQTopic=ActiveMQ.Advisory.*
Chapter 4. Admin Console Commands
admin:
then press Tab at the FuseMQkaraf:karaf@root>
prompt to view the available commands.
4.1. admin:change-opts, change-opts
Abstract
Synopsis
admin:change-opts
[
--help
] {
name
} {
opts
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
name | The name of the container for which you want to change the Java options |
opts | The Java options to change |
4.2. admin:change-rmi-registry-port, change-rmi-registry-port
Abstract
Synopsis
admin:change-rmi-registry-port
[
--help
] {
name
} {
port
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
name | The name of the container instance for which you want to change the port |
port | The new RMI registry port |
4.3. admin:change-rmi-server-port, change-rmi-server-port
Abstract
Synopsis
admin:change-rmi-server-port
[
--help
] {
name
} {
port
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
name | The name of the container instance for which you want to change the port |
port | The new RMI server port |
4.4. admin:change-ssh-port, changessh-port
Abstract
Synopsis
admin:change-ssh-port
[
--help
] {
name
} {
port
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
name | The name of the container instance for which you want to change the port |
port | The new secure shell port |
4.5. admin:clone, clone
Abstract
Synopsis
admin:clone
[
--help
] [[
-l
] | [
--location
]fileName
] [[
-o
] | [
--java-opts
]JVMOpts
] [[
-s
] | [
--ssh-port
]port
] [[
-rs
] | [
--rmi-server-port
]port
] [[
-r
] | [
-rr
] | [
--rmi-port
] | [
--rmi-registry-port
]port
] [[
-v
] | [
--verbose
]] {
name
} {
cloneName
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-l, --location | Location of the cloned container instance in the file system. |
-o, --java-opts | JVM options to use when launching the cloned instance. |
-s, --ssh-port | Port number for remote secure shell connection. |
-rs, --rmi-server-port | Port number for RMI server connection. |
-r, -rr, --rmi-port, --rmi-registry-port | Port number for RMI registry connection. |
-v, --verbose | Display actions performed by the command (disabled by default). |
name | Name of the original container instance. |
cloneName | Name of the cloned container instance. |
4.6. admin:connect, connect
Abstract
Synopsis
admin:connect
[
--help
] [[
-u
] | [
--username
] userName
] [[
-p
] | [
--password
] password
] {
container
} [
command
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-u, --username | The remote user name; the default is karaf |
-p, --password | The remote user password; the default is karaf |
container | The container to connect to |
command | Command to execute on connecting |
4.7. admin:create, create
Abstract
Synopsis
admin:create
[
--help
] [[
-l
] | [
--location
] filePath
] [[
-furl
] | [
--featureURL
] URL
...] [[
-f
] | [
--feature
] feature
...] [[
-s
] | [
--ssh-port
] SSHPort
] [[
-rs
] | [
--rmi-server-port
] RMIServPort
] [[
-r
] | [
-rr
] | [
--rmi-registry-port
] | [
--rmi-port
] RMIRegPort
] [[
-o
] | [
--java-opts
] javaOpts
] {
name
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-l, --location | The location of the child's data folders on the file system. By default, the child's data is added to the InstallDir/instances/name directory |
-furl , --featureURL | Registers additional feature URLs with the child. |
-f , --feature | Specifies additional features loaded by the child. |
-s, --ssh-port | The port number for remote secure shell connection |
-rs, --rmi-server-port | The port number for RMI server connection |
-r, -rr, --rmi-registry-port, --rmi-port | The port number for RMI registry connection |
-o, --java-opts | JVM options to use when launching the child |
name | The name of the child |
4.8. admin:destroy, destroy
Abstract
Synopsis
admin:destroy
[
--help
] {
name
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
name | The name of the container to destroy |
4.9. admin:list
Abstract
Synopsis
admin:list
[
--help
] [[
-l
] | [
--location
] filePath
] [[
-o
] | [
--java-opts
] javaOpts
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-l, --location | Displays the location of the container instances |
-o, --java-opts | Displays the options used when launching the container's JVM |
4.10. admin:rename, rename
Abstract
Synopsis
admin:rename
[
--help
] {
name
} {
new-name
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
name | Current name of the container |
new-name | The new name for the container |
4.11. admin:start
Abstract
Synopsis
admin:start
[
--help
] [[
-o
] | [
--java-opts
] javaOpts
] {
name
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-o, --java-opts | The Java options used when launching the container |
name | The name of the container to start |
4.12. admin:stop
Abstract
Synopsis
admin:stop
[
--help
] {
name
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
name | The name of the container to start |
Chapter 5. Camel Console Commands
context
as a second parameter. It is now an optional parameter. However, if you do not provide the context
, the command is then considered as a bulk operation for all the camel contexts.
5.1. camel:context-info
Abstract
Synopsis
camel:context-info
[
--help
] {
contextName
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
contextName | The name of the Camel context. |
5.2. camel:context-list
Abstract
Synopsis
camel:context-list
[
--help
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
5.3. camel:context-start
Abstract
Synopsis
camel:context-start
[
--help
] {
contextName
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
contextName | The name of the Camel context. |
5.4. camel:context-stop
Abstract
Synopsis
camel:context-stop
[
--help
] {
contextName
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
contextName | The name of the Camel context. |
5.5. camel:endpoint-list
Abstract
Synopsis
camel:endpoint-list
[
--help
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
5.6. camel:route-info
Abstract
Synopsis
camel:route-info
[
--help
] {
route
} [
contextName
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
route | The Camel route ID. |
contextName | (Optional) The Camel context name. |
5.7. camel:route-list
Abstract
Synopsis
camel:route-list
[
--help
] [
contextName
]
Description
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
contextName | (Optional) The Camel context name. |
5.8. camel:route-resume
Abstract
Synopsis
camel:route-resume
[
--help
] {
route
} [
contextName
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
route | The Camel route ID. |
contextName | (Optional) The Camel context name. |
5.9. camel:route-show
Abstract
Synopsis
camel:route-show
[
--help
] {
route
} [
contextName
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
route | The Camel route ID. |
contextName | (Optional) The Camel context name. |
5.10. camel:route-start
Abstract
Synopsis
camel:route-start
[
--help
] {
route
} [
contextName
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-n ,--interval | |
route | The Camel route ID. |
5.11. camel:route-stop
Abstract
Synopsis
camel:route-stop
[
--help
] {
route
} [
contextName
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
route | The Camel route ID. |
contextName | (Optional) The Camel context name. |
5.12. camel:route-suspend
Abstract
Synopsis
camel:route-suspend
[
--help
] {
route
} [
contextName
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
route | The Camel route ID. |
contextName | (Optional) The Camel context name. |
5.13. camel:context-inflight
Abstract
Synopsis
camel:context-inflight
[
--help
] {
contextName
}
Arguments
Argument | Interpretation |
---|---|
name | The name of the Camel context. |
Options
Option | Interpretation | |
---|---|---|
--help | Displays the online help for this command. | |
--list | To limit the number of exchanges shown. | |
--sort | When the value is true, sort by longest duration and when the value is false, sort by exchange id. |
5.14. camel:component-list
Abstract
Synopsis
camel:component-list
[
--help
] {
contextName
}
Arguments
Argument | Interpretation |
---|---|
name | The name of the Camel context. |
Options
Option | Interpretation | |
---|---|---|
--help | Displays the online help for this command. |
5.15. camel:route-profile
Abstract
Synopsis
camel:route-profile
[
--help
] {
contextName
} {
route
}
Arguments
Argument | Interpretation |
---|---|
name | The name of the Camel context. |
route | The Camel route ID. |
Options
Option | Interpretation | |
---|---|---|
--help | Displays the online help for this command. |
5.16. camel:rest-registry-list
Abstract
Synopsis
camel:rest-registry-list
[
--help
] {
contextName
}
Arguments
Argument | Interpretation |
---|---|
name | The name of the Camel context where to look for the REST services. |
Options
Option | Interpretation | |
---|---|---|
--help | Displays the online help for this command. |
5.17. camel:route-reset-stats
Abstract
Synopsis
camel:route-reset-stats
[
--help
] {
contextName
}
Arguments
Argument | Interpretation |
---|---|
name | The Camel context name. |
Options
Option | Interpretation | |
---|---|---|
--help | Displays the online help for this command. |
5.18. camel:context-suspend
Abstract
Synopsis
camel:context-suspend
[
--help
] {
contextName
}
Arguments
Argument | Interpretation |
---|---|
name | The Camel context name. |
Options
Option | Interpretation | |
---|---|---|
--help | Displays the online help for this command. |
5.19. camel:rest-show
Abstract
Synopsis
camel:rest-show
[
--help
] {
contextName
}
Arguments
Argument | Interpretation |
---|---|
name | The Camel context name. |
Options
Option | Interpretation | |
---|---|---|
--help | Displays the online help for this command. |
5.20. camel:eip-explain
Abstract
Synopsis
camel:eip-explain
[
--help
] {
contextName
} {
nameOrId
}
Arguments
Argument | Interpretation |
---|---|
name | The Camel context name. |
nameOrId | The name of the EIP or a node id |
Options
Option | Interpretation | |
---|---|---|
--help | Displays the online help for this command. |
5.21. camel:context-resume
Abstract
Synopsis
camel:context-resume
[
--help
] {
contextName
}
Arguments
Argument | Interpretation |
---|---|
name | The Camel context name. |
Options
Option | Interpretation | |
---|---|---|
--help | Displays the online help for this command. |
5.22. camel:endpoint-explain
Abstract
Synopsis
camel:endpoint-explain
[
--help
] [
--filter
] {
contextName
}
Arguments
Argument | Interpretation |
---|---|
name | The Camel context name. |
Options
Option | Interpretation | |
---|---|---|
--help | Displays the online help for this command. | |
--filter | To filter endpoints by pattern. |
Chapter 6. Config Console Commands
etc
folder.
- Start the editing session for the specified configuration.config:edit
- Edits, or creates, a configuration.
- config:proplistLists the properties in the configuration.
- config:propappendAppend a new property to the configuration.
- config:propsetSets the value for a configuration property.
- config:propdelDeletes a property from the configuration.
- config:updateSaves the changes and updates the containers using the configuration.
config:
then press Tab at the prompt to view the available commands.
6.1. config:cancel
Abstract
Synopsis
config:cancel
[
--help
]
Details
Arguments
Option | Interpretation |
---|---|
--help | Displays the online help for this command |
6.2. config:delete, delete
Abstract
Synopsis
config:delte
[
--help
] [[
-f
] | [
--use-file
]] [
--no-delete-cfg-file
] {
pid
}
Details
--no-delete-cfg-file
argument, the original settings can be reloaded from the configuration file.
Arguments
Option | Interpretation |
---|---|
--help | Displays the online help for this command. |
-f , --use-file | Use a filename instead of the PID to locate the configuration. |
--no-delete-cfg-file | Does not delete the associated configuration file from the container's etc folder. |
pid | Specifies the configuration's persistent identifier. |
6.3. config:edit, edit
Abstract
Synopsis
config:edit
[
--help
] [
--force
] [[
-f
] | [
--use-file
]] {
pid
}
Details
Arguments
Option | Interpretation |
---|---|
--help | Displays the online help for this command |
--force | Forces the editing of this configuration, even if another configuration was being edited |
-f , --use-file | Use a filename instead of the PID to locate the configuration |
pid | The persistent identifier of the configuration |
6.4. config:list
Abstract
Synopsis
config:list
[
--help
] [
query
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
query | An LDAP query |
6.5. config:propappend, propappend
Abstract
Synopsis
config:propappend
[
--help
] [[
-b
] | [
--bypass-storage
]] [[
-p PID
] | [
--pid PID
]] {
name
} {
value
}
Details
-p
argument to specify a PID, however, the change is made immediately.
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
-b , --bypass-storage | Doe not write the change to the local file. |
-p , --pid | Specifies the PID of the configuration in which to make the change. The default is to change the configuration currently open for editing. |
name | Specifies the name of the property to change. |
value | Specifies the value to append to the property. |
6.6. config:propdel, propdel
Abstract
Synopsis
config:propdel
[
--help
] [[
-b
] | [
--bypass-storage
]] [[
-p PID
] | [
--pid PID
]] {
name
}
Details
-p
argument to specify a PID, however, the change is made immediately.
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
-b , --bypass-storage | Does not write the change to the local file. |
-p , --pid | Specifies the PID of the configuration in which to make the change. The default is to change the configuration currently open for editing. |
name | Specifies the name of the property to delete. |
6.7. config:proplist, proplist
Abstract
Synopsis
config:proplist
[
--help
] [[
-p PID
] | [
--pid PID
]]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-p , --pid | The PID of the configuration in which to make the change |
6.8. config:propset, propset
Abstract
Synopsis
config:propset
[
--help
] [[
-b
] | [
--bypass-storage
]] [[
-p PID
] | [
--pid PID
]] {
name
} {
value
}
Details
-p
argument to specify a PID, however, the change is made immediately.
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
-b , --bypass-storage | Does not write the change to the local file. |
-p , --pid | Specifies the PID of the configuration in which to make the change. The default is to change the configuration currently open for editing. |
name | Specifies the name of the property to set. |
value | Specifies the value to set for the property. |
6.9. config:update
Abstract
Synopsis
config:propset
[
--help
] [[
-b
] | [
--bypass-storage
]]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-b , --bypass-storage | Do not update the copy of the configuration on the file system |
Chapter 7. CXF Console Commands
JBossFuse:karaf@root> features:install cxf-commands
7.1. cxf:list-busses
Abstract
Synopsis
cxf:list-busses
[
--help
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
7.2. cxf:list-endpoints
Abstract
Synopsis
cxf:list-endpoints
[
--help
] {
busID
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
busID | The Apache CXF bus ID. |
7.3. cxf:start-endpoint
Abstract
Synopsis
cxf:start-endpoint
[
--help
] {
busID
} {
endpointName
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
busID | The Apache CXF bus ID. |
endpointName | The name of the Apache CXF endpoint. |
7.4. cxf:stop-endpoint
Abstract
Synopsis
cxf:stop-endpoint
[
--help
] {
busID
} {
endpointName
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
busID | The Apache CXF bus ID. |
endpointName | The name of the Apache CXF endpoint. |
Chapter 8. Dev Console Commands
dev:
then press Tab at the prompt to view the available commands.
8.1. dev:classloaders, classloaders
Abstract
Synopsis
dev:classloaders
[
--help
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
8.2. dev:create-dump, create-dump
Abstract
Synopsis
dev:create-dump
[
--help
] [[
-d dumpFolder
] | [
--directory dumpFolder
]] {
dumpName
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-d , --directory | Specifies the folder into which to store the dump |
dumpName | Specifies the name for the dump file |
8.3. dev:dynamic-import, dynamic-import
Abstract
Synopsis
dev:dynamic-import
[
--help
] {
bundleID
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
bundleID | A bundle ID. |
8.4. dev:framework, framework
Abstract
Synopsis
dev:framework
[
--help
] {[[
-debug
] | [
--enable-debug
]] [[
-nodebug
] | [
--disable-debug
]]} {
framework
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-nodebug, --disable-debug | Disable debugging for the OSGi framework. |
-debug, --enable-debug | Enable debugging for the OSGi framework. |
framework | Name of the OSGi framework |
8.5. dev:print-stack-traces, print-stack-traces
Abstract
Synopsis
dev:print-stack-traces
[
--help
] [
false
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
false | Disables stack traces |
8.6. dev:restart
Abstract
Synopsis
dev:restart
[
--help
] [[
-c
] | [
--clean
]]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-c, --clean | Force a clean (cold) restart by deleting the container's data directory. |
8.7. dev:show-tree, show-tree
Abstract
Synopsis
dev:show-tree
[
--help
] {
bundleID
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
bundleID | A bundle ID. |
8.8. dev:threads, threads
Abstract
Synopsis
dev:threads
[
--help
] [[
-f
] | [
--flat
]]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-f , --flat | Do not show the threads in a tree |
8.9. dev:wait-for-service, wait-for-service
Abstract
Synopsis
dev:wait-for-service
[
--help
] [[
-t
] | [
--timeout
]timeout
] [[
-e
] | [
--exception
]] {
serviceClassOrFilter
}
Description
shell:*
, admin:*
, features:*
, and so on) are represented by OSGi services of type, org.apache.karaf.shell.console.SubShell
. If you want to check that a sub-shell service is available, you could enter the following console command:
karaf@root> dev:wait-for-service -t 1000 org.apache.karaf.shell.console.SubShell true
SubShell
service installed in the container. To be more specific, you can define an LDAP filter, which specifies one or more service property values. For example, you can wait specifically for the osgi
sub-shell service by entering a command like the following:
karaf@root> dev:wait-for-service -t 1000 &(objectClass=org.apache.karaf.shell.console.SubShell)(name=osgi) true
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-t, --timeout | Timeout (specified in milliseconds: negative to not wait at all, zero to wait forever). Default is forever. |
-e, --exception | Throw an exception if the wait command times out (the service is not found). Default is false. |
serviceClassOrFilter | Specifies the OSGi service either by the service's class name or by an LDAP-style filter (which is applied to the OSGi service's properties). |
8.10. dev:watch, watch
Abstract
Synopsis
dev:watch
[
--help
] [[
--start
] | [
--stop
]] [
-i interval
] [
--list
] [
--remove
] {
bundles
...}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
--stop | Stop watching the specified bundles |
--start | Start watching the specified bundles |
-i | Specifies the interval, in milliseconds, to check the bundles. |
--list | List the bundles being watched. |
--remove | Remove the specified bundles from the watch list. |
bundles... | Specifies a whitespace delimited list of bundle URLs or bundle IDs. |
JBossA-MQ:karaf@root>
dev:watch *
Chapter 9. Fabric Console Commands
9.1. fabric:cluster-list
Abstract
Synopsis
fabric:cluster-list
[
--help
] [
Path
]
Description
fabric:cluster-list servlets
fabric:cluster-list webapps
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
Path | Path of the fabric registry node (Zookeeper registry node) to list. Relative paths are evaluated relative to the base node, /fabric/registry/clusters . If not specified, all clusters are listed |
Related topics
Section 9.35, “fabric:mq-create” |
9.2. fabric:cloud-firewall-edit
Abstract
Synopsis
fabric:cloud-firewall-edit
[
--help
] [
--owner owner
] [
--option key=value
]
Arguments
Argument | Interpretation |
---|---|
--port | The target IP port. To specify multiple ports, specify this flag multiple times on the command line—for example, --port 1234 --port 5678 . |
--flush | Flush all rules. |
--revoke | Revoke the rule for the specified port. This blocks access to the specified IP port. |
--target-container | The target container name. |
--source-container | The source container, which has access granted or revoked. |
--target-node-id | The target node ID. |
--source-cidr | The source CIDR, which has access granted or revoked. |
--provider | The cloud provider name. |
--help | Displays the online help for this command. |
9.3. fabric:cloud-service-add
Abstract
Synopsis
fabric:cloud-service-add
[
--help
] [
--provider providerName
] [
--name name
] [
--api APIName
] [
--endpoint URL
] [
--identity accessKeyID
] [
--credential secretAccessKey
] [
--owner owner
] [
--option key=value
] [
--async-registration
]
Description
fabric:cloud-service-list
to discover when the initialization has completed.
- Commercial cloud provider—if you are using a commercial cloud provider, JClouds provides prepackaged modules that encapsulate the basic connection details for the provider. The prepackaged modules are available to install as Karaf features (named
jclouds-ProviderName
) and encapsulate such details as the endpoint URI, cloud API, and so on.For example, to install an Amazon Web Services (AWS) EC2 cloud provider, you can perform the following steps (assuming you are working in a standalone container):- Install the basic set of fabric cloud commands:
karaf@root> features:install fabric-jclouds
- Install the JClouds module specifically for AWS EC2:
karaf@root> features:install jclouds-aws-ec2
- Add the AWS EC2 provider, specifying the login credentials for your EC2 account:
karaf@root> fabric:cloud-service-add --provider aws-ec2 --identity AccessKeyID --credential SecretAccessKey
- You are now ready to start creating compute instances on the
aws-ec2
cloud service, using thefabric:container-create-cloud
command.
- Private cloud service—if you are hosting your compute instances on a private cloud service, you must specify the connection details more explicitly, by supplying the
--api
and--endpoint
options. In this case, you must also define a name for the cloud service, by supplying the--name
option.For example, to define a connection to a private cloud service that uses theopenstack-nova
API through the endpoint,http://172.16.0.1:4000/v2.0/
, you can perform the following steps (assuming you are working in a standalone container):- Install the basic set of fabric cloud commands:
karaf@root> features:install fabric-jclouds
- Install the JClouds module for the
openstack-nova
API:karaf@root> features:install jclouds-api-openstack-nova
- Add the private cloud service, specifying the login credentials, API, and endpoint URL:
karaf@root> fabric:cloud-service-add --name myOpenStack --api openstack-nova --endpoint http://172.16.0.1:4000/v2.0/ --identity AccessKeyID --credential SecretAccessKey
NoteYou can provide additional customisation of the connection by setting options through the--option
flag (which can appear multiple times in the command). - You are now ready to start creating compute instances on the
myOpenStack
cloud service, using thefabric:container-create-cloud
command.
Installing the command in a fabric
fabric-jclouds
feature. To install the fabric-jclouds
feature, deploy the cloud
profile into the current container, using the fabric:container-change-profile
command.
root
container of the Fabric, you could add the cloud
profile as follows:
JBossA-MQ:karaf@root> fabric:container-list [id] [version] [alive] [profiles] [provision status] root* 1.0 true fabric, fabric-ensemble-0000-1 success JBossA-MQ:karaf@root> fabric:container-change-profile root fabric fabric-ensemble-0000-1 cloud JBossA-MQ:karaf@root> fabric:container-list [id] [version] [alive] [profiles] [provision status] root* 1.0 true fabric, fabric-ensemble-0000-1, cloud success
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--provider | The name of a commercial cloud provider (for example, aws-ec2 or rackspace ). |
--name | The JClouds service context name, which identifies the cloud service uniquely. Defaults to the provider name (as specified by the --provider option). |
--api | Specifies the cloud API (for example, ec2 , openstack-nova , or cloudstack ). |
--endpoint | Specifies the cloud service's endpoint URL. |
--identity | The identity used to access the cloud service. |
--credential | The credential used to access the cloud service. |
--owner | Specifies the EC2 AMI owner, which enables you to use private images (AWS EC2 only). |
--option | Provider-specific properties. For example: --option jclouds.regions=us-east-1 . If you want to specify more than one option, specify this option multiple times. |
--async-registration | Do not wait for the provider registration (that is, complete the registration in a background thread). |
9.4. fabric:cloud-service-list
Abstract
Synopsis
fabric:cloud-service-list
[
--help
]
Description
compute
or blobstore
), and registration (local
, for a standalone container, or fabric
, for a Fabric Container).
fabric-jclouds
feature. To install the fabric-jclouds
feature, deploy the cloud
profile into the current container, using the fabric:container-change-profile
command.
root
container of the Fabric, you could add the cloud
profile as follows:
JBossA-MQ:karaf@root>
fabric:container-list
[id] [version] [alive] [profiles] [provision status] root* 1.0 true fabric, fabric-ensemble-0000-1 success
JBossA-MQ:karaf@root>
fabric:container-change-profile root fabric fabric-ensemble-0000-1 cloud
JBossA-MQ:karaf@root>
fabric:container-list
[id] [version] [alive] [profiles] [provision status] root* 1.0 true fabric, fabric-ensemble-0000-1, cloud success
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
9.5. fabric:cloud-service-remove
Abstract
Synopsis
fabric:cloud-service-remove
[
--help
] {
Name
}
Description
fabric-jclouds
feature. To install the fabric-jclouds
feature, deploy the cloud
profile into the current container, using the fabric:container-change-profile
command.
root
container of the Fabric, you could add the cloud
profile as follows:
JBossA-MQ:karaf@root> fabric:container-list [id] [version] [alive] [profiles] [provision status] root* 1.0 true fabric, fabric-ensemble-0000-1 success JBossA-MQ:karaf@root> fabric:container-change-profile root fabric fabric-ensemble-0000-1 cloud JBossA-MQ:karaf@root> fabric:container-list [id] [version] [alive] [profiles] [provision status] root* 1.0 true fabric, fabric-ensemble-0000-1, cloud success
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
Name | The JClouds service context name, which represents the cloud provider. |
9.6. fabric:container-add-profile, container-add-profile
Abstract
Synopsis
fabric:container-add-profile
[
--help
] {
Name
} {
Profiles
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
Name | Specifies the name of the container. |
Profiles | Specifies the list of profiles to add to the container. |
9.7. fabric:container-change-profile, container-change-profile
Abstract
Synopsis
fabric:container-change-profile
[
--help
] {
Name
} {
Profiles
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
Name | Specifies the name of the container. |
Profiles | Specifies the list of profiles to deploy into the container. |
9.8. fabric:container-connect, container-connect
Abstract
Synopsis
fabric:container-connect
[
--help
] [[
-u
] | [
--username
]User
] [[
-p
] | [
--password
]Password
] {
ContainerName
} [
Command
]
Description
root2
container, you could enter a console command like Example 9.1, “Executing a Command in a Remote Container”.
Example 9.1. Executing a Command in a Remote Container
JBossA-MQ:karaf@root>
fabric:container-connect -u YourName -p YourPass root2 osgi:list
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-u, --username | Specifies the username for logging on to the remote container. The default is admin . |
-p, --password | SPecifies the password for logging on to the remote container. The default is admin . |
ContainerName | Specifies the name of the remote container. |
Command | Specifies the console command to execute on the remote container. |
9.9. fabric:container-create-child
Abstract
Synopsis
fabric:container-create-child
[
--help
] [
--ensemble-server
] [
--profile profileID
] [
--version version
] [
--jmx-user jmxUser
] [
--jmx-password jmxPass
] [
-b, --bind-address bindAddr
] [
--datastore-type storeType
] [
--datastore-option storeOption
] [
--zookeeper-password zooPass
] [
--jvm-opts jvmOpts
] [
--resolver policy
] [
-m, --manual-ip IPAddr
] {
parent
} {
name
} [
number
]
Description
- Each child container has a parent, so that the child containers form a hierarchy, with the root container as the ultimate ancestor.
- The child starts in a new JVM instance (JVM options can be passed to the new JVM through the
--jvm-opts
command option). - A complete set of data directories are created for the child instance, under the
ESBInstallDir/instances/ChildName
directory. TheESBInstallDir/system
directory is shared with the root container.
fabric:create
), you could add some child containers to the root container by entering the following command:
karaf@root> fabric:container-create-child root child 3
root
container. To check that the containers have been successfully created, invoke the fabric:container-list
command, as follows:
karaf@root> fabric:container-list [id] [version] [alive] [profiles] [provision status] root 1.0 true fabric, fabric-ensemble-0000-1 child1 1.0 true default success child2 1.0 true default success child3 1.0 true default success
child1
, child2
, and child3
, with the default
profile. This containers are ordinary (non-ensemble) containers, running fabric agents (ZooKeeper clients).
default
profile.
--profile
option multiple times. For example, if you want to deploy your own application profile, myApp
, together with the esb
profile, you would use a command like the following:
fabric:container-create-child --profile esb --profile myApp root childMyApp
Shutting down child containers
fabric:container-stop
command. For example, if a root container has three children—child1
, child2
, and child3
—you can issue the following commands in the root container console to shut down all of the containers:
karaf@root> fabric:container-stop child1 karaf@root> fabric:container-stop child2 karaf@root> fabric:container-stop child3 karaf@root> shutdown -f
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--jmx-user | The JMX username of the parent container. |
--jmx-password | The JMX password of the parent container. |
--ensemble-server | Whether the new container should be a Fabric Server. |
--profile | A profile ID to associate with the new container. To associate multiple profiles with the container, specify this flag multiple times on the command line—for example, --profile foo --profile bar . If no profile is specified, the container is associated with the default profile. |
--resolver | Specifies how the container will report its address to other containers. Valid values are localip , localhostname , publicip , publichostname , manualip . For more information see Section 9.20, “fabric:container-resolver-set”. |
-m, --manual-ip | The IP address to use, when using the manualip resolver. Used in combination with the --resolver option. |
-b, --bind-address | Specifies the default bind address. |
--datastore-type | Specifies the datastore type. |
--datastore-option | Options to pass to the container's datastore. To specify multiple options, use this flag multiple times. |
--zookeeper-password | Used in combination with the --ensemble-server option. If creating an ensemble server, specifies the Zookeeper password to use (if not specified, a password is generated automatically). |
--version | Specifies the version of the new container (the version must be created in advance using fabric:version-create ). Defaults to the current default version (use version-list to find the current default). |
--jvm-opts | Specify options to pass to the container's JVM. |
Parent | (Required) The parent container ID. |
Name | (Required) The name of the container to create. When creating multiple containers, it serves as a prefix |
Number | The number of containers that should be created. |
Related topics
fabric:container-resolver-list |
fabric:container-resolver-set |
fabric:create |
9.10. fabric:container-create-cloud
Abstract
Synopsis
fabric:container-create-cloud
[
--help
] [
--name contextName
] [
--provider cloudProvider
] [
--api cloudAPI
] [
--identity cloudIdentity
] [
--credential loginCredential
] [
--imageId imageID
] [
--os-family osFamily
] [
--os-version osVersion
] [
--hardwareId hardwareID
] [
--instanceType instanceType
] [
--locationId location
] [
--user userAcc
] [
--password userPass
] [
--public-key-file file
] [
--owner owner
] [
--group group
] [
--proxy-uri URI
] [
--ensemble-server
] [
--new-user jaasUser
] [
--new-user-password jaasUserPass
] [
--new-user-role jaasUserRole
] [
-b, --bind-address bindAddress
] [
--datastore-type storeType
] [
--datastore-option storeOption
] [
--zookeeper-password zooPass
] [
--resolver policy
] [
-m, --manual-ip IPAddr
] [
--env key=value
] [
--min-port minPort
] [
--max-port maxPort
] [
--profile profileID
] [
--version version
] [
--jvm-opts jvmOpts
] [
--add-option key=value
] [
--no-admin-access
] [
--path installPath
] {
Name
} [
Number
]
Description
fabric-jclouds
feature. To install the fabric-jclouds
feature, enter the following console command:
features:install fabric-jclouds
fabric:container-create-cloud
command provisions the container as follows:
- Creates a new node on the cloud provider. The node is created using a JClouds compute service: either by lookup in the service registry (using the provider ID as a property) or by instantiating a new node, by specifying the identity and credential of the provider.
- Connects to the created node, using the authentication metadata returned upon the node creation (this is usually a username and private key, where the username can be overridden by the
--user
option). After it connects to the node, it executes a script, which downloads the fabric distribution from the Maven proxy and untars the distribution.By default, the script uses the oldest Maven proxy server in the current ensemble (every ensemble server has a Maven proxy server deployed in it). You can optionally override the default Maven proxy by specifying the--proxy-uri
option. The script would then use the specified Maven proxy server to download the container runtime.NoteThe ability to override the Maven proxy is important in certain cases (for example, in a cloud deployment) where the remote host might not be able to access the default Maven proxy server. - Starts up the newly installed container (or containers) and installs the specified fabric profile (or profiles).
- When creating multiple containers using this command (by adding the
Number
argument), multiple nodes will be created and a root container will be installed on each node.
fabric:container-create-cloud
command with the --ensemble-server
flag, which makes the newly created container (or containers) an ensemble server, with its own fabric registry agent. The newly created ensemble server on the cloud does not join the current ensemble: it belongs to an independent ensemble (a new fabric).
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
--name | (Required) JClouds service context name. |
--provider | JClouds provider name. |
--api | The cloud API name. |
--identity | The identity used to access the cloud service. |
--credential | The credential used to access the cloud service. |
--imageId | The image ID to use for the new node(s). Alternatively, the image can be specified indirectly using the --os-family and --os-version options. Defaults to an instance of the latest version of Ubuntu. |
--os-family | Specify the image by requesting a particular kind of operating system—for example, ubuntu or redhat . To see which O/S families are available, type Tab while entering this option. Defaults to ubuntu . |
--os-version | Specifies the version of the O/S family. The version number need not be exact (it will be rounded up to the latest available patch version). Defaults to the latest version available. |
--hardwareId | Kind of hardware to use. |
--instanceType | Type of instance required. |
--locationId | The location used to create the new node(s). |
--user | Specifies the O/S user account to run on the new nodes. If the user account does not already exist on the new nodes, it will automatically be created. Defaults to the username that matches the current user. |
--password | Specifies the password associated with the O/S user account defined by the --user option. |
--public-key-file | An option to specify a public key file to copy to the created node. Copying a public key file to a node can be used for SSH access using public key authentication. If no key file is specified, Fabric attempts to auto-detect the user's public key and, if found, this key will be used by default. |
--owner | Optional owner of images; only really used for EC2, and will be deprecated in future. |
--group | Group tag to use on the new node(s). Defaults to fabric . |
--proxy-uri | URL of the Maven proxy server used to download the container runtime. |
--ensemble-server | Whether the new container should be a Fabric Server (effectively creates a new fabric). |
--new-user |
Used in combination with the
--ensemble-server option to ensure that at least one user exists in the JAAS realm of the Zookeeper login module for the new fabric (otherwise it would be impossible to connect to the newly created Fabric Server).
When using this option, you must also specify a password using the
--new-user-password option.
|
--new-user-password | Used in combination with the --new-user option and the --ensemble-server option to specify the new user's password. No default value. |
--new-user-role | Used in combination with the --new-user option and the --ensemble-server to specify the new user's role. Default is admin . |
-b, --bind-address | Specifies the default bind address. |
--datastore-type | Specifies the datastore type. |
--datastore-option | Options to pass to the container's datastore. To specify multiple options, use this flag multiple times. |
--zookeeper-password |
Used in combination with the
--ensemble-server option. Specifies the Zookeeper password, which is used to access the Zookeeper nodes under the /fabric/ path. Defaults to the password of the current session user.
If you subsequently try to join the current container to the newly-created Fabric Server (ensemble server) using the
fabric:join command, you will be prompted to enter the Zookeeper password.
|
--resolver | Specifies how the container will report its address to other containers. Valid values are localip , localhostname , publicip , publichostname , manualip . For more information see Section 9.20, “fabric:container-resolver-set”. |
-m, --manual-ip | The IP address to use, when using the manualip resolver. Used in combination with the --resolver option. |
--env | Sets an environment variable. To specify multiple environment variables, use this flag multiple times. |
--min-port | Specifies the minimum port number of the allowed IP port range. Default is 0 . |
--max-port | Specifies the maximum port number of the allowed IP port range. Default is 65535 . |
--profile | A list of profile IDs to associate with the new container. |
--version | Specifies the version of the new container (the version must be created in advance using fabric:version-create ). Defaults to the current default version (use version-list to find the current default). |
--jvm-opts | Specify options to pass to the container's JVM. |
--add-option | Specifies generic JCloud properties or provider-specify properties. For example, when using Amazon with Amazon VPC to create a container inside a VPN, you can specify --option subnetId=yoursubnetId to define the VPC subnet where you want the node to be created. If you want to specify more than one option, specify this option multiple times. |
--no-admin-access | Disables admin access, as it might not be feasible on all images. |
--path | Path on the remote filesystem where the container is to be installed. |
Name | (Required) The name of the container to create. When creating multiple containers, it serves as a prefix. |
Number | The number of containers that should be created. |
Related topics
9.11. fabric:container-create-ssh
Abstract
Synopsis
fabric:container-create-ssh
[
--help
] [
--host host
] [
--port port
] [
--min-port minPort
] [
--max-port maxPort
] [
--path path
] [
--user user
] [
--password password
] [
--new-user newUser
] [
--new-user-password newPassword
] [
--new-user-role newRole
] [
--private-key keyPath
] [
--pass-phrase passPhrase
] [
--ssh-retries retries
] [
--proxy-uri URI
] [
--ensemble-server
] [
--profile profileID
] [
--version version
] [
-b, --bind-address bindAddress
] [
--datastore-type storeType
] [
--datastore-option storeOption
] [
--zookeeper-password zooPass
] [
--jvm-optsjvmOpts
] [
--resolver policy
] [
-m, --manual-ip IPAddr
] [
--env key=value
] [
--with-admin-access
] [
--disable-distribution-upload
] {
Name
} [
Number
]
Description
- Logs into the specified SSH host, using either the provided username and password or using the provided username and private key.
- Runs a script on the remote host that that downloads the container runtime to the remote host. The runtime files are downloaded through a Maven proxy server. By default, the script uses the oldest Maven proxy server in the current ensemble (every Fabric Server has a Maven proxy server deployed in it). You can optionally override the default Maven proxy by specifying the
--proxy-uri
option. The script would then use the specified Maven proxy server to download the container runtime.NoteThe ability to override the Maven proxy is important in certain cases (for example, in a cloud deployment) where the remote host might not be able to access the default Maven proxy server. - Starts up the newly installed container (or containers) and installs the specified fabric profile (or profiles).
fabric:container-create-ssh
command with the --ensemble-server
flag, which makes the newly created container (or containers) a Fuse Server. The newly created Fuse Server on the remote host does not join the current ensemble: it belongs to an independent ensemble (a new fabric).
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
--host | (Required) Host name to SSH into. |
--port | The IP port number for the SSH connection. Default is 22 . |
--min-port | The minimum port number of the allowed IP port range. Default is 0 . |
--max-port | The maximum port number of the aollowed IP port range. Default is 65535 . |
--path | Path on the remote filesystem where the container is to be installed. |
--user | (Required) User name for login. |
--password | Password for login. If the password is omitted, private key authentication is used instead. |
--new-user |
Used in combination with the
--ensemble-server option to ensure that at least one user exists in the JAAS realm of the Zookeeper login module for the new fabric (otherwise it would be impossible to connect to the newly created Fabric Server).
When using this option, you must also specify a password using the
--new-user-password option.
|
--new-user-password | Used in combination with the --new-user option and the --ensemble-server option to specify the new user's password. No default value. |
--new-user-role | Used in combination with the --new-user option and the --ensemble-server to specify the new user's role. Default is admin . |
--private-key | Specifies the path to the private key on the local file system. The default is ~/.ssh/id_rsa on *NIX platforms or C:\Documents and Settings\UserName\.ssh\id_rsa on Windows. |
--pass-phrase | The pass phrase of the key, if private key authentication is used and the private key is encrypted. |
--ssh-retries | Maximum number or times to retry SSH connection. |
--proxy-uri | URL of the Maven proxy server used to download the container runtime. |
--ensemble-server | Creates a container on the remote host that acts as the seed for a completely new fabric, separate from the container that invokes the command. The newly created container is a Fuse server on the remote host and does not join the current ensemble. The new container belongs to an independent ensemble (a new fabric). |
--profile | A list of profile IDs to associate with the new container. |
--version | Specifies the version of the new container (the version must be created in advance using fabric:version-create ). Defaults to the current default version (use version-list to find the current default). |
-b, --bind-address | Specifies the default bind address. |
--datastore-type | Specifies the datastore type. |
--datastore-option | Options to pass to the container's datastore. To specify multiple options, use this flag multiple times. |
--zookeeper-password | Used in combination with the --ensemble-server option. If creating an ensemble server, specifies the Zookeeper password to use (if not specified, a password is generated automatically). |
--jvm-opts | Specify options to pass to the container's JVM. |
--resolver | Specifies how the container will report its address to other containers. Valid values are localip , localhostname , publicip , publichostname , manualip . For more information see Section 9.20, “fabric:container-resolver-set”. |
-m, --manual-ip | The IP address to use, when using the manualip resolver. Used in combination with the --resolver option. |
--env | Sets an environment variable. To specify multiple environment variables, use this flag multiple times. |
--with-admin-access | Indicates that the target user has administrative access (password-less sudo ). When this option is specified, Fabric will attempt to install any missing dependencies on the target host. |
--disable-distribution-upload | Flag to disable uploading the JBoss Fuse distribution. When used, the target host downloads the distribution through Maven instead. |
Name | (Required) The name of the container to create. When creating multiple containers, it serves as a prefix. |
Number | The number of containers that should be created. |
Related topics
fabric:container-resolver-list |
fabric:container-resolver-set |
fabric:create |
9.12. fabric:container-default-jvm-options, container-default-jvm-options
Abstract
Synopsis
fabric:container-default-jvm-options
[
--help
] [
JVMOptions
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
JVMOptions | Sets the default JVM options for this container. If this argument is omitted, get the current default JVM options. |
9.13. fabric:container-delete
Abstract
Synopsis
fabric:container-delete
[
--help
] [
--user user
] [
--password password
] [
-f, --force
] [[
-r
] | [
--recursive
]] {
GlobList
}
Description
-r
option.
fabric:ensemble-remove
.
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--user | Specifies the username of the user performing this action. |
--password | Specifies the password of the user performing this action. |
-f, --force | Forces execution of the command, regardless of the known state of the container. |
-r, --recursive | Recursively stops and deletes all child containers. |
GlobList | (Required) Specifies the list of containers to delete, separated by spaces. Globbing is supported as follows: ? , matches zero or one characters; * , matches zero or more characters. |
Using alternative credentials
- Child containers: Use the JMX credentials of the parent container.
- SSH containers: Use the SSH credentials of the target host.
- JClouds containers: Use the ssh credentials of the instance.
fabric:container-delete --user NewJmxUserOfParent --password NewJmxPasswordOfParent child1 fabric:container-delete --password NewSshPasswordOfTargetHost ssh1 fabric:container-delete --password NewSshPasswordOfTargetHost cloud1
9.14. fabric:container-edit-jvm-options
Abstract
Synopsis
fabric:container-edit-jvm-options
[
--help
] [
-u, --username user
] [
-p, --password password
] {
Container
} [
JVMOptions
]
Description
ssh2
and you want to add the following JVM options: -Xms2048M
-Xmx8192M
. Proceed as follows:
- Invoke the
container-edit-jvm-options
command to discover the current JVM options used by thessh2
container, as follows:JBossFuse:karaf@root> container-edit-jvm-options ssh2 -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -Djava.endorsed.dirs=/usr/lib/jvm/jre/jre/lib/endorsed:/usr/lib/jvm/jre/lib/endorsed:/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/jre/jre/lib/ext:/usr/lib/jvm/jre/lib/ext:/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/lib/ext -Dkaraf.instances=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/instances -Dkaraf.home=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133 -Dkaraf.base=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133 -Dkaraf.data=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/data -Dkaraf.etc=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/etc -Djava.io.tmpdir=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/data/tmp -Djava.util.logging.config.file=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/etc/java.util.logging.properties -Djavax.management.builder.initial=org.apache.karaf.management.boot.KarafMBeanServerBuilder -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true
- Invoke the
container-edit-jvm-options
command, passing all of new JVM options as the second argument to the command (enclosed in single or double quotes). That is, to construct the second argument, copy the JVM options output from the previous step, append your additional JVM arguments, and enclose all of these JVM options in quotes. For example:JBossFuse:karaf@root> container-edit-jvm-options ssh2 '-XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -Djava.endorsed.dirs=/usr/lib/jvm/jre/jre/lib/endorsed:/usr/lib/jvm/jre/lib/endorsed:/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/jre/jre/lib/ext:/usr/lib/jvm/jre/lib/ext:/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/lib/ext -Dkaraf.instances=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/instances -Dkaraf.home=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133 -Dkaraf.base=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133 -Dkaraf.data=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/data -Dkaraf.etc=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/etc -Djava.io.tmpdir=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/data/tmp -Djava.util.logging.config.file=/home/fuse/containers/ssh2/fabric8-karaf-1.2.0.redhat-133/etc/java.util.logging.properties -Djavax.management.builder.initial=org.apache.karaf.management.boot.KarafMBeanServerBuilder -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -Xms2048M -Xmx8192M'
- In order for these new JVM options to take effect, you need to restart the
ssh2
container, as follows:JBossFuse:karaf@root> container-stop ssh2 JBossFuse:karaf@root> container-start ssh2
- Verify that the current JVM settings have the new values, as follows:
JBossFuse:karaf@root> container-edit-jvm-options ssh2 ...
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
-u, --username | Specifies the username to log on to a remote container. |
-p, --password | Specifies the password to log on to a remote container. |
Container | The name of the container. |
JVMOptions | Specifies the container's new JVM options, which completely replace the old JVM options. If this argument is omitted, the command shows the existing JVM options for the specified container. |
9.15. fabric:container-domains, container-domains
Abstract
Synopsis
fabric:container-domains
[
--help
] {
Name
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
Name | Specifies the name of the container. |
9.16. fabric:container-info, container-info
Abstract
Synopsis
fabric:container-info
[
--help
] [
ContainerName
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
ContainerName | Specifies the name of the container for which information is provided. If not specified, the container name defaults to root . |
9.17. fabric:container-list, container-list
Abstract
Synopsis
fabric:container-list
[
--help
] [
--version Version
] [[
-v
] | [
--verbose
]] [[
ID
] | [
profile
]]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
--version | Specifies a profile version to use as filter. |
-v, --verbose | Display verbose output. |
ID | Specifies a container ID to use in filtering the output. |
profile | Specifies a profile to use in filtering the output. When a profile is specified only the containers with the profile are listed. |
9.18. fabric:container-remove-profile, container-remove-profile
Abstract
Synopsis
fabric:container-remove-profile
[
--help
] {
Name
} {
Profiles
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
Name | Specifies the name of the container. |
Profiles | Specifies the list of profiles to remove from the container. |
9.19. fabric:container-resolver-list
Abstract
Synopsis
fabric:container-resolver-list
[
--help
] [
containers
]
Description
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
containers | List of containers for which the resolver policy is displayed. Shows all containers by default. |
Related topics
9.20. fabric:container-resolver-set
Abstract
Synopsis
fabric:container-resolver-set
[
--help
] [
--container name
] [
--all
] {
Resolver
}
Description
localip localhostname publicip publichostname manualip
localip
and localhostname
resolver policies are suitable for accessing a container in a LAN. The publicip
and publichostname
resolver policies are suitable for accessing a container in a WAN (Internet), but they are typically only available for cloud containers. In the case of a the cloud, localip
and localhostname
can be used for container-to-container connections within the cloud, but for container-to-container connections from outside the cloud, you must use publicip
or publichostname
.
- When you create a new container, fabric tries to discover as much as it can about the container's host address and stores this information in the following fields in the fabric registry:
localip
(local IP address);localhostname
(local hostname);publicip
(public IP address);publichostname
(public hostname).For example, if you create a new container using thefabric:container-create-ssh
command and specify the local IP address to the--host
option, fabric attempts to perform a reverse lookup to obtain the corresponding local hostname and then stores both the local IP address and the local hostname in the Fabric Registry.If you create a new container in the cloud, the metadata sent by the cloud provider typically includes a complete set of host addresses:localip
,localhostname
,publicip
, andpublichostname
. - Every container in the fabric has its own resolver policy, which determines what kind of host address is returned to another container that wants to connect to it. The container's resolver policy is set in one of the following ways:
- (Default) By inheriting the resolver policy from the global resolver policy (specified at the time the fabric is created)
- By specifying the resolver policy explicitly at the time the container is created (through the
--resolver
option). - By invoking the
fabric:container-resolver-set
command.
- The container's resolver policy is applied whenever fabric looks up the container's host address, irrespective of what protocol is involved. In particular, the resolver policy determines the form of the host address used in the following URLs:
- Fabric Ensemble URL,
- SSH URL (console client port),
- Maven proxy URL,
- JMX URL.
SSH1
(originally created using the fabric:container-create-ssh
command) and the SSH1
container is configured with the localip
resolver policy, any container that tries to connect to SSH1
will automatically receive the local IP address of SSH1
when it looks up the Fabric Registry.
X
, Y
, and Z
want to connect to container SSH1
, the form of host address they get is determined by SSH1
's resolver policy. But if SSH1
wants to connect to container X
, it is container X
's resolver policy that is used.
Manual IP resolver policy
manualip
resolver policy is a special case. If none of the standard resolver policies are suitable for your network set-up, you can manually specify a container's host address by setting the following key in the Fabric Registry:
/fabric/registry/containers/config/ContainerName/manualip
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
--container | Apply the resolver policy to the specified container. To specify multiple containers, specify this flag multiple times on the command line—for example, --container foo --container bar . |
--all | Apply the resolver policy to all containers in the fabric. |
Resolver | (Required) The resolver policy to set on the specified container(s). Possible values are: localip , localhostname , publicip , publichostname , manualip . |
9.21. fabric:container-rollback
Abstract
Synopsis
fabric:container-rollback
[
--help
] [
--all
] {
Version
} [
ContainerList
]
Description
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
--all | Roll back all containers. |
Version | (Required) The version to roll back to. |
ContainerList | The list of containers to roll back. An empty list implies the current container. |
9.22. fabric:container-start
Abstract
Synopsis
fabric:container-start
[
--help
] [
--user user
] [
--password password
] [
-f, --force
] {
GlobList
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--user | Specifies the username of the user performing this action. |
--password | Specifies the password of the user performing this action. |
-f, --force | Forces execution of the command, regardless of the known state of the container. |
GlobList | (Required) Specifies the list of containers to start, separated by spaces. Globbing is supported as follows: ? , matches zero or one characters; * , matches zero or more characters. |
Using alternative credentials
- Child containers: Use the JMX credentials of the parent container.
- SSH containers: Use the SSH credentials of the target host.
- JClouds containers: Use the ssh credentials of the instance.
fabric:container-start --user NewJmxUserOfParent --password NewJmxPasswordOfParent child1 fabric:container-start --password NewSshPasswordOfTargetHost ssh1 fabric:container-start --password NewSshPasswordOfTargetHost cloud1
9.23. fabric:container-stop
Abstract
Synopsis
fabric:container-stop
[
--help
] [
--user user
] [
--password password
] [
-f, --force
] {
GlobList
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
--user | Specifies the username of the user performing this action. |
--password | Specifies the password of the user performing this action. |
-f, --force | Forces execution of the command, regardless of the known state of the container. |
GlobList | (Required) Specifies the list of containers to stop, separated by spaces. Globbing is supported as follows: ? , matches zero or one characters; * , matches zero or more characters. |
Using alternative credentials
- Child containers: Use the JMX credentials of the parent container.
- SSH containers: Use the SSH credentials of the target host.
- JClouds containers: Use the ssh credentials of the instance.
fabric:container-stop --user NewJmxUserOfParent --password NewJmxPasswordOfParent child1 fabric:container-stop --password NewSshPasswordOfTargetHost ssh1 fabric:container-stop --password NewSshPasswordOfTargetHost cloud1
9.24. fabric:container-update-ssh
Abstract
Synopsis
fabric:container-update-ssh-credentials
[
--help
] {
--user
} {
--password
} {
Container
}
Description
Arguments
fabric:container-update-ssh
command.
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
--user | (Required) The user ID of the user performing the operation. |
--password | (Required) The password of the user performing the operation. |
Container | (Required) The name of the container on which to perform the operation. |
9.25. fabric:container-upgrade
Abstract
Synopsis
fabric:container-upgrade
[
--help
] [
--all
] {
Version
} [
ContainerList
]
Description
fabric:profile-edit
command to guarantee atomicity of profile modifications. That is, if multiple edits need to be made to a profile, you can use fabric:container-upgrade
to roll out all of the changes in one step.
child1
, which is currently assigned to version 1.0 and has the sample
profile deployed inside it. If you need to make multiple changes to the sample
profile, you can roll out these changes atomically, as follows:
- Create a new version, 1.1, to hold the pending changes, as follows:
karaf@root> fabric:version-create Created version: 1.1 as copy of: 1.0
- Now start editing the new version of the sample profile, remembering to specify
1.1
, so that the modifications are applied to version 1.1 ofsample
. For example, to add thecamel-quartz
feature to the sample profile, enter the following command:fabric:profile-edit --feature camel-quartz sample 1.1
NoteInstead of adding the option1.1
to every edit command, you could change the default version to 1.1 by entering the command,fabric:version-set-default 1.1
. - When you have finished editing the
sample
profile and you are ready to let the changes take effect on the container,child1
, you can roll out the changes by upgrading thechild1
container to version 1.1, as follows:fabric:container-upgrade 1.1 child1
- If you are not happy with the changes you made, you can easily roll back to the old version of the
sample
profile, using thefabric:container-rollback
command, as follows:fabric:container-rollback 1.0 child1
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
--all | Upgrade all containers. |
Version | (Required) The version to upgrade to. |
ContainerList | The list of containers to upgrade. An empty list implies the current container. |
9.26. fabric:create
Abstract
Synopsis
fabric:create
[
--help
] [
--clean
] [
--no-import
] [
--import-dir dir
] [[
-v
] | [
--verbose
]] [[
-t
] | [
--time
]millis
] [[
-n
] | [
--non-managed
]] [[
-p
] | [
--profile
]profile
] [[
-b
] | [
--bind-address
]bindAddr
] [
--new-user username
] [
--new-user-password password
] [
--new-user-role role
] [
--zookeeper-password zooPassword
] [
--generate-zookeeper-password
] [
--zookeeper-data-dir dataDir
] [
--zookeeper-init-limit ticks
] [
--zookeeper-sync-limit ticks
] [
--zookeeper-ticktime millis
] [
--zookeeper-server-port zkport
] [
--wait-for-provisioning
] [[
-t
] | [
--time
]millis
] [[
-g
] | [
--global-resolver
]policy
] [[
-r
] | [
--resolver
]policy
] [[
-m
] | [
--manual-ip
]ipAddress
] [
--min-port port
] [
--max-port port
] [
--external-git-url gitURL
] [
--external-git-user gitUser
] [
--external-git-password gitPass
] [
--bootstrap-timeout
] [
ContainerList
] [
--zookeeper-purge-interval hours
] [
--zookeeper-snap-retain-count number
]
Description
- The contents of a container should now be managed using fabric profiles. Do not try to deploy bundles and features directly in a fabric container.
- The default JAAS realm is superseded by the Zookeeper login module, which stores user data in the Zookeeper registry. As the fabric is created it initializes the user data by importing all of the user data that it finds in the
etc/users.properties
file. If theusers.properties
file is empty, you can specify a new user explicitly using the--new-user
and--new-user-password
options (at least one user must be defined).
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
--clean | Clean local zookeeper cluster and configurations. |
--no-import | Disable the import of the sample registry data. |
--import-dir | Directory of files to import into the newly created ensemble. |
-v, --verbose | Flag to enable verbose output of files being imported. |
-t, --time | How long to wait (milliseconds) for the ensemble to start up, before trying to import the default data. |
-n , --non-managed | Specifies that the container remains unmanaged. |
-p, --profile | Specifies the profile (or profiles) to use for the ensemble containers in the new fabric. To specify multiple profiles, specify this flag multiple times on the command line—for example, --profile foo --profile bar . |
-b, --bind-address | Specifies the IP address of the embedded Zookeeper server. For example, this can be a useful option to specify if the container is deployed on a multi-homed host. |
--new-user |
Create a new user in the new fabric's JAAS realm. Because the
fabric:create command automatically imports user data from the etc/users.properties file, you would only need to specify this option, if the etc/users.properties file contains no valid user entries.
When using this option, you must also specify a password using the
--new-user-password option.
|
--new-user-password | Used in combination with the --new-user option to specify the new user's password. No default value. |
--new-user-role | Used in combination with the --new-user option to specify the new user's role. Default is admin . |
--zookeeper-password |
Specifies the Zookeeper password, which is used to access the Zookeeper nodes under the
/fabric/ path. Defaults to the password of the current session user.
Subsequently, because the Zookeeper password is cached in the current session, you normally do not need to provide it when executing fabric commands. You can display the Zookeeper password at any time using the
fabric:ensemble-password command.
|
--generate-zookeeper-password | Directs Fabric to generate a random Zookeeper password. Subsequently, you can display the Zookeeper password using the fabric:ensemble-password command. |
--zookeeper-data-dir | The location where ZooKeeper stores the in-memory database snapshots and, unless specified otherwise, the transaction log of updates to the database. Defaults to data/zookeeper . |
--zookeeper-init-limit | The amount of time, in ticks, to allow followers to connect and sync to a leader. Defaults to 10. |
--zookeeper-sync-limit | The amount of time, in ticks, to allow followers to sync with ZooKeeper. Defaults to 5. |
--zookeeper-ticktime | The length of a single tick, which is the basic time unit used by ZooKeeper, as measured in milliseconds. It is used to regulate heartbeats and timeouts. For example, the minimum session timeout is two ticks. Defaults to 2000 . |
--zookeeper-server-port | Specifies the IP port number of the ZooKeeper server, on which ZooKeeper listens for incoming connections. Default is 2181. |
--zookeeper-purge-interval | Set the interval in hours between triggers of the autopurge task. Must be set to a positive integer (1 and above). The default is 0. |
--zookeeper-snap-retain-count | Define the number of recent Snapshots and corresponding transaction logs in the dataDir and dataLogDir to retain on autopurge. The minimum number is 3. |
--wait-for-provisioning | Flag to wait for the initial container provisioning. |
-g, --global-resolver | Specifies the global resolver policy, which becomes the default resolver policy applied to all new containers created in this fabric. Possible values are: localip , localhostname , publicip , publichostname , manualip . The default is localhostname . |
-r, --resolver | Specifies the local resolver policy. Possible values are: localip , localhostname , publicip , publichostname , manualip . The default is localhostname . |
-m, --manual-ip | If you select the manualip resolver policy (using either the --resolver or --global-resolver options), specifies the IP address to use for the resolver. |
--min-port | Specifies the minimum port number of the allowed IP port range. Default is 0 . |
--max-port | Specifies the maximum port number of the allowed IP port range. Default is 65535 . |
--external-git-url | Specifies an external git url. |
--external-git-user | Specifies an external git user. |
--external-git-password | Specifies an external git password. |
--bootstrap-timeout | How long to wait (in milliseconds) for the initial fabric bootstrap. Default is 120000. |
ContainerList | The list of containers to include in the ensemble. An empty list implies the current container. |
Examples
ESBInstallDir/fabric/import
directory, as follows:
fabric:create --clean
fabric:create --clean --no-import
fabric:create --clean --import-dir CustomImportDir
reg1
, reg2
, and reg3
, are now included in the registry ensemble (an ensemble must consist of an odd number of containers):
fabric:create reg1 reg2 reg3
Related topics
9.27. fabric:ensemble-add
Abstract
Synopsis
fabric:ensemble-add
[
--help
] {
ContainerList
}
Description
root1
, root2
, and root3
—where root1
is an Fuse Server and root2
and root3
are ordinary Fabric Containers. You can now add root2
and root3
to the current ensemble by entering the following console command:
fabric:ensemble-add root2 root3
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
ContainerList | The list of containers to add. |
9.28. fabric:ensemble-list
Abstract
Synopsis
fabric:ensemble-list
[
--help
]
Description
fabric:container-list
instead.
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
9.29. fabric:ensemble-password
Abstract
Synopsis
fabric:ensemble-password
[
--help
] [
--commit
] [
NewPassword
]
Description
/fabric/
path, which contains critical configuration data for the fabric. This command can be used either to display the current ensemble password or to change the ensemble password to a new value.
JBossFuse:karaf@root> fabric:ensemble-password
JBossFuse:karaf@root> fabric:ensemble-password mysecret Updating the password... Password updated. Please wait a little while for the new password to get delivered as a config update to all the fabric nodes. Once, the nodes all updated (nodes must be online), please run: fabric:ensemble-password --commit JBossFuse:karaf@root> fabric:ensemble-password --commit Only the current password is allowed access to fabric now. JBossFuse:karaf@root>
JBossFuse:karaf@root> fabric:ensemble-password --commit
Arguments
Argument | Interpretation |
---|---|
NewPassword | Specifies the new ZooKeeper password for the ensemble. |
--help | Displays the online help for this command |
--commit | Displays the online help for this command |
9.30. fabric:ensemble-remove
Abstract
Synopsis
fabric:ensemble-remove
[
--help
] {
ContainerList
}
Description
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
ContainerList | The list of containers to remove. Must be an even number of containers. |
9.31. fabric:git-gc
Abstract
Synopsis
fabric:git-gc
[
options
] [
container
]
Description
fabric:git-gc --all
fabric:git-gc {containerName}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--all | Sends the command to all containers. |
--timeout | Specifies the timeout when waiting for responses. The default is 10000 milliseconds. |
--aggressive | Sets the --aggressive option for the git-gc command. |
9.32. fabric:git-master
Abstract
Synopsis
fabric:git-master
[
options
] [
container
]
Description
fabric:git-master
Current Git master is: child3
fabric:git-master root
Changing Git master to new cluster member: root
Arguments
Argument | Interpretation |
---|---|
container | Specifies the new master container |
--help | Displays the online help for this command |
9.33. fabric:join
Abstract
Synopsis
fabric:join
[
--help
] [[
-f
] | [
--force
]] [[
-p
] | [
--profile
]Profile
] [[
-n
] | [
--non-managed
]] [
--zookeeper-password zooPassword
] [[
-r
] | [
--resolver
]policy
] [[
-m
] | [
--manual-ip
]ipAddress
] [
--min-port port
] [
--max-port port
] [[
-b
] | [
--bind-address
]BindAddress
] [[
-v
] | [
--version
]Version
]
URL
[
ContainerName
]
Description
fabric:join
command can be used to join a standalone container to fabric.
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
-f , --force | Forces the provided container name to be used. |
-p , --profile | Specifies the profile to associate with the container after it joins the fabric. The fabric profile, which installs the Fabric Agent, is automatically assigned to all managed containers. |
-n , --non-managed | Registers the container with the fabric's ensemble, but does not install a Fabric Agent into the container. The container's configuration is not managed by the fabric and continues to behave like a standalone container except that it can be discovered through the fabric's ensemble. |
--zookeeper-password | The ensemble password for the fabric that you are trying to join. If you do not specify this option, you will be prompted to enter the password. |
-r, --resolver | Specifies the local resolver policy. Possible values are: localip , localhostname , publicip , publichostname , manualip . The default is localhostname . |
-m, --manual-ip | If you select the manualip resolver policy (using the --resolver option), specifies the IP address to use for the resolver. |
--min-port | Specifies the minimum port number of the allowed IP port range. Default is 0 . |
--max-port | Specifies the maximum port number of the allowed IP port range. Default is 65535 . |
-b , --bind-address | Specifies the IP address of the embedded Zookeeper server (if there is one). For example, this can be a useful option to specify if the container is deployed on a multi-homed host. Note that it only makes sense to specify this option if the current container deploys a Zookeeper server (for example, if the current container is an ensemble container). |
-v , --version | Specifies the version of the container after joining the fabric. Default is 1.0 . |
URL | Specifies the URL of one of the Fabric Servers, specified in the format Host[:Port] . The Port value defaults to 2181 . |
ContainerName | Specifies a unique name for the container to use when joining the fabric. By default, the value of the karaf.name property from the etc/system.properties file is used. |
Examples
fabric:join myhostA ishmael
myhostA
is the hostname of a Fabric Server (you must connect to a Fabric Server, not an ordinary fabric container) and the container is assigned the name ishmael
. You will be prompted to enter the fabric's Zookeeper password.
karaf.name
property from the etc/system.properties
file. The default setting for this property is root
. To avoid conflicts, you should either specify a container name or change the value of the karaf.name
property.
fabric:join
command must be a standalone container. It is an error to invoke fabric:join
in a container that is already part of a fabric.
-p
argument as follows:
fabric:join -p whaler myhostA ishmael
ishmael
is assigned the profile, whaler
, when it joins the fabric.
fabric:join -n myhostA ishmael
9.34. fabric:leave
Abstract
Synopsis
fabric:leave
[
options
] [
containerName
]
Description
fabric:leave
Container joined will be disconnected from Fabric. This operation is not reversible. Do you want to proceed? (yes/no): yes Container joined will leave Fabric and restart - cleanup will be done asynchronously.
fabric:leave containerName
Arguments
Argument | Interpretation |
---|---|
containerName | Specifies the name of container to remove from the fabric. |
--help | Displays the online help for this command. |
--f | Forces the execution of the command regardless of the known state of the container. |
9.35. fabric:mq-create
Abstract
Synopsis
fabric:mq-create
[
--help
] [
--group groupName
] [
--network brokerGroup
] [
--networks-username user
] [
--networks-password password
] [
--create-container
containerID,
...
] [
--assign-container
containerID,
...
] [
--config configFile
] [
--data dataDir
] [
--kind brokerKind
] [
--replicas num
] [
--port port
] [
--profile profile
] [
--parent-profile parentProfile
] [
--client-profile clientProfile
] [
--client-parent-profile clientParentProfile
] [
--minimum-instances num
] [[
--property
] | [
-D
]prop] [
--jmx-user jmxUser
] [
--jmx-password jmxPassword
] [
--jvm-opts jvmOpts
] [
--version version
] {
name
}
Arguments
Argument | Description |
---|---|
--help | Displays the online help for this command. |
--group groupName | Specifies the name of the group to which brokers using this profile are assigned. By default brokers are assigned to the default group. |
--network brokerGroup | Specifies a broker group to which brokers using this profile will establish network connections to form a network of brokers. To specify multiple broker groups, specify this flag multiple times on the command line—for example, --network GroupA --network GroupB . |
--networks brokerGroup | Deprecated. |
--networks-username | Specifies the username part of the credentials that are used to connect to the broker networks specified by the --network option. |
--networks-password | Specifies the password part of the credentials that are used to connect to the broker networks specified by the --network option. |
--create-container containerID,... | Specifies a comma separated list of child containers to create using the new profile. The new containers will be children of the container from which the command is executed. |
--assign-container containerID,... | Specifies a comma separated list of containers to which the new profile will be deployed. |
--config configFile | Specifies the ensemble path of the XML configuration template used by the profile. The path will have the syntax /fabric/configs/versions/version/profiles/profile/config.xml . |
--data dataDir | Specifies the path, relative to the container, for storing the persistence data for a broker using the profile. |
--kind brokerKind | Specifies the kind of broker which determines to the number of broker instances to be created. Possible values are: StandAlone (one instance); MasterSlave (two instances); Replicated (three instances). The default value is MasterSlave . |
--replicas num | Number of replicas required for replicated brokers (which typically use a parent-profile of mq-replicated profile). |
--port port | Port number for a transport connector, specified using the syntax --port transportConnectorName=port , where transportConnectorName is the value of the name attribute from a transportConnector element in the configuration template. To specify multiple ports, specify this flag multiple times on the command line—for example, --port openwire=11111 --port mqtt-ssl=4321 . |
--ports port | Deprecated. |
--no-ssl | Disables support for SSL/TLS protocol. |
--profile profile | The profile name to create or update, if defining N+1 broker groups. Defaults to mq-broker-$GROUP.$NAME . |
--parent-profile parentProfile | The parent profile to extend. |
--client-profile clientProfile | The profile name for clients to use to connect to the broker group. Defaults to mq-client-$GROUP . |
--client-parent-profile clientParentProfile | The parent profile used for the client-profile for clients connecting to the broker group. Defaults to default . |
--minimum-instances num | Minimum number of containers required of this broker's profile. |
--property, -D | Additional properties to define in the profile. To specify multiple properties, specify this flag multiple times on the command line—for example, --property keyA=valA --property keyB=valB . |
--jmx-user | The JMX username for logging on to the parent's JMX port. |
--jmx-password | The JMX password for logging on to the parent's JMX port. |
--jvm-opts | Specify options to pass to the container's JVM. |
--version version | Specifies the version into which the profile is stored. Defaults to the current default version. |
name | Specifies the name of the new broker profile. |
Examples
myBrokerProfile
that uses the XML template file myConfigTemplate.xml
use the command:
fabric:mq-create --config /fabric/configs/versions/1.0/profiles/mq-base/myConfigTemplate.xml myBrokerProfile
fabric:mq-create --config /fabric/configs/versions/1.0/profiles/mq-base/myConfigTemplate.xml --create-container broker1 myBrokerProfile
fabric:mq-create --config /fabric/configs/versions/1.0/profiles/mq-base/myConfigTemplate.xml --assign-container container1 myBrokerProfile
SSL/TLS support
keytool
, must be available on your PATH. To disable SSL/TLS support, specify the --no-ssl
option.
9.36. fabric:patch-apply
Abstract
Synopsis
fabric:patch-apply
[
--help
] [[
-u
] | [
--username
]User
] [[
-p
] | [
--password
]Password
] [
--version Version
] [
--all-versions
] {
URL
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
-u, --username | Remote user name. |
-p, --password | Remote user password. |
--version | Applies the patch to the specified version. Defaults to the current default version. |
--all-versions | Applies the patch to all versions. |
URL | Specifies the URL from which the patch is downloaded. |
9.37. fabric:profile-change-parents
Abstract
Synopsis
fabric:profile-change-parents
[
--help
] [
--version version
] {
Name
} {
ParentList
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
--version | The profile version. Defaults to the current default version (use version-list to find the current default). |
Name | (Required) Name of the profile. |
ParentList | (Required) The list of new parent profiles. |
9.38. fabric:profile-copy, profile-copy
Abstract
Synopsis
fabric:profile-copy
[
--help
] [
--version Version
] [
-f
] [
--force
] {
SourceProfile
} {
TargetProfile
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--version | The profile version to copy. Defaults to the current default version. |
-f, --force | Flag to allow overwriting the target profile (if it already exists). |
SourceProfile | The name of the profile to copy. |
TargetProfile | The name of the newly created copy. |
9.39. fabric:profile-create
Abstract
Synopsis
fabric:profile-create
[
--help
] [
--version version
] [
--parent parent
] {
Name
}
Description
fabric:profile-create
separately for each version (use fabric:version-list
to list all versions).
fabric:profile-edit
command.
test
, which has the current default version and inherits from the parent profiles, mq
and camel
, enter the following console command:
fabric:profile-create --parent mq --parent camel test
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
--version | The profile version. Defaults to the current default version (use version-list to find the current default). |
--parent | Optionally specifies one or multiple parent profiles. To specify multiple parent profiles, specify this flag multiple times on the command line—for example, --parent foo --parent bar . |
--parents | Deprecated. |
Name | (Required) Name of the new profile. |
9.40. fabric:profile-delete
Abstract
Synopsis
fabric:profile-delete
[
--help
] [
--version version
] {
Profile
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
--version | The profile version to delete. Defaults to the current default version (use version-list to find the current default). |
Profile | (Required) Name of the profile to delete. |
9.41. fabric:profile-display
Abstract
Synopsis
fabric:profile-display
[
--help
] [
--version version
] [[
-o
] | [
--overlay
]] {
Profile
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
--version | Select a specific profile version. Defaults to the current default version (use version-list to find the current default). |
-o, --overlay | Enable overlay. Shows the effective profile settings, taking into account the settings inherited from parent profiles. |
Profile | (Required) The name of the profile. |
9.42. fabric:profile-edit
Abstract
Synopsis
fabric:profile-edit
[
--help
] [[
-p
] | [
--pid
]PID
] [[
-r
] | [
--repository
] | [
-f
] | [
--feature
] | [
-b
] | [
--bundle
] | [
-c
] | [
--config
] | [
-s
] | [
--system
] | [
-o
] | [
--overrides
] | [
-l
] | [
--lib
] | [
-n
] | [
--endorsed
] | [
-x
] | [
--extension
]] [[
--set
] | [
--delete
]] [[
--append
] | [
--remove
]] [
--import-pid
] [[
--delimiter
]delim
] [[
--resource
]ResourceName
] {
Profile
} [
Version
]
Description
- Feature repository locations—to add a feature repository to the profile, enter a command in the following format:
fabric:profile-edit --repository RepoURL Profile [Version]
For example, to add thefuse-fabric
feature repository to the profile, enter a command like the following:fabric:profile-edit --repository mvn:io.fabric8/fuse-fabric/6.3.0.redhat-xxx/xml/features Profile [Version]
To delete repositories, enter a command of the following form:fabric:profile-edit --delete --repository RepoURL Profile [Version]
To edit repository locations directly, using a visual text editor, enter the following command:fabric:profile-edit Profile [Version]
The visual editor opens, showing the contents of the specified profile's agent properties. To edit the repository settings, add, modify, or delete lines of the following form:repository.ID=URL
WhereID
is an arbitrary unique identifier andURL
gives the location of a single feature repository. Only one repository URL can be specified on each line. - Features to install—to add features to the profile, enter a command in the following format:
fabric:profile-edit --feature FeatureName Profile [Version]
To add multiple features, you can specify the--feature
flag multiple times in this command. For example, to add thecamel-jetty
and thecamel-quartz
features to the default version of thesample
profile, enter a command like the following:fabric:profile-edit --feature camel-jetty --feature camel-quartz sample
To delete features, enter a command of the following form:fabric:profile-edit --delete --feature FeatureName Profile [Version]
To edit features directly, using the visual text editor, enter the following command:fabric:profile-edit Profile [Version]
The visual editor opens, showing the contents of the specified profile's agent properties. To edit the features, add, modify, or delete lines of the following form:feature.ID=FeatureName
WhereID
is an arbitrary unique identifier andFeatureName
is the name of a feature. - Bundles to install—to add bundles to the profile, enter a command in the following format:NoteThe fabric:profile-edit command supports two flag variations for specifying bundles—
--bundle
and--bundles
. The--bundles
flag is included for backwards compatibility. Regardless of which variation you use, to specify multiple bundles on the same command line, you must include the flag with each bundle specification.fabric:profile-edit --bundle BundleURL Profile [Version]
For example, to addcamel-quartz
bundle to thesample
profile, enter a command like the following:fabric:profile-edit --bundle mvn:org.apache.camel/camel-quartz/2.17.0.redhat-630xxx sample
To delete bundles, enter a command of the following form:fabric:profile-edit --delete --bundle BundleURL Profile [Version]
To edit bundles directly, using the visual text editor, enter the following command:fabric:profile-edit Profile [Version]
The visual editor opens, showing the contents of the specified profile's agent properties. To edit the bundles, add, modify, or delete lines of the following form:bundle.ID=URL
WhereID
is an arbitrary unique identifier andURL
specifies the bundle's location. - Configuration settings for the OSGi Config Admin service—to modify or create a configuration setting from the OSGi Config Admin service, enter a command in the following format:
fabric:profile-edit --pid PID/Property=Value Profile [Version]
Where PID is a persistent ID, which is used in the context of the OSGi Config Admin service to identify a collection of related properties. For example, to change the value of the secure HTTPS port used by the Jetty server in thesample
profile, you could edit theorg.osgi.service.http.port.secure
property from theorg.ops4j.pax.web
PID using a command like the following:fabric:profile-edit --pid org.ops4j.pax.web/org.osgi.service.http.port.secure=8553 sample
To delete a property, enter a command of the following form:fabric:profile-edit --delete --pid PID/Property Profile [Version]
If the value of the PID property has the form of a comma-separated list, you can use the--append
option and the--remove
option to manipulate the list value. For example:fabric:profile-edit --pid org.example.foo/my.prop=a Profile [Version] fabric:profile-edit --append --pid org.example.foo/my.prop=b Profile [Version] fabric:profile-edit --append --pid org.example.foo/my.prop=c Profile [Version] fabric:display Profile ... PID: org.example.foo my.prop a,b,c
To edit OSGi Config Admin settings directly, using the visual text editor, enter the following command:fabric:profile-edit --pid PID Profile [Version]
The visual editor opens, showing the contents of the specified profile'sPID.properties
file (which is actually stored in the ZooKeeper registry). To edit the properties, add, modify, or delete lines of the following form:Property=Value
- Property settings from etc/config.properties—to modify or create a Java system property in the container's
etc/config.properties
file (which affects the container), enter a command in the following format:fabric:profile-edit --config Property=Value Profile [Version]
For example, to change the value of thekaraf.startlevel.bundle
Java system property inconfig.properties
, you would enter a command like the following:fabric:profile-edit --config karaf.startlevel.bundle=80 Profile [Version]
To delete a Java system property fromconfig.properties
, enter a command of the following form:fabric:profile-edit --delete --config Property Profile [Version]
If the value of the configuration property has the form of a comma-separated list, you can use the--append
option and the--remove
option to manipulate the list value. For example:fabric:profile-edit --config my.prop=a Profile [Version] fabric:profile-edit --append --config my.prop=b Profile [Version] fabric:profile-edit --append --config my.prop=c Profile [Version] fabric:display Profile ... Config Properties : my.prop = a, b, c
To edit the Java system properties directly, using the visual text editor, enter the following command:fabric:profile-edit Profile [Version]
The visual editor opens, showing the contents of the specified profile's agent properties. To edit the Java system properties (analogous toetc/config.properties
), add, modify, or delete lines of the following form:config.Property=Value
- Property settings from etc/system.properties—to modify or create a Java system property in the container's
etc/system.properties
file (which affects bundles deployed in the container), enter a command in the following format:fabric:profile-edit --system Property=Value Profile [Version]
For example, to change the default port for the OSGi HTTP service, you would enter a command like the following:fabric:profile-edit --system org.osgi.service.http.port=8181 Profile [Version]
If the system property,Property
, is already set at the JVM level (for example, through the--jvm-opts
option to thefabric:container-create
command), the precedingfabric:profile-edit
command will not override the JVM level setting. If you want to override the JVM level setting, you must indicate this explicitly by adding thekaraf.override
prefix to the property name,Property
—for example:fabric:profile-edit --system karaf.override.Property=Value Profile [Version]
To delete a Java system property fromsystem.properties
, enter a command of the following form:fabric:profile-edit --delete --system Property Profile [Version]
If the value of the system property has the form of a comma-separated list, you can use the--append
option and the--remove
option to manipulate the list value. For example:fabric:profile-edit --system my.prop=a Profile [Version] fabric:profile-edit --append --system my.prop=b Profile [Version] fabric:profile-edit --append --system my.prop=c Profile [Version] fabric:display Profile ... System Properties : my.prop = a, b, c
To edit the Java system properties directly, using the visual text editor, enter the following command:fabric:profile-edit Profile [Version]
The visual editor opens, showing the contents of the specified profile's agent properties. To edit the Java system properties (analogous toetc/system.properties
), add, modify, or delete lines of the following form:system.Property=Value
If you want to ensure that this setting overrides any JVM level setting, set the system property as follows:system.karaf.override.Property=Value
fabric:profile-edit
are immediately propagated to the containers that use that profile. This is not the recommended way to edit profiles, however: if you change multiple settings in the profile, you could potentially put the affected containers into an inconsistent state. To guarantee atomicity, it is better to use the fabric:profile-edit
command in combination with the fabric:container-upgrade
command—see fabric:container-upgrade.
Enclosing an Option Value in Quotes
http.nonProxyHosts="myserver1|myserver2"
, on the default
profile, you would use the following command:
fabric:profile-edit --system "karaf.override.http.nonProxyHosts=\"myserver1|myserver2\"" default
karaf.override
prefix is prepended to the property name, because http.nonProxyHosts
is already set at the JVM level and needs to be overridden.
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-p, --pid | Edit an OSGi configuration property, specified in the format PID/Property. To specify multiple values, specify this flag multiple times on the command line—for example, --pid PID/Property=Value --pid PID/Property=Value . |
-r, --repository | Add (or delete) a feature repository. To specify multiple values, specify this flag multiple times on the command line—for example, --repository foo --repository bar . |
--repositories | Deprecated. |
-f, --feature | Add (or delete) a feature. To specify multiple values, specify this flag multiple times on the command line—for example, --feature foo --feature bar . |
--features | Deprecated. |
-b, --bundle | Add (or delete) a bundle. To specify multiple values, specify this flag multiple times on the command line—for example, --bundle foo --bundle bar . |
--bundles | Deprecated. |
-c, --config | Edit the Java system properties that affect the container (analogous to editing etc/config.properties in a root container). To edit multiple configuration properties, specify this flag multiple times on the command line—for example, --config Property=Value --config Property=Value . |
-s, --system | Edit the Java system properties that affect installed bundles (analogous to editing etc/system.properties in a root container). To edit multiple system properties, specify this flag multiple times on the command line—for example, --system Property=Value --system Property=Value . |
-o, --overrides | Add (or delete) a bundle override. A bundle override can be used to override the bundle version installed by a feature. For example, if a feature installs version 1.0.0 of a particular bundle, you could use a bundle override to install version 1.0.1 of the bundle instead. To specify multiple values, specify this flag multiple times on the command line—for example, --overrides BundleURL --overrides BundleURL . |
-l, --lib | Add (or delete) a library. To specify multiple values, specify this flag multiple times on the command line—for example, --lib LibURL --lib LibURL . |
--libs | Deprecated. |
-n, --endorsed | Add (or delete) an endorsed library. To specify multiple values, specify this flag multiple times on the command line—for example, --endorsed LibURL --endorsed LibURL . |
-x, --extension | Add (or delete) an extension library. To specify multiple values, specify this flag multiple times on the command line—for example, --extension LibURL --extension LibURL . |
--set | Set or create values (selected by default). |
--delete | Delete values. |
--append | When editing list values, append the specified value to the list. Can only be used in combination with the --config , --system , and --pid options. |
--remove | When editing list values, remove the specified value from the list. Can only be used in combination with the --config , --system , and --pid options. |
--delimiter | Specifies the delimiter to use in combination with the --append and --remove options. Default is , (comma). |
--resource | When editing with the visual text editor, specifies the name of the resource to edit. |
-i, --import-pid | Imports the PIDs that are edited, from local OSGi Config Admin. |
Profile | (Required) Name of the profile to edit. |
Version | Version of the profile to edit. Defaults to the current default version (use version-list to find the current default). |
9.43. fabric:profile-export
Abstract
Synopsis
fabric:profile-export
{
ProfileDestination
}
Description
fabric:profile-export
command allows you to export profiles to files.
fabric/export
folder under the karaf home directory. To change the default location, specify the path as an argument:
fabric:profile-export /path/to/profile/location
Arguments
Argument | Interpretation |
---|---|
ProfileDestination | The location to which the profile will be exported. |
9.44. fabric:profile-import
Abstract
Synopsis
fabric:profile-import
{
ProfileSource
}
Description
fabric:profile-import
command allows you to import profiles stored in the form of ZIP files.
fabric:profile-import /path/to/profile/location/profiles.zip
fabric:profile-import mvn:com.foo/location/1.0/profile/profiles.zip
Arguments
Argument | Interpretation |
---|---|
ProfileSource | The location of the profile to be imported. |
9.45. fabric:profile-list
Abstract
Synopsis
fabric:profile-list
[
--help
] [
--version version
] [
--hidden
]
Description
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
--version | Specifies the version of the profiles to list. Defaults to the current default version (use version-list to find the current default). |
--hidden | Shows hidden profiles. |
9.46. fabric:profile-refresh, profile-refresh
Abstract
Synopsis
fabric:profile-refresh
[
--help
] {
Profile
} [
Version
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
Profile | The profile to refresh. |
Version | The profile version to refresh. Defaults to the current default version. |
9.47. fabric:profile-rename, profile-rename
Abstract
Synopsis
fabric:profile-rename
[
--help
] [
--version Version
] [
-f
] [
--force
] {
OldName
} {
NewName
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--version | The profile version to rename. Defaults to the current default version. |
-f, --force | Flag to allow replacing the target profile (if it already exists). |
OldName | The current name of the profile. |
NewName | The new name of the profile. |
9.48. fabric:require-profile-delete
Abstract
Synopsis
fabric:require-profile-delete
[
--help
] {
Profile
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
Profile | A profile ID. |
9.49. fabric:require-profile-list
Abstract
Synopsis
fabric:require-profile-list
[
--help
]
Description
example-camel
profile and the example-cxf
profile have requirements set, you could see output like the following:
karaf@root> fabric:require-profile-list [profile] [# minimum] [# maximum] [depends on] example-camel 2 4 example-cxf 2 4
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
9.50. fabric:require-profile-set
Abstract
Synopsis
fabric:require-profile-set
[
--help
] [
--minimum MinInstance
] [
--maximum MaxInstance
] [
--dependsOn Dependency
] {
Profile
}
Description
example-camel
profile, you would enter the following command:
karaf@root> require-profile-set --minimum 2 --maximum 4 example-camel
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
--minimum | The minimum number of instances of this profile expected to be running in the fabric. |
--maximum | The maximum number of instances of this profile expected to be running in the fabric. |
--dependsOn | The profile IDs that must be provisioned before this profile. To specify multiple profile IDs, specify this flag multiple times on the command line—for example, --dependsOn foo --dependsOn bar . |
Profile | A profile ID. |
9.51. fabric:status
Abstract
Synopsis
fabric:status
[
--help
]
Description
fabric:require-profile-set
command. For example, if you configured the example-camel
profile to require a minimum of two instances and a maximum of four instances, and there is currently only one instance running, the example-camel
profile would get a health rating of 50%.
fabric:status
command produces output like the following:
karaf@root> fabric:status [profile] [instances] [health] cloud 1 100% example-camel 0 0% example-cxf 0 0% fabric 1 100% fabric-ensemble-0000-1 1 100%
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
Related topics
9.52. fabric:version-create
Abstract
Synopsis
fabric:version-create
[
--help
] [
--parent parentVersion
] {
Version
}
Description
--parent
option. Using the --description
option, you can add a note to describe the new version. If no version is specified, the command creates a new minor version by default. For example:
karaf@root> fabric:version-list [version] [default] [# containers] 1.0 true 1 karaf@root> fabric:version-create --description "Test version" Created version: 1.1 as copy of: 1.0 karaf@root> fabric:version-list [version] [default] [# containers] [description] 1.0 true 1 1.1 false 0 Test version
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
--default | Set the created version to be the new default version. |
--description | Add a description of the newly created version. Enclose the text within double quotes. |
--parent | The parent version. By default, uses the latest version as the parent. |
Version | The new version to create. If not specified, defaults to the next minor version. |
9.53. fabric:version-delete
Abstract
Synopsis
fabric:version-delete
[
--help
] {
Version
}
Description
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
Version | (Required) The version to delete. |
9.54. fabric:version-list
Abstract
Synopsis
fabric:version-list
[
--help
]
Description
karaf@root> fabric:version-list [version] [default] [# containers] 1.0 true 1 1.1 false 0
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
9.55. fabric:version-set-default
Abstract
Synopsis
fabric:version-set-default
[
--help
] {
Version
}
Description
fabric:profile-create
, the new profile is created in the default version by default. The fabric:version-set-default
changes the default version that is used by these commands.
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
Version | (Required) Version number to use as the new default version. |
9.56. fabric:watch
Abstract
Synopsis
fabric:watch
[
--help
] [
--no-upload
] [[
--start
] | [
--stop
]] [
-i interval
] [
--list
] [
--remove
] {
bundles
...}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
--no-upload | If specified, updated bundles are not uploaded to the fabric's Maven proxy repository. |
--stop | Stop watching the specified bundles |
--start | Start watching the specified bundles |
-i | Specifies the interval, in milliseconds, to check the bundles. |
--list | List the bundles being watched. |
--remove | Remove the specified bundles from the watch list. |
bundles... | Specifies a whitespace delimited list of bundle URLs or bundle IDs. |
fabric:watch *
, Fabric monitors all bundles whose location matches mvn:* and that have -SNAPSHOT in their URL.
Chapter 10. Features Console Commands
features:
then press Tab at the karaf>
prompt to view the available commands.
10.1. features:addurl, addurl
Abstract
Synopsis
features:addurl
[
--help
] [[
-i
] | [
--install-all
]] {
urls
}
Description
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-i, --install-all | Install all of the features in the specified feature repository URLs. |
urls | One or more repository URLs separated by whitespaces. |
10.2. features:chooseurl, chooseurl
Abstract
Synopsis
features:chooseurl
[
--help
] {
project
} {
version
}
Description
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
feature | Specifies the project name for the feature repository to add. |
version | Specifies the version of the project's feature repository to add. |
10.3. features:info
Abstract
Synopsis
features:info
[
--help
] [[
-c
] | [
--configuration
]] [[
-b
] | [
--bundle
]] [[
-t
] | [
--tree
]] [[
-d
] | [
--dependency
]] {
featureName
} {
version
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-c, --configuration | Display configuration information. |
-b, --bundle | Display bundle information. |
-t, --tree | Display feature tree. |
-d, --dependency | Display dependency information. |
command |
10.4. features:install
Abstract
Synopsis
features:install
[
--help
] {
name
} [
version
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
name | The name of the feature to install |
version | The version of the feature |
10.5. features:list
Abstract
Synopsis
features:list
[
--help
] [[
-i
] | [
--installed
]]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-i, --installed | Displays the list of all installed features |
10.6. features:listurl
Abstract
Synopsis
features:listurl
[
--help
] [[
-v
] | [
--validate
]] [[
-vo
] | [
--verbose
]]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-v ,--validate | Validate current version of descriptors. |
-vo ,--verbose | Shows validation output. |
10.7. features:listVersions, listVersions
Abstract
Synopsis
features:listVersions
[
--help
] {
feature
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
feature | Name of a feature. |
10.8. features:refreshUrl
Abstract
Synopsis
features:refreshUrl
[
--help
] {
urls
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
urls | The repository URLs to reload (leave empty for all). |
10.9. features:removeUrl
Abstract
Synopsis
features:removeUrl
[
--help
] {
urls
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-n ,--interval | |
urls | One or more repository URLs separated by whitespace. |
10.10. features:removeRepository
Abstract
Synopsis
features:removeRepository
[
--help
] {
repository
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
repository | The name of a features repository. |
10.11. features:uninstall
Abstract
Synopsis
features:uninstall
[
--help
] {
features
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
features | A space-separated list of features to uninstall, where each feature is specified in the format feature[/version] (that is, the version is optional). |
Chapter 11. JAAS Console Commands
- Start the editing session.jaas:manage
- Edit the realm's user data.
- jaas:usersLists all of the users.
- jaas:useraddAdd a new user.
- jaas:userdelDelete a user.
- jaas:roleaddAdd a new role to a user.
- jaas:roledelDelete a role from a user.
- jaas:pendingLists all of the pending changes that have been made to the realms, but have not been applied to the container.
- Apply the changes to the JAAS realm and ends the editing session.jaas:update
jaas:
then press Tab at the prompt to view the available commands.
11.1. jaas:cancel, cancel
Abstract
Synopsis
jaas:cancel
[
--help
]
Details
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
11.2. jaas:groupadd
Abstract
Synopsis
jaas:groupadd
[
--help
] {
username
} {
group
}
Details
username
user to the group
group in the current realm.
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
username | The user to add to the group. |
group | The name of the group to which the user is added. |
11.3. jaas:groupcreate
Abstract
Synopsis
jaas:groupcreate
[
--help
] {
group
}
Details
group
.
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
group | Name of the group to create. |
11.4. jaas:groupdel
Abstract
Synopsis
jaas:groupdel
[
--help
] {
username
} {
group
}
Details
username
user from the group
group in the current realm.
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
username | The user to remove from the group. |
group | The name of the group from which the user is removed. |
11.5. jaas:grouproleadd
Abstract
Synopsis
jaas:grouproleadd
[
--help
] {
groupname
} {
role
}
Details
role
role to the groupname
group in the current realm.
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
groupname | The name of the group to which you are adding a role. |
role | The name of the role to add to the group. |
11.6. jaas:grouproledel
Abstract
Synopsis
jaas:grouproledel
[
--help
] {
groupname
} {
role
}
Details
role
role from the groupname
group.
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
groupname | The name of the group from which you are removing a role. |
role | The name of the role to remove from the group. |
11.7. jaas:groups
Abstract
Synopsis
jaas:groups
[
--help
]
Details
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
11.8. jaas:manage, manage
Abstract
Synopsis
jaas:manage
[
--help
] {[
--realm realm
] | [
--index index
]} [
--module module
] [
--force
]
Details
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--realm | Select the realm to edit by specifying its realm name. |
--index | Select the realm to edit by specifying its index. |
--module | Specify which of the realm's login modules are to be edited. |
--force | Force the switch to the specified realm. If a different realm was already opened for editing its changes are abandoned without being applied. |
Examples
--realm
option. For example, if the container is a standalone instance (no fabric installed), you can start to edit the karaf
realm as follows:
jaas:manage --realm karaf
fabric-jaas
feature automatically installs another realm named karaf
at a higher priority, so that it overrides the default karaf
realm. For example, in a fabric, the jaas:realms command returns a list similar to the following:
Index Realm Module Class 1 karaf org.apache.karaf.jaas.modules.properties.PropertiesLoginModule 2 karaf io.fabric8.jaas.ZookeeperLoginModule
--index
option, specifying one of the index values from the list. The current active karaf
realm is the ZookeeperLoginModule
, which is selected by the index value, 2
, as follows:
jaas:manage --index 2
11.9. jaas:pending, pending
Abstract
Synopsis
jaas:pending
[
--help
]
Details
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
11.10. jaas:realms, realms
Abstract
Synopsis
jaas:realms
[
--help
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
11.11. jaas:roleadd, roleadd
Abstract
Synopsis
jaas:roleadd
[
--help
] {
username
} {
role
}
Details
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
username | Specifies the name of the user to modify. |
role | Specifies the role which is appended to the user data. |
11.12. jaas:roledel, roledel
Abstract
Synopsis
jaas:roledel
[
--help
] {
username
} {
role
}
Details
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
username | Specifies the name of the user to modify. |
role | Specifies the role which is removed from the user data. |
11.13. jaas:update
Abstract
Synopsis
jaas:update
[
--help
]
Details
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
11.14. jaas:useradd, useradd
Abstract
Synopsis
jaas:useradd
[
--help
] {
username
} {
password
}
Details
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
username | Specifies the name of the user to add. |
password | Specifies the password used to authenticate the user. |
11.15. jaas:userdel, userdel
Abstract
Synopsis
jaas:userdel
[
--help
] {
username
}
Details
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--without-group-deletion or -w | If the user is the last one of this group, the group will not be deleted. |
username | Specifies the name of the user to add. |
11.16. jaas:users, users
Abstract
Synopsis
jaas:users
[
--help
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
Chapter 12. Jasypt encryption
12.1. jasypt:encrypt
Abstract
Synopsis
jasypt:encrypt
[
password
] [
--help
]
Details
JBossA-MQ:karaf@root> jasypt:encrypt passwordsample JBossA-MQ:karaf@root>(ENC)J0qF8Sk5P4KJRdyLs8LzQYRHfyXs7yWT/CyIDPqHqK2wwc6FbgwsTPK+WCsBgMK9
Arguments
Argument | Interpretation |
---|---|
password | Enter the password to be encrypted in plain text |
--help | Displays the online help for this command |
Chapter 13. Log Console Commands
log:
then press Tab at the prompt to view the available commands.
13.1. log:clear
Abstract
Synopsis
log:clear
[
--help
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
13.2. log:display, display, ld
Abstract
Synopsis
log:display
[
--help
] [
-p pattern
] [
-n numLines
] [
--no-color
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-p | The pattern for formatting the output |
-n | The number of entries to display |
--no-color | Do not use syntax highlighting when displaying the log. |
13.3. log:display-exception, display-exception, lde
Abstract
Synopsis
log:display-exception
[
--help
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
13.4. log:get, get
Abstract
Synopsis
log:get
[
--help
] {
logger
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
logger | Specifies the logger name, ALL , or ROOT . The default is ROOT . |
13.5. log:set, set
Abstract
Synopsis
log:set
[
--help
] {[
DEFAULT
] | [
TRACE
] | [
DEBUG
] | [
INFO
] | [
WARN
] | [
ERROR
]} {
logger
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
level | Specifies the logging level. |
logger | Specifies the logger name. The default is ROOT . |
13.6. log:tail
Abstract
Synopsis
log:tail
[
--help
] [
-p pattern
] [
-n numLines
] [
--no-color
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-p | The pattern for formatting the output |
-n | The number of entries to display |
--no-color | Do not use syntax highlighting when displaying the log. |
Chapter 14. OBR Console Commands
obr
shell, run the following command:
JBossFuse:karaf@root:>
features:install obr
obr:
then press Tab at the JBossFuse:karaf@root>
prompt to view the available commands.
14.1. obr:addUrl
Abstract
Synopsis
obr:addUrl
[
--help
] {
urls
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
urls | The repository URLs to add to the OBR service, separated by whitespaces |
14.2. obr:deploy
Abstract
Synopsis
obr:deploy
[
--help
] {
bundles
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
bundles | A list of bundle names to deploy, separated by whitespaces |
14.3. obr:info
Abstract
Synopsis
obr:info
[
--help
] {
bundles
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
bundles | Specifies the bundles to query for information, separated by whitespaces |
14.4. obr:list
Abstract
Synopsis
obr:list
[
--help
] {
args
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
args | The arguments |
14.5. obr:listUrl
Abstract
Synopsis
obr:listUrl
[
--help
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
14.6. obr:refreshUrl
Abstract
Synopsis
obr:refreshUrl
[
--help
] {
urls
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
urls | The repository URLs to refresh (leave empty for all) |
14.7. obr:removeUrl
Abstract
Synopsis
obr:removeUrl
[
--help
] {
urls
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
urls | The repository URLs to remove from the OBR service, separated by whitespace |
14.8. obr:source
Abstract
Synopsis
obr:source
[
--help
] [
-x
] {
folder
} {
bundles
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-x | Extracts the archive |
folder | The local directory or folder for storing sources |
bundles | A list of bundles to download the sources for |
14.9. obr:start
Abstract
Synopsis
obr:start
[
--help
] {
bundles
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
bundles | List of bundle names to deploy, separated by whitespaces |
Chapter 15. OSGi Console Commands
osgi:
then press Tab at the prompt to view the available commands.
15.1. osgi:bundle-level, bundle-level
Abstract
Synopsis
osgi:bundle-level
[
--help
] [
--force
] {
id
} [
startLevel
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--force | Forces the command to execute. |
id | Specifies the id for the bundle. |
startLevel | Specifies the new start level for the bundle. |
15.2. osgi:bundle-services, bundle-services
Abstract
Synopsis
osgi:bundle-services
[
-u
] [
-p
] [
-a
] [
--help
] [
--force
] {
id
}
Arguments
Argument | Interpretation |
---|---|
-u | Displays the services used by the bundle. |
-p | Displays the properties for each service. |
-a | Displays all of the services provided by the bundle including the Apache Karaf commands which are hidden by default. |
--help | Displays the online help for this command. |
--force | Forces the command to execute. |
id | Specifies the id for the bundle. |
15.3. osgi:classes, classes
Abstract
Synopsis
osgi:classes
[
--help
] [
--force
] [[
-a
] | [
--display-all-files
]] {
ids
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--force | Forces the command to execute. |
-a, --display-all-files | Also lists the files contained in the bundles. |
ids | Space-separated list of bundle IDs. |
15.4. osgi:find-class, find-class
Abstract
Synopsis
osgi:find-class
[
--help
] {
className
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
className | Class name or partial class name to find. |
15.5. osgi:headers, headers
Abstract
Synopsis
osgi:headers
[
--help
] {
id
...}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
id | Specifies a space delimited list of bundle IDs. |
15.6. osgi:info
Abstract
Synopsis
osgi:info
[
--help
] {
id
...}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
id | Specifies a space delimited list of bundle IDs. |
15.7. osgi:install, install
Abstract
Synopsis
osgi:install
[
--help
] [[
-s
] | [
--start
]] {
url
...}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-s , --start | Starts the bundles after installation |
url | Specifies a space delimited list of bundle URLs. |
15.8. osgi:list, list
Abstract
Synopsis
osgi:list
[
--help
] [
-u
] [
-t threshold
] [
-l
] [
-s
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-u | Shows the update locations |
-t | Specifies the start level threshold. The default is the value of the karaf.systemBundlesStartLevel property whose default value is 50. |
-l | Shows the locations of the bundles |
-s | Shows the symbolic names of the bundles |
15.9. osgi:ls, ls
Abstract
Synopsis
osgi:ls
[
--help
] [
-a
] [
-u
] [
--force
] [
id
...]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-a | Lists all services |
-u | Lists the services in use |
--force | Forces the command to execute |
id | Specifies a space separated list of bundle IDs. |
15.10. osgi:refresh, refresh
Abstract
Synopsis
osgi:refresh
[
--help
] [
--force
] {
id
...}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--force | Forces the command to execute. |
id | Specifies a space delimited list of bundle IDs. |
15.11. osgi:resolve, resolve
Abstract
Synopsis
osgi:resolve
[
--help
] [
--force
] {
id
...}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--force | Forces the command to execute. |
id | Specifies a space delimited list of bundle IDs. |
15.12. osgi:restart, restart
Abstract
Synopsis
osgi:restart
[
--help
] [
--force
] {
id
...}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--force | Forces the command to execute. |
id | Specifies a space delimited list of bundle IDs. |
15.13. osgi:shutdown, shutdown
Abstract
Synopsis
osgi:shutdown
[
--help
] [[
-f
] | [
--force
]] [[
hh:mm
] | [
+m
]]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
-f , --force | Forces the command to execute. |
hh:mm | Specifies the time to shut down the broker in hours and minutes. The time is specified in 24 hour time. For example, 13:30 specifies that the container will shutdown at 1:30pm. |
+m | Specifies the time, in minutes, to pause before shutting down the OSGi framework. For example, +30 specifies that the container will wait thirty minutes before shutting down the OSGi framework. |
15.14. osgi:start, start
Abstract
Synopsis
osgi:start
[
--help
] [
--force
] {
id
...}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--force | Forces the command to execute. |
id | Specifies a space delimited list of bundle IDs. |
15.15. osgi:start-level, start-level
Abstract
Synopsis
osgi:start
[
--help
] [
level
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
level | Specifies the new start level to set. |
15.16. osgi:stop, stop
Abstract
Synopsis
osgi:stop
[
--help
] [
--force
] {
id
...}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--force | Forces the command to execute. |
id | Specifies a space delimited list of bundle IDs. |
15.17. osgi:uninstall, uninstall
Abstract
Synopsis
osgi:uninstall
[
--help
] [
--force
] {
id
...}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--force | Forces the command to execute. |
id | Specifies a space delimited list of bundle IDs. |
15.18. osgi:update, update
Abstract
Synopsis
osgi:update
[
--help
] [
--force
] {
id
} [
location
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--force | Forces the command to execute. |
id | Specifies ID of the bundle. |
location | Specifies the location from which the update is loaded. If no location is specified the container will use either the bundle's Bundle-UpdateLocation property or the bundle's original location. |
Chapter 16. Packages Console Commands
packages:
then press Tab at the prompt to view the available commands.
16.1. packages:exports, exports
Abstract
Synopsis
packages:export
[
--help
] [[
-d
] | [
--details
]] [
-s
] [[
-i
] | [
--imports
]] [
id
...]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-d, --details | Reformat the output in master/detail layout, which makes it easier to see how related details are grouped together. |
-s | Show the Symbolic name column, which shows the symbolic name of the bundle to which the exported package belongs. |
-i, --imports | Show the Imported by column, which lists all of the bundles that import the exported package. |
id | Specifies a whitespace separated list of bundle IDs to check. |
16.2. packages:imports, imports
Abstract
Synopsis
packages:imports
[
--help
] [[
-i
] | [
--show-importer
]] [
id
...]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-i, --show-importer | Show the bundle(s) that import a package. |
id | Specifies a whitespace separated list of bundle IDs to check. |
Chapter 17. Patch Console Commands
- the patch name
- a description of the patch
- the list of bundles included in the patch
- You receive a notice from customer support that a patch is available.
- Using the URL provided by customer support, you download the patch using the patch:add command.This command downloads an archive file, unzips the archive, and puts the relevant JAR files under the container's
system/
directory. The patch does not overwrite any of the existing JAR files and the patch is not actually installed until you run thepatch:install
command. - You install the patch using the patch:install command.
- If you notice that the patch is causing issues, you can remove it using the patch:rollback command.
patch:
then press Tab at the prompt to view the available commands.
17.1. patch:add, download
Abstract
system
directory
Synopsis
patch:add
[
--help
] [
--bundles
] {
URL
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--bundles | List the bundles included in the patch. |
URL | Specifies the URL from which the patch is downloaded. |
17.2. patch:fabric-install
Abstract
Synopsis
patch:fabric-install
[
--help
] {
Patch
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--upload | Upload the patch artifacts to a Maven repository. |
-s, --simulation | Simulates patch installation. |
--merge-prefer-new | When patching a resource file in a profile, if there is a merge conflict in a property setting, prefer the value from the patch (new). |
--merge-keep-old | When patching a resource file in a profile, if there is a merge conflict in a property setting, prefer the existing value (old). |
--merge-overwrite | When patching a resource file in a profile, replace the entire resource file with the patched one. |
-u, --username | Remote user name. |
-p, --password | Remote user password. |
--version | Profile version to which the patch is applied. |
Patch | The name of the patch to install. |
17.3. patch:fabric-synchronize
Abstract
Synopsis
patch:fabric-synchronize
[
--help
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
17.4. patch:install
Abstract
Synopsis
patch:install
[
--help
] {
patch
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
patch | Specifies the name of the patch to install. |
17.5. patch:list
Abstract
Synopsis
patch:list
[
--help
] [
--bundles
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
--bundles | List the bundles for each patch. |
17.6. patch:rollback
Abstract
Synopsis
patch:rollback
[
--help
] {
patch
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
patch | Specifies the name of the patch to roll back. |
17.7. patch:simulate, simulate
Abstract
Synopsis
patch:simulate
[
--help
] {
patch
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
patch | Specifies the name of the patch to simulate installing. |
Chapter 18. Service Component Runtime (SCR) Console Commands
18.1. scr:activate
Abstract
Synopsis
scr:activate
[
--help
] {
ComponentName
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
ComponentName | The SCR component name (which can be found from the listing produced by the scr:list command). |
18.2. scr:deactivate
Abstract
Synopsis
scr:deactivate
[
--help
] {
ComponentName
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
ComponentName | The SCR component name (which can be found from the listing produced by the scr:list command). |
18.3. scr:details
Abstract
Synopsis
scr:details
[
--help
] [[
-s
] | [
--show-hidden
]] {
ComponentName
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
-s, --show-hidden | Show all installed components, including the system components (which are hidden by default). |
ComponentName | The SCR component name (which can be found from the listing produced by the scr:list command). |
18.4. scr:list
Abstract
Synopsis
scr:list
[
--help
] [[
-s
] | [
--show-hidden
]]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command. |
-s, --show-hidden | Show all installed components, including the system components (which are hidden by default). |
Chapter 19. SSH Console Commands
19.1. ssh:ssh, ssh
Abstract
Synopsis
ssh:ssh
[
--help
] [[
-l username
] | [
--username username
]] [[
-P password
] | [
--password password
]] [[
-p port
] | [
--port port
]] {
hostname
} [
command
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-l, --username | The username for remote login |
-P, --password | The password for remote login |
-p, --port | The port to use for the SSH connection |
hostname | The hostname to connect to via SSH |
command | Specifies a command to execute upon connecting. |
19.2. ssh:sshd, sshd
Abstract
Synopsis
ssh:sshd
[
--help
] [[
-b
] | [
--background
]] [[
-p port
] | [
--port port
]]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-b, --background | Specifies that the service will run in the background. |
-p, --port | Specifies the port to setup for the SSH server. The default is 8101 . |
Chapter 20. Web Console Commands
web:
then press Tab at the prompt to view the commands in this group.
20.1. web:list
Abstract
Synopsis
web:list
[
--help
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
Chapter 21. The wrapper:install Command
wrapper:install
Karaf console command—for installing JBoss Fuse as a service—is deprecated since JBoss Fuse 6.3 and will be removed in a future release of JBoss Fuse. To install the Apache Karaf container as a service, it is recommended that you use the new karaf-service-*.sh
scripts from the bin/contrib
directory instead.
wrapper
shell, run the following command:
JBossFuse:karaf@root:>
features:install wrapper
21.1. wrapper:install
Abstract
Synopsis
wrapper:install
[
--help
] [[
-s
] | [
--start-type
] mode
] [[
-n
] | [
--name
] serviceName
] [[
-d
] | [
--display
] displayName
] [[
-D
] | [
--description
] description
]
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-s, --start-type | The mode in which the service is installed, either AUTO_START or DEMAND_START ; the default is AUTO_START |
-n, --name | The service name used when installing the service; the default is karaf |
-d, --display | The display name of the service |
-D, --description | The description of the service |
Chapter 22. ZooKeeper Console Commands
fabric-zookeeper-commands
feature, as follows:
features:install fabric-zookeeper-commands
22.1. zk:create
Abstract
Synopsis
zk:create
[
--help
] [
-r|--recursive
] [
-i|--import
] [
-e|--ephemeral
] [
-s|--sequential
] [
-a|--acl ListOfACLs
] [
-o|--overwrite
] {
path
} {
data
}
Description
- Persistent
- The new znode is permanently stored in the ZooKeeper registry. This is the default.
- Persistent sequential
- The new znode is permanently stored in the ZooKeeper registry and a 10-digit sequence number is appended to the specified znode name. Selected by the
--sequential
option. - Ephemeral
- The new znode exists only for the duration of the current client session. When the session is over, the znode is removed. Selected by the
--ephemeral
option. - Ephemeral sequential
- The new znode exists only for the duration of the current client session and a 10-digit sequence number is appended to the specified znode name. When the session is over, the znode is removed. Selected by combining the
--ephemeral
option with the--sequential
option.
Scheme:ID:Permissions
world:anyone
- The permissions apply to all users.
auth:
- The permissions apply to all authenticated users, irrespective of their identity (the
ID
field is left empty). digest:MD5Hash
- The permissions apply to the user whose username and password generate the specified MD5 hash value,
MD5Hash
. ip:IPAddress
- The permissions apply to the ZooKeeper client with the specified IP address.
Permissions
string consists of one or more of the following characters: r
(read), w
(write), c
(create), d
(delete), and a
(admin). For example, to create a new znode that explicitly grants all permissions to all users (which is, in fact, the default), you could use a command like the following:
karaf@root> zk:create --acl world:anyone:rwcda /path/to/the/new/znode
/fabric/
path using the zk:create
command. These registry nodes should only be created through the fabric
console commands—see Chapter 9, Fabric Console Commands.
world:anyone:rwcda
ACL setting).
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-r,--recursive | Automatically create any missing parent nodes in the specified path. |
-i,--import | Interpret the data argument as a URL that locates a resource containing the initial data for the new znode. |
-e,--ephemeral | Make the new znode epehemeral, so that it is automatically deleted after the current ZooKeeper client session closes. |
-s,--sequential | Make the new znode sequential, which implies that a unique 10-digit suffix is appended to the znode name. |
-a,--acl | Specifies the znode's ACL as a comma-separated list, where each entry in the list has the format, Scheme:ID:Permissions . The Permissions string consists of the following characters, concatenated in any order: r (read), w (write), c (create), d (delete), and a (admin). |
-o,--overwrite | Overwrite the existing znode at this location, if there is one. |
path | (Required) Path of the znode to create. |
data | Initial data for the node or, if --import is specified, a URL pointing at a location that contains the initial data. |
22.2. zk:delete
Abstract
Synopsis
zk:delete
[
--help
] [
-v|--version version
] [
-r|--recursive
] {
path
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-v,--version | The ZooKeeper znode version to delete. Defaults to -1 (all versions). |
-r,--recursive | Recursively delete children. Defaults to false . |
path | Path of the znode to delete. |
22.3. zk:get
Abstract
Synopsis
zk:get
[
--help
] {
path
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
path | (Required) Path of the znode to get. |
22.4. zk:list
Abstract
Synopsis
zk:list
[
--help
] [
-r|--recursive
] [
-d|--display
] {
path
}
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-r, --recursive | List children recursively. |
-d, --display | Display a znode's value, if set. |
path | Path of the znode to list. Defaults to / . |
22.5. zk:set
Abstract
Synopsis
zk:set
[
--help
] [
-i|--import
] {
path
} {
data
}
Description
/fabric/
path using the zk:set
command. These registry values should only be changed through the fabric
console commands—see Chapter 9, Fabric Console Commands.
Arguments
Argument | Interpretation |
---|---|
--help | Displays the online help for this command |
-i,--import | Import data from a URL. |
path | (Required) Path of the znode to set. |
data | (Required) The new data or URL to import. |
Legal Notice
Trademark Disclaimer