Chapter 2. Getting Started with Fuse Fabric


This tutorial provides basic information and explains how to set up the simplest Fabric system, by creating some containers that run on your local machine and then deploying an example profile to a child container.
Additional information on setting up a Fabric is covered in more detail in both Chapter 3, Creating a New Fabric and Section 4.1, “Child Containers”.

2.1. Create a Fabric


Figure 2.1 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.

Figure 2.1. A Sample Fabric with Child Containers

A Sample Fabric with Child Containers

Steps to create the fabric

To create the simple fabric shown in Figure 2.1, “A Sample Fabric with Child Containers”, follow these steps:
  1. To create the first fabric container, which acts as the seed for the new fabric, enter this console command:
    JBossFuse:karaf@root> fabric:create --new-user AdminUser --new-user-password AdminPass --new-user-role Administrator --zookeeper-password ZooPass --resolver manualip --manual-ip --wait-for-provisioning
    The current container, named root by default, becomes a Fabric Server with a registry service installed. Initially, this is the only container in the fabric. The --new-user, --new-user-password, and --new-user-role options specify the credentials for a new Administrator user. The Zookeeper password is used to protect sensitive data in the Fabric registry service (all of the nodes under /fabric). The --manual-ip option specifies the loopback address,, as the Fabric Server's IP address.
    A Fabric Server requires a static IP address. For simple trials and tests, you can use the loopback address,, to work around this requirement. But if you are deploying a fabric in production or if you want to create a distributed ensemble, you must assign a static IP address to the each of the Fabric Server hosts.
    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.
  2. Create a child container. Assuming that your root container is named root, enter this console command:
    JBossFuse:karaf@root> fabric:container-create-child root child
    The following containers have been created successfully:
    	Container: child.
  3. Invoke the following command to monitor the status of the child container, as it is being provisioned:
    JBossFuse:karaf@root> shell:watch container-list
    After the deployment of the child has completed, you should see a listing something like this:
    JBossFuse:karaf@root> shell:watch container-list
    [id]                           [version] [alive] [profiles]                     [provision status]
    root                           1.0       true    fabric, fabric-ensemble-0000-1, fuse-esb-full success
      child                        1.0       true    default                        success
    Type the Return key to get back to the JBoss Fuse console prompt.