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:
- Log on to the first ensemble server, HostA(0.0.0.1).
- Extract the jboss-fuse-karaf-6.3.0.redhat-262.zip and modify the file
etc/users.properties
. - 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"
- Change the environment settings in the file
etc/system.properties
.karaf.name = fabricserver1
- Start fuse
./fuse
. - 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
- 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.
- Log on to HostB(0.0.0.2).
- Extract
jboss-fuse-karaf-6.3.0.redhat-262.zip
and modify the fileetc/users.properties
. - 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"
- Start fuse
./fuse
. - 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.
- Log on to HostC(0.0.0.3).
- Extract
jboss-fuse-karaf-6.3.0.redhat-262.zip
and modify the fileetc/users.properties
. - 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"
- Start fuse
./fuse
. - 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:
- Log on to HostA, and add ensemble,
fabric:ensemble-add fabricserver2 fabricserver3
.