Before starting the CloudBees CD/RO server cluster, you must populate your Apache ZooKeeper server with CloudBees CD/RO database configuration information that all CloudBees CD/RO 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:
-
commander.properties
-
database.properties
-
keystore
-
passkey
Prerequisites
-
The CloudBees CD/RO server package must be installed on the system.
-
The system must be running a version of Java supported by CloudBees CD/RO. Java is automatically installed with CloudBees CD/RO as part of the Tools installation.
-
The ZooKeeper software must be installed on the network.
Location of ZKConfigTool
CloudBees CD/RO includes ZKConfigTool
. It is installed in the following default locations.
-
Windows:
C:\Program Files\CloudBees\Software Delivery Automation\server\bin\zk-config-tool-jar-with-dependencies.jar
-
Linux:
/opt/cloudbees/sda/server/bin/zk-config-tool-jar-with-dependencies.jar
For Kubernetes Linux installations, the CloudBees CD/RO path is /opt/cbflow
, instead of/opt/cloudbees/sda
.
ZKConfigTool command syntax
ZKConfigTool
is best run from the <install_dir>/conf
directory.
java -jar zk-config-tool-jar-with-dependencies.jar <option> <value>
The command examples in the following table show the options and value as though they were passed for a command executed from the <install_dir>/conf directory.
|
Option | Description |
---|---|
|
Import the CloudBees CD/RO server Example:
|
|
Import the CloudBees CD/RO server Example:
|
|
Import the CloudBees CD/RO server Example:
|
|
Show the command help. |
|
Import the CloudBees CD/RO server Example:
|
|
Import the CloudBees CD/RO server Example:
|
|
Read the specified file from the ZooKeeper server.
Possible values for
|
|
Read the specified folder from the ZooKeeper server.
Possible values for
|
|
Show the version number of the |
|
Write the specified file to the ZooKeeper server.
Possible Values for
|
|
Write the specified folder to the Zookeeper server.
Possible values for
|
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 CD/RO 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\CloudBees\Software Delivery Automation\jre\bin\java.exe" -DCOMMANDER_ZK_CONNECTION=<ZooKeeper_Server_IP>:2181 -jar "C:\Program Files\CloudBees\Software Delivery Automation\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 CD/RO servers in the cluster.
-
Start one CloudBees CD/RO server in the cluster.
-
Check if the CloudBees CD/RO 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 use
tail
to follow the<data_dir>\logs\commander-<hostname>.log
file to check for errors that could prevent the CloudBees CD/RO 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 CD/RO server is in
running
state, start the other CloudBees CD/RO servers so that they can join the cluster. -
After all CloudBees CD/RO 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
-