ClusterInfoTool

3 minute readAutomation

Use ClusterInfoTool to get information on the running CloudBees CD/RO server cluster from ZooKeeper.

Prerequisites

  • The CloudBees CD/RO server cluster must be installed and running on the network.

  • Configuration files that all CloudBees CD/RO server nodes will use in a clustered configuration must be uploaded to the Apache ZooKeeper server using the ZKConfigTool.

  • The ZooKeeper cluster must be running an odd number of Zookeeper nodes, and there must be a leader node.

  • The system must be running the version of Java installed with CloudBees CD/RO.

Locations

The CloudBees CD/RO installer adds the ClusterInfoTool to the following default locations:

  • Windows: C:\Program Files\CloudBees\Software Delivery Automation\server\bin\cluster-info-tool-jar-with-dependencies.jar

  • Linux: /opt/cloudbees/sda/server/bin/cluster-info-tool-jar-with-dependencies.jar

ClusterInfoTool Command Syntax

ClusterInfoTool requires that the DCOMMANDER_ZK_CONNECTION environment variable is set so that it can locate your ZooKeeper nodes. You can set the variable by using the Linux export command beforehand or inline as part of the command for the ClusterInfoTool command itself:

$ export COMMANDER_ZK_CONNECTION=<ZooKeeper_Server1_IP>:2181,<ZooKeeper_Server2_IP>:2181,<ZooKeeper_Server3_IP>:2181 $ java -jar cluster-info-tool-jar-with-dependencies.jar [<arguments>]

or

$ java -DCOMMANDER_ZK_CONNECTION=<ZooKeeper_Server1_IP>:2181,<ZooKeeper_Server2_IP>:2181,<ZooKeeper_Server3_IP>:2181 -jar cluster-info-tool-jar-with-dependencies.jar [<arguments>]
Argument Description

--user < flow_username >

(Optional) Specifies the CloudBees CD/RO server username to connect. You are prompted for a username if you do not specify this argument.

--password < flow_password >

(Optional) Specifies the CloudBees CD/RO server user password to connect. You are prompted for a password if you do not specify this argument.

--serverUrl < flow_server_url >

(Optional) Specifies the CloudBees CD/RO server URL to connect. You are prompted for the URL if you do not specify this argument.

--ignoreCerts

(Optional) Ignores non-trusted self-signed certificates

--cleanJGroupsData

(Optional) Clears out JGroups cluster data

--help

(Optional) Shows usage information

Sample Command Usage and Output

This is sample output generated by ClusterInfoTool :

$ cd /opt/cloudbees/sda/server/bin $ export COMMANDER_ZK_CONNECTION=chronic3-zk1:2181,chronic3-zk2:2181,chronic3-zk3:2181 $ java -jar cluster-info-tool-jar-with-dependencies.jar --user charvey --ignoreCerts --serverUrl \https://chronic3java Using ZooKeeper connection string: chronic3-zk1:2181,chronic3-zk2:2181,chronic3-zk3:2181 Please enter the {PRODUCT} User Password: myPassword1 There are 3 ZooKeeper nodes in the ensemble: chronic3-zk1:2181, chronic3-zk2:2181, chronic3-zk3:2181 Connecting to ZooKeeper node chronic3-zk1:2181 Connected to chronic3-zk1:2181, attempting to get status chronic3-zk1:2181 is a follower Connecting to ZooKeeper node chronic3-zk2:2181 Connected to chronic3-zk2:2181, attempting to get status chronic3-zk2:2181 is a follower Connecting to ZooKeeper node chronic3-zk3:2181 Connected to chronic3-zk3:2181, attempting to get status chronic3-zk3:2181 is a leader ZooKeeper ensemble looks healthy, chronic3-zk3:2181 is the leader Connecting to ZooKeeper ensemble at chronic3-zk1:2181,chronic3-zk2:2181,chronic3-zk3:2181 Connected to ZooKeeper ensemble Reading data at /commander/conf/commander.properties Loaded data at /commander/conf/commander.properties Parsed data at /commander/conf/commander.properties COMMANDER_SERVER_NAME property value: chronic3.electric-cloud.com Reading data at /commander/conf/database.properties Loaded data at /commander/conf/database.properties Parsed data at /commander/conf/database.properties Reading data at /commander/conf/passkey Loaded data at /commander/conf/passkey Parsed passkey at /commander/conf/passkey Reading data at /commander/conf/keystore Loaded data at /commander/conf/keystore Parsed keystore at /commander/conf/keystore Checking JGroups data in ZooKeepr Checking /commander/jgroups/activeMQ: e3f11bbd-5773-34b5-cb23-328fb873e266 -> chronic3e-34229 e4a26872-9a45-8110-de5d-cc6786ffae92 192.168.2.212:5446 F chronic3d-47613 e3f11bbd-5773-34b5-cb23-328fb873e266 192.168.2.211:5446 T chronic3c-52982 31a5e860-f30f-6e27-ff7c-de746332f742 192.168.2.210:5446 F chronic3a-10319 7e0ecd44-02f7-8441-4fcc-134a192784c8 192.168.2.208:5446 F Checking /commander/jgroups/commander: 9678311d-68ed-eaf5-e887-c3c3e4f0c645 -> chronic3a-35854 3c114e9a-4fb4-cdb0-9542-3f03611cb9d0 192.168.2.208:5447 F chronic3c-29085 4978a555-9278-e0af-0f70-73af1eadc7c0 192.168.2.210:5447 F chronic3e-12173 30269f49-0bbe-bc9b-86c9-09c525d7cffb 192.168.2.212:5447 F chronic3d-25124 9678311d-68ed-eaf5-e887-c3c3e4f0c645 192.168.2.211:5447 T Server IP address (This server property should be set with a value that points to the {PRODUCT} Server Load Balancer FQDN): chronic3.electric-cloud.com Stomp Client URI: stomp+ssl://chronic3.electric-cloud.com:61613 Use SSL for Stomp: false

Interpreting ClusterInfoTool Command Output

How to interpret ClusterInfoTool output:

  • The nodes /commander/jgroups/activeMQ and /commander/jgroups/commander contain information on these JGroups clusters:

    • commander for the CloudBees CD/RO server cluster

    • activeMQ for the activeMQ cluster

  • The child nodes under each JGroups node represent the participating CloudBees CD/RO servers in the cluster. Each child node entry is in this form:

    <Logical_Name> <UUID> <IP_address>:<port> T|F
  • The number of entries in both JGroups nodes should be the same, with matching IP addresses but with different port numbers and distinct logical names and UUIDs. The coordinator node in each JGroups cluster is identified with a ‘ T ’ against its entry.