PK
qi$Boa, mimetypeapplication/epub+zipPK
pi$B META-INF/PK
qi$B OEBPS/PK
qi$B
OEBPS/images/PK
qi$B OEBPS/imagesdb/PK
pi$Bh h META-INF/container.xml
dev:classloaders, classloaders — displays a list of leaking bundle classloaders
dev:classloaders [--help]
dev:create-dump, create-dump — creates a ZIP file containing diagnostic information
dev:create-dump [--help] [[-d dumpFolder] | [--directory dumpFolder]] {dumpName}
dev:dynamic-import, dynamic-import — enables/disables dynamic imports for a bundle
dev:dynamic-import [--help] {bundleID}
dev:framework, framework — enables/disables debugging for an OSGi framework
dev:framework [--help] {[[-debug] | [--enable-debug]] [[-nodebug] | [--disable-debug]]} {framework}
dev:print-stack-traces, print-stack-traces — enables/disables printing of full stack traces in the console when the execution of a command throws an exception
dev:print-stack-traces [--help] [false]
dev:restart — restart the container
dev:restart [--help] [[-c] | [--clean]]
dev:show-tree, show-tree — shows the tree of bundles based on the wiring information
dev:show-tree [--help] {bundleID}
dev:threads, threads — shows the threads in the JVM
dev:threads [--help] [[-f] | [--flat]]
dev:watch, watch — watches and automatically updates bundles
dev:watch [--help] [[--start] | [--stop]] [-i interval] [--list] [--remove] {bundles...}
Table 6.9 describes the commands arguments.
Table 6.9. dev:watch 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. |
| Specifies a whitespace delimited list of bundle URLs or bundle IDs. |
![]() | Caution |
|---|---|
Only Maven URLs and Maven snapshots will be updated automatically. So, if you run
You are monitor all bundles that have a location matching |
fab:headers — displays the headers of a FAB
fab:headers [--help] [--indent style] {URL}
Displays the header entries from the META-INF/MANIFEST.MF file embedded in
the FAB JAR file. This is not the same thing as the bundle headers
returned by the osgi:headers command, because the osgi:headers
command shows the effective headers after the FAB is converted into an
OSGi bundle.
For example, a typical FAB might have headers like the following:
FuseESB:karaf@root> fab:headers mvn:org.fusesource.examples/cbr/7.0.0.fuse-beta-042 Manifest-Version = 1.0 Archiver-Version = Plexus Archiver Built-By = username Build-Jdk = 1.6.0_29 Created-By = Apache Maven
After the FAB is deployed, the corresponding OSGi bundle could have headers like the following (given that the bundle ID of the deployed FAB is 228):
FuseESB:karaf@root> osgi:headers 228 org.fusesource.examples.cbr (228) --------------------------------- Manifest-Version = 1 Bnd-LastModified = 1334306872960 Archiver-Version = Plexus Archiver Tool = Bnd-1.43.0 Originally-Created-By = Apache Maven FAB-URL = mvn:org.fusesource.examples/cbr/7.0.0.fuse-beta-042 Generated-By-FAB-From = mvn:org.fusesource.examples/cbr/7.0.0.fuse-beta-042 Built-By = username FAB-Id = org.fusesource.examples:cbr:7.0.0.fuse-beta-042:jar Build-Jdk = 1.6.0_29 Created-By = 1.6.0_29 (Apple Inc.) Bundle-Name = org.fusesource.examples.cbr Bundle-SymbolicName = org.fusesource.examples.cbr Bundle-Version = 7.0.0.fuse-beta-042 Bundle-ManifestVersion = 2 Export-Package = OSGI-INF.blueprint, OSGI-INF
fab:info — display information about a FAB, including the list of shared and unshared dependencies, and the list of features installed as part of the FAB resolution process
fab:info [--help] {bundleID}
fab:start — starts the specified FAB
fab:start [--help] [--timeout millis] {bundleID}
Depending on how a FAB is configured, it can be associated with multiple dependent bundles.
When a FAB is initially installed in the container, the transitive dependencies of the FAB
are determined by scanning the embedded POM file,
META-INF/maven/.
Any transitive dependencies that are shared (for example, by being marked as provided or
because the dependency is already packaged as an OSGi bundle), are deployed as separate OSGi
bundles in the container.GroupID/ArtifactID/pom.xml
When you start the FAB using fab:start, the runtime attempts to start
all of the corresponding bundles, starting with the leaves of the
dependency tree and working its way up the tree to the FAB's bundle. In particular, this
implies that any OSGi services, blueprint XML files, and Spring XML files in the dependent
OSGi bundles are activated in the appropriate order.
fab:stop — stops the specified FAB bundle together with its shared transitive dependencies, except for those dependencies that are being used by other bundles.
fab:stop [--help] {bundleID}
fab:tree, tree — displays the dependency tree of a FAB
fab:tree [--help] {bundleID}
fab:uninstall — uninstall the specified FAB and all of its transitive dependencies, except for those dependencies that are being used by other bundles
fab:uninstall [--help] {bundleID}
Depending on how a FAB is configured, it can be associated with multiple dependent bundles.
When a FAB is initially installed in the container, the transitive dependencies of the FAB
are determined by scanning the embedded POM file,
META-INF/maven/.
Any transitive dependencies that are shared (for example, by being marked as provided or
because the dependency is already packaged as an OSGi bundle), are deployed as separate OSGi
bundles in the container.GroupID/ArtifactID/pom.xml
When you uninstall the FAB using fab:uninstall, the runtime attempts to
uninstall all of the corresponding OSGi bundles, except for any bundles
that are still being used by other applications in the container.
fabric:cloud-firewall-edit — manage a cloud container's firewall
fabric:cloud-firewall-edit [--help] [--owner owner] [--option
key=value]
Table 8.2 describes the command's arguments.
Table 8.2. fabric:cloud-firewall-edit Arguments
| Argument | Interpretation |
|---|---|
--port
| The target IP port. |
--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. |
fabric:cloud-provider-add — initialize a cloud provider (which can be used for provisioning containers in the cloud)
fabric:cloud-provider-add [--help] [--owner owner] [--option
key=value] {ProviderID} [Identity] [Credential]
This command runs asynchronously. That is, although the command returns immediately, it
runs a thread in the background, which completes the initialization of the cloud provider. You
can use fabric:cloud-provider-list to discover when the initialization has
completed.
To access this command, the current container must belong to a Fabric and you must have
installed the fabric-jclouds feature. To install the fabric-jclouds
feature, deploy the cloud profile into the current container, using the
fabric:container-change-profile command.
For example, if the console is currently logged on to the root container of
the Fabric, you could add the cloud profile as follows:
FuseESB:karaf@root> fabric:container-list [id] [version] [alive] [profiles] [provision status] root* 1.0 true fabric, fabric-ensemble-0000-1 success FuseESB:karaf@root> fabric:container-change-profile root fabric fabric-ensemble-0000-1 cloud FuseESB:karaf@root> fabric:container-list [id] [version] [alive] [profiles] [provision status] root* 1.0 true fabric, fabric-ensemble-0000-1, cloud success
Table 8.3 describes the command's arguments.
Table 8.3. fabric:cloud-provider-add Arguments
| Argument | Interpretation |
|---|---|
--help
| Displays the online help for this command. |
--owner
| Specifies the EC2 AMI owner, which enables you to use private images (EC2 only). |
--option | Provider-specify 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. |
| The name of the newly added provider. |
| The cloud identity to use. |
| The cloud credential to use. |
fabric:cloud-provider-list — list the configured cloud providers
fabric:cloud-provider-list [--help]
For each configured cloud provider, displays the provider name, type (compute
or blobstore), and registration (local, for a standalone container,
or fabric, for a Fabric Container).
To access this command, the current container must belong to a Fabric and you must have
installed the fabric-jclouds feature. To install the fabric-jclouds
feature, deploy the cloud profile into the current container, using the
fabric:container-change-profile command.
For example, if the console is currently logged on to the root container of
the Fabric, you could add the cloud profile as follows:
FuseESB:karaf@root> fabric:container-list [id] [version] [alive] [profiles] [provision status] root* 1.0 true fabric, fabric-ensemble-0000-1 success FuseESB:karaf@root> fabric:container-change-profile root fabric fabric-ensemble-0000-1 cloud FuseESB:karaf@root> fabric:container-list [id] [version] [alive] [profiles] [provision status] root* 1.0 true fabric, fabric-ensemble-0000-1, cloud success
fabric:cloud-provider-remove — removes the specified cloud provider
fabric:cloud-provider-remove [--help] {ProviderID}
To access this command, the current container must belong to a Fabric and you must have
installed the fabric-jclouds feature. To install the fabric-jclouds
feature, deploy the cloud profile into the current container, using the
fabric:container-change-profile command.
For example, if the console is currently logged on to the root container of
the Fabric, you could add the cloud profile as follows:
FuseESB:karaf@root> fabric:container-list [id] [version] [alive] [profiles] [provision status] root* 1.0 true fabric, fabric-ensemble-0000-1 success FuseESB:karaf@root> fabric:container-change-profile root fabric fabric-ensemble-0000-1 cloud FuseESB:karaf@root> fabric:container-list [id] [version] [alive] [profiles] [provision status] root* 1.0 true fabric, fabric-ensemble-0000-1, cloud success
fabric:cluster-list, cluster-list — lists the members of a Fuse MQ Enterprise cluster
fabric:cluster-list [--help] [Path]
This command lists all message brokers in the fabric. It allows you to see which brokers are grouped into clusters. The resulting list will enable you to see which brokers are participating in a particular cluster.
fabric:container-connect, container-connect — connects to a remote Fabric Container and execute the specified command
fabric:container-connect [--help] [[-u] | [--username]] [[-p] | [--password]User] {PasswordContainerName} [Command]
This command allows you to connect to any container in the current fabric and execute a
command. For example, to execute the osgi:list command on the
root2 container, you could enter a console command like
Example 8.1.
Example 8.1. Executing a Command in a Remote Container
FuseMQ:karaf@root>fabric:container-connect -u YourName -p YourPass root2 osgi:list
This command uses fabric JAAS security to log into the container, so the username and password are managed by the container's JAAS realm.
Table 8.7 describes the command's arguments.
Table 8.7. fabric:container-connect 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. |
| Specifies the name of the remote container. |
| Specifies the console command to execute on the remote container. |
fabric:container-create, container-create — creates one or more Fabric Containers
fabric:container-create [--help] {[--parent ParentID] | [--url URL]} [--proxy-uri ProxyURI] [--ensemble-server] [--profile ProfileID] [--resolver policy] [--version Version] [--jvm-opts JvmOpts] {Name} [Number]
This command is a generic container create command. It combines the functionality of
the fabric:container-create-child, fabric:container-create-cloud,
and fabric:container-create-ssh commands. The type of container that is
created, depends on the specified URL.
To create a child container, specify a URL in the following format:
child://ParentNameWhere ParentName is the name of the child's parent
container.
To create a cloud container, specify a URL in the following format:
jclouds://ProviderId?imageId=ImageID&locationId=LocationID&group=Group&user=User
For a detailed explanation of the options appearing in this URL, see fabric:container-create-cloud.
To create an SSH container with username and password credentials, specify a URL in the following format:
ssh://User:Password@Host:Port
Where User and Password are
the credentials for logging in to the machine at
Host:Port, through the SSH
protocol.
To create an SSH container with username and private key credentials, specify a URL in the following format:
ssh://User@Host:Port?privateKeyFile=KeyPath
Where KeyPath is the pathname of the private key file on the local filesystem.
Table 8.8 describes the command's arguments.
Table 8.8. fabric:container-create Arguments
| Argument | Interpretation |
|---|---|
--help | Displays the online help for this command |
--parent | Specifies the parent container's ID. |
--url | Specifies the URL of the new container. |
--proxy-uri | Specifies the Maven proxy URI to use. |
--ensemble-server | Specifies if the new container should be a Fabric Server. |
--profile | Specifies a list of profiles to deploy into the new container. |
--resolver | Specifies how the container will report its address to other containers.
Valid values are localip, localhostname,
publicip, publichostname, manualip.
For more information see
fabric:container-resolver-set. |
--version | Specifies the version of the profiles used by the new container. Defaults to the current default version. |
--jvm-opts | Specifies options to pass to the container's JVM. |
| Specifies the name of the new container. When creating multiple containers, the name serves as a prefix. |
| Specifies the number of containers that should be created. |
fabric:container-create-child — create one or more child containers
fabric:container-create-child [--help] [--ensemble-server] [--profile ] [--version profileID] [--jvm-opts version] [--resolver jvmOpts] {policyparent} {name} [number]
Child containers have the following characteristics:
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
directory. The ESBInstallDir/instances/ChildName
directory is shared with the root container.ESBInstallDir/system
For example, if you have already created a new fabric (for example, by invoking
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
This command creates three new children under the 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
As you can see, the command creates three new child containers, child1,
child2, and child3, with the default profile.
This containers are ordinary (non-ensemble) containers, running fabric agents (ZooKeeper
clients).
If you do not explicitly specify any profile (or profiles) for the new child
containers, each of the child containers is created with the OSGi bundles required for a
minimal Apache Karaf container and all of the profiles and bundles specified by the
default profile. In particular, the newly created containers do
not contain all of the features and bundles associated with a
full Fuse ESB Enterprise container. If you want a child container to deploy all of the bundles
associated with a full Fuse ESB Enterprise container, you can explicitly associate the child with the
esb profile, as follows:
fabric:container-create-child --profile esb root childESB
To associate multiple profiles with a new child container, you can specify the
--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
REVISIT - Does it make sense to use the --ensemble-server option with child containers?. Await feedback from Ioannis and Guillaume.
After you create new child containers, the children run as separate processes,
independently of the parent. Consequently, when you shut down the parent container,
the child processes continue to run in the background. If you
want to shut down the children, you must explicitly invoke the
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
Table 8.9 describes the command's arguments.
Table 8.9. fabric:container-create-child Arguments
| Argument | Interpretation |
|---|---|
--help
| Displays the online help for this command |
--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. |
--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. |
--resolver | Specifies how the container will report its address to other containers.
Valid values are localip, localhostname,
publicip, publichostname, manualip.
For more information see
fabric:container-resolver-set. |
| (Required) The parent container ID. |
| (Required) The name of the container to create. When creating multiple containers, it serves as a prefix |
| The number of containers that should be created. |
fabric:container-create-cloud — creates one or more new containers on the cloud
fabric:container-create-cloud [--help] [--provider ] [--identity cloudProvider] [--credential cloudIdentity] [--hardware loginCredential] [--instanceType hardwareID] [--image instanceType] [--location imageID] [--user location] [--owner userAcc] [--group owner] [--proxy-uri group] [--ensemble-server] [--profile URI] [--version profileID] [--jvm-opts version] [--resolver jvmOpts] [--option
policy] [--public-key-file key=value] [--os-family file] [--os-version osFamily] {osVersionName} [Number]
To access this command, the current container must belong to a Fabric and you must
have installed the fabric-jclouds feature. To install the
fabric-jclouds feature, enter the following console command:
features:install fabric-jclouds
The 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.
![]() | Note |
|---|---|
The 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
argument), multiple nodes
will be created and a root container will be installed on each node.Number
By default, the newly created cloud containers belong to the current fabric (that is,
the same fabric as the container from which you invoked the command). It is possible,
however, to create a container on the cloud instance that acts as the seed for a
completely new fabric, separate from the current one. To create a new fabric on the
cloud instance, invoke the 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).
Table 8.10 describes the command's arguments.
Table 8.10. fabric:container-create-cloud Arguments
| Argument | Interpretation |
|---|---|
--help
| Displays the online help for this command |
--provider
| (Required) JClouds provider name. |
--identity
| (Required) The cloud identity to use. |
--credential
| (Required) Credential to log on to the cloud. |
--hardware | (Required) Kind of hardware to use. |
--instanceType
| (Required) Type of instance required. |
--location
| (Required) The location used to create the new node(s). |
--image
| 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. |
--user
| Specifies the 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. |
--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). |
--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. |
--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. |
--resolver | Specifies how the container will report its address to other containers.
Valid values are localip, localhostname,
publicip, publichostname, manualip.
For more information see
fabric:container-resolver-set. |
--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= 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. |
--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. |
--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. |
| (Required) The name of the container to create. When creating multiple containers, it serves as a prefix. |
| The number of containers that should be created. |