fabric:container-create-child
Name
fabric:container-create-child — create one or more child containers
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 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 |