Figure 3 shows an overview of a sample fabric that you will create. The Fabric Ensemble consists of just one Fabric Server (making this fabric suitable only for experimental use) and two managed child containers.
A Fabric Server (or servers) forms the backbone of a fabric. It hosts a registry service, which maintains a replicable database of information about the state of the fabric. Initially, when you create the fabric, there is just a single Fabric Server.
Creating one or more child containers is the simplest way to extend a fabric. As shown in Figure 3, the first container in the fabric is a root container, and both child containers are descended from it.
Each child container is an independent Fuse ESB Enterprise container instance, which runs in
its own JVM instance. The data files for the child containers are stored under
the
directory.ESBInstallDir/instances
To create the simple fabric shown in Figure 3, follow these steps:
(Optional) Customise the name of the root container by editing the
file and specifying a different name for this property:ESBInstallDir/etc/system.propertieskaraf.name=root
![[Note]](imagesdb/note.gif)
Note For the first container in your fabric, this step is optional. But at some later stage, if you want to join a root container to the fabric, you must customise the new container's name to prevent it from clashing with any existing root containers in the fabric.
If you have not already done so, create one (or more users) by adding a line of the following form to the
file:ESBInstallDir/etc/users.propertiesUsername=Password[,RoleA][,RoleB]...At least one of the users must have the
adminrole, to enable administration of the fabric. For example:admin=secretpassword,admin
When you create the fabric, the entries in
users.propertiesare used to initialize the user data for the Zookeeper login module, which provides security for the fabric.![[Note]](imagesdb/note.gif)
Note The initialization of user data from
users.propertieshappens only once, at the time the fabric is created. After the fabric has been created, any changes you make tousers.propertieswill have no effect on the fabric's user data.To create the first fabric container, which acts as the seed for the new fabric, enter this console command:
karaf@root> fabric:create --zookeeper-password admin
The current container, named
rootby default, becomes a Fabric Server with a registry service installed. Initially, this is the only container in the fabric. The Zookeeper password is used to protect sensitive data in the Fabric registry service (all of the nodes under/fabric).![[Tip]](imagesdb/tip.gif)
Tip Most of the time, you are not prompted to enter the Zookeeper password when accessing the registry service, because it is cached in the current session. When you join a container to a fabric, however, you must provide the fabric's Zookeeper password.
Create two child containers. Assuming that your root container is named
root, enter this console command:karaf@root> fabric:container-create-child root child 2 Jmx Login for root: admin Jmx Password for root: The following containers have been created successfully: Container: child1. Container: child2.
You are prompted to enter a JMX username and password (the JMX port is integrated with the JAAS authentication service). Enter one of the username/password combinations that you defined in step 2.
Invoke the
fabric:container-listcommand to see a list of all containers in your new fabric. You should see a listing something like this:karaf@root> fabric:container-list [id] [version] [alive] [profiles] [provision status] root 1.0 true fabric, fabric-ensemble-0000-1, fuse-esb-full success child1 1.0 true default success child2 1.0 true default success
Because the child containers run in their own JVMs, they do
not automatically stop when you shut down the root
container. To shut down a container and its children, first stop its children
using the fabric:container-stop command. For example, to shut down
the current fabric completely, enter these console commands:
karaf@root> fabric:container-stop child1 karaf@root> fabric:container-stop child2 karaf@root> shutdown -f
After you restart the root container, you must explicitly restart the children
using the fabric:container-start console command.









