此内容没有您所选择的语言版本。
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"
export EXTRA_JAVA_OPTS="-Djava.rmi.server.hostname=0.0.0.1 -Daether.updateCheckManager.sessionState=bypass"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Change the environment settings in the file
etc/system.properties
.karaf.name = fabricserver1
karaf.name = fabricserver1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 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
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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 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
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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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"
export EXTRA_JAVA_OPTS="-Djava.rmi.server.hostname=0.0.0.2 -Daether.updateCheckManager.sessionState=bypass"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Start fuse
./fuse
. - Join fabric.
fabric:join --zookeeper-password admin --resolver manualip --manual-ip 0.0.0.2 sample.demo:2181 fabricserver2
fabric:join --zookeeper-password admin --resolver manualip --manual-ip 0.0.0.2 sample.demo:2181 fabricserver2
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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"
export EXTRA_JAVA_OPTS="-Djava.rmi.server.hostname=0.0.0.3 -Daether.updateCheckManager.sessionState=bypass"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Start fuse
./fuse
. - Join fabric.
fabric:join --zookeeper-password admin --resolver manualip --manual-ip 0.0.0.3 sample.demo:2181 fabricserver2
fabric:join --zookeeper-password admin --resolver manualip --manual-ip 0.0.0.3 sample.demo:2181 fabricserver2
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Run the Fabric ensemble. 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
To run the ensemble, use the following command:
- Log on to HostA, and add ensemble,
fabric:ensemble-add fabricserver2 fabricserver3
.