Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 2. Getting Started with Fuse Fabric
Abstract
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
Overview
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 --clean --new-user AdminUser --new-user-password AdminPass --new-user-role Administrator --zookeeper-password ZooPass --zookeeper-data-dir zkdata --resolver manualip --manual-ip 127.0.0.1 --wait-for-provisioning
The current container, namedroot
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 newAdministrator
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,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 Creating new instance on SSH port 8102 and RMI ports 1100/44445 at: /tmp/jboss-fuse-6.3.0.redhat-254/instance/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-list
After the deployment of thechild
has completed, you should see a listing something like this:JBossFuse:karaf@root> shell:watch container-list [id] [version] [type] [connected] [profiles] [provision status] root* 1.0 karaf yes fabric success fabric-ensemble-0000-1 jboss-fuse-full child 1.0 karaf yes default success
Press theReturn
key to get back to the JBoss Fuse console prompt.