9.3.  Create fabric environment with multiple ensemble servers

Set up Host A

To setup the fabric environment with multiple ensemble servers, follow these steps:
  1. Log on to the first ensemble server, HostA(0.0.0.1).
  2. Extract the jboss-fuse-karaf-6.3.0.redhat-262.zip and modify the file etc/users.properties.
  3. Change the environment settings in the file bin/setenv.
    export EXTRA_JAVA_OPTS="-Djava.rmi.server.hostname=0.0.0.1 -Daether.updateCheckManager.sessionState=bypass"
  4. Change the environment settings in the file etc/system.properties.
    karaf.name = fabricserver1
  5. Start fuse ./fuse.
  6. Create a fabric.
    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
    
  7. Verify the zookeeper url.
    JBossFuse:karaf@root> config:proplist --pid io.fabric8.zookeeper fabric.zookeeper.pid = io.fabric8.zookeeper service.pid = io.fabric8.zookeeper zookeeper.password = ZKENC=YWRtaW4=zookeeper.url = sample.demo:218

Set up Host B

Start the other ensemble server, Host 2.
  1. Log on to HostB(0.0.0.2).
  2. Extract jboss-fuse-karaf-6.3.0.redhat-262.zip and modify the file etc/users.properties.
  3. Modify the environment variables in the file jbin/setenv.
    export EXTRA_JAVA_OPTS="-Djava.rmi.server.hostname=0.0.0.2 -Daether.updateCheckManager.sessionState=bypass"
  4. Start fuse ./fuse.
  5. Join fabric.
    fabric:join --zookeeper-password admin --resolver manualip --manual-ip 0.0.0.2 sample.demo:2181 fabricserver2
    

Set up Host C

Start the other ensemble server, Host 3.
  1. Log on to HostC(0.0.0.3).
  2. Extract jboss-fuse-karaf-6.3.0.redhat-262.zip and modify the file etc/users.properties.
  3. Modify the environment variables in the file jbin/setenv.
    export EXTRA_JAVA_OPTS="-Djava.rmi.server.hostname=0.0.0.3 -Daether.updateCheckManager.sessionState=bypass"
  4. Start fuse ./fuse.
  5. Join fabric.
    fabric:join --zookeeper-password admin --resolver manualip --manual-ip 0.0.0.3 sample.demo:2181 fabricserver2
    

Run the Fabric ensemble.

To run the ensemble, use the following command:
  1. Log on to HostA, and add ensemble, fabric:ensemble-add fabricserver2 fabricserver3.