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
Steps to create the fabric
To create the simple fabric shown in Figure 2.1, “A Sample Fabric with Child Containers”, follow these steps:
- 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 127.0.0.1 --wait-for-provisioningThe current container, named
rootby default, becomes a Fabric Server with a registry service installed. Initially, this is the only container in the fabric. The
--new-user-roleoptions specify the credentials for a new
Administratoruser. The Zookeeper password is used to protect sensitive data in the Fabric registry service (all of the nodes under
--manual-ipoption specifies the loopback address,
127.0.0.1, as the Fabric Server's IP address.NoteA Fabric Server requires a static IP address. For simple trials and tests, you can use the loopback address,
127.0.0.1, 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.NoteMost 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 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.
- Invoke the following command to monitor the status of the child container, as it is being provisioned:
JBossFuse:karaf@root> shell:watch container-listAfter the deployment of the
childhas 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 successType the
Returnkey to get back to the JBoss Fuse console prompt.