You create a new child container using the fabric:container-create-child
console command, which has the following syntax:
karaf@root> fabric:container-create-childparentchild[number]
Where parent is the name of an existing container in the
fabric and child is the name of the new child container. If you
create multiple child containers (by specifying the optional
number argument), the new child instances are named
,
child1, and so on.child2
For example, assuming the container, root, already belongs to your fabric, you can create two new child containers as follows:
karaf@root> fabric:container-create-child root child 2 The following containers have been created successfully: child1 child2
To list all of the containers in the current fabric (including child instances), use
the fabric:container-list console command. For example:
FuseESB@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
By default, a child is assigned the default profile when it is created.
To assign a new profile (or profiles) to a child container after it has been created, use the
fabric:container-change-profile console command.
![]() | Tip |
|---|---|
You can assign a profile other than |
For example, to assign the example-camel profile to the
child1 container, enter the following console command:
FuseESBf@root> fabric:container-change-profile child1 example-camel
The command removes the profiles currently assigned to child1 and
replaces them with the specified list of profiles (where in this case, there is just one
profile in the list, example-camel).
To connect to a child container, use the fabric:container-connect console
command. For example, to connect to child1, enter the following console
command:
FuseESB@root>fabric:container-connect -u admin -p admin child1
You should see output like the following in your console window:
Connecting to host YourHost on port 8102 Connected ______ _____ _____ ______ | ___| | ___|/ ___|| ___ \ | |_ _ _ ___ ___ | |__ \ `--. | |_/ / | _|| | | |/ __| / _ \ | __| `--. \| ___ \ | | | |_| |\__ \| __/ | |___ /\__/ /| |_/ / \_| \__,_||___/ \___| \____/ \____/ \____/ Fuse ESB (7.0.0.fuse-beta-039) http://fusesource.org/esb/ 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 Fuse ESB. FuseESB:admin@child1>
To terminate the session, enter Ctrl-D.
To start a child container that was previously stopped, use the
fabric:container-start command, providing the child container's
name as the command argument—for example, to restart child1:
FuseESB@root>fabric:container-start child1
This command starts up the child in a separate JVM.
To stop a child instance, use the fabric:container-stop command,
providing the child container's name as the command argument—for example, to stop
child1:
FuseESB@root>fabric:container-stop child1
This command kills the JVM process that hosts the child1
container.
To completely destroy a child container use the
fabric:container-delete command. For example, to destroy the
child1 container instance, enter the following console command:
FuseESB@root> fabric:container-delete child1
Destroying a child container does the following:
stops the child's JVM process
physically removes all files related to the child container






![[Tip]](imagesdb/tip.gif)


