Before starting the CloudBees Flow server cluster, you must populate your Apache ZooKeeper server with CloudBees Flow database configuration information that all CloudBees Flow server nodes will use in the cluster. You use ZKConfigTool
to import this information into your ZooKeeper server.
You must run ZKConfigTool after changing any updatable configuration file. Even with multiple ZooKeeper machines, you must do this only once, and the data is propagated to all of those machines.
|
The following minimum set of files from the <data_dir>\conf
directory is imported:
-
database.properties
-
keystore
-
passkey
-
commander.properties
Prerequisites
-
The CloudBees Flow server package must be installed on the system.
-
The system must be running a version of Java supported by CloudBees Flow. Java is automatically installed with CloudBees Flow as part of the Tools installation.
-
The ZooKeeper software must be installed on the network.
Location of ZKConfigTool
CloudBees Flow includes ZKConfigTool
. It is installed in the following default locations.
-
Windows:
C:\Program Files\Electric Cloud\ElectricCommander\server\bin\zk-config-tool-jar-with-dependencies.jar
-
Linux:
/opt/electriccloud/electriccommander/server/bin/zk-config-tool-jar-with-dependencies.jar
ZKConfigTool Command Syntax
ZKConfigTool
is best run from the <install_dir>/conf
directory.
$ java -jar zk-config-tool-jar-with-dependencies.jar <options>
Option | Description |
---|---|
|
Import the CloudBees Flow server |
|
Import the CloudBees Flow server |
|
Import the CloudBees Flow server |
|
Show the command help. |
|
Import the CloudBees Flow server |
|
Import the CloudBees Flow server |
|
Read the specified file from the ZooKeeper server. |
|
Read the specified folder from the ZooKeeper server. |
|
Import the |
--version |
Show the version number of the |
|
Write the specified file to the ZooKeeper server. |
|
Write the specified folder to the Zookeeper server. |
Importing the Configuration Files into the ZooKeeper Server Using ZKConfigTool
Run ZKConfigTool
to populate the ZooKeeper server with configuration information. The system must have the CloudBees Flow tools installed and must be able to communicate with ZooKeeper.
The following command shows how to run ZKConfigTool
from the <data_dir>\conf
directory.
Linux:
../jre/bin/java -DCOMMANDER_ZK_CONNECTION=<ZooKeeper_Server_IP>:2181 -jar ../server/bin/zk-config-tool-jar-with-dependencies.jar com.electriccloud.commander.cluster.ZKConfigTool --databasePropertiesFile database.properties --keystoreFile keystore --passkeyFile passkey --commanderPropertiesFile commander.properties --confSecurityFolder security
Windows:
"C:\Program Files\Electric Cloud\ElectricCommander\jre\bin\java.exe" -DCOMMANDER_ZK_CONNECTION=<ZooKeeper_Server_IP>:2181 -jar "C:\Program Files\Electric Cloud\ElectricCommander\server\bin\zk-config-tool-jar-with-dependencies.jar" com.electriccloud.commander.cluster.ZKConfigTool --databasePropertiesFile database.properties --keystoreFile keystore --passkeyFile passkey --commanderPropertiesFile commander.properties --confSecurityFolder security
Copying the Configuration Files to the Other Server Nodes
After you upload the new configuration files:
-
Shut down all running CloudBees Flow servers in the cluster.
-
Start one CloudBees Flow server in the cluster.
-
Check if the CloudBees Flow server is running fully by entering the following
ectool
command:ectool --server localhost --timeout 900 getServerStatus --block 1 --serverStateOnly 1
This command runs for 900 seconds (15 minutes) or until
getServerStatus
displays eitherbootstrap
orrunning
. -
If the output says
bootstrap
, enter the command again until it saysrunning
.You can also “tail” the
<data_dir>\logs\commander-<hostname>.log
file to check for errors that could prevent the CloudBees Flow server from going torunning
state. -
Copy all configuration files to each of the
conf
folders of the other server nodes.This ensures parity for all server nodes in the cluster.
-
After the first CloudBees Flow server is in
running
state, start the other CloudBees Flow servers so that they can join the cluster. -
After all CloudBees Flow servers are in
running
state, check the “view” of the cluster.-
On Linux platforms, enter:
<install_dir>/bin/ectool --server localhost getServerStatus --diagnostics 1 | grep -i "\(<view>\|<service_name>\|<participants>\)"
-
On Windows platforms, enter:
<install_dir>\bin\ectool --server localhost getServerStatus --diagnostics 1 | findstr "<view> <service_name> <participants>" 2>NULL
-