Add a node to an existing cluster

2 minute readScalability

You can add another node to an HA cluster that you have already created.


To add a node to a cluster, you need:

  • A host on which to install the new node

  • An installer that is equal in version number to the existing CloudBees CD/RO servers

    If you have hotfixes for the existing CloudBees CD/RO servers, you must have copies of the JARs, scripts, and so on to copy into the new server.

  • Load balancer to add a new server entry

  • conf folder from the primary node

    This folder must contain the files that have been uploaded to Zookeeper.

  • Connection and ports to ensure that the host can Telnet to the database and load balancer and that the necessary ports are open.

    Also, ensure that from the load balancer, you can Telnet to the new server through the necessary ports (61613, 8000, and 8443).

Adding a Node

Use the following steps to add a node to an HA cluster. These steps might vary depending on your load balancer and whether your CloudBees CD/RO version includes hotfixes. If you are using HAProxy, make sure you follow the steps below for adding a server target to HAProxy.

To add a node to an existing CloudBees CD/RO cluster:

  • On the new machine, ensure that you have the same permissions and users as the other machines.

  • Complete an advanced installation of CloudBees CD/RO without the database and web server.

  • Stop the CloudBees CD/RO server service and apply all hotfixes if available.

  • Back up the conf directory by renaming the original conf directory located at DATA_DIR/conf.

  • Copy the conf directory from the primary node to the new node.

  • Restart the CloudBees CD/RO server.

  • (If using HAProxy) Create an entry for the additional node ( node3 in the following example) and add its server IP address to the Haproxy.cfg file as follows:

    frontend commander-server-frontend-secure mode tcp bind ssl crt /etc/ssl/server.pem default_backend commander-server-backend
    backend commander-server-backend mode http server node1 <IP Address of Initial Node>:8000 check server node2 <IP Address of Next Node>:8000 check server node3 <IP Address of Next Node>:8000 check stats enable option httpchk GET /commanderRequest/health
    # load balance port 61613 across Commander servers, with HAProxy acting as the SSL endpoint frontend commander-stomp-frontend mode tcp bind ssl crt /etc/ssl/server.pem default_backend commander-stomp-backend option tcplog log global
    backend commander-stomp-backend mode tcp server node1 <IP Address of Initial Node>:8000 check server node2 <IP Address of Next Node>:8000 check server node3 <IP Address of Next Node>:8000 check option tcplog log global

    For details, see the KBEC-00281 - Configuring Load Balancers in CloudBees CD/RO Clusters KB article or the HAProxy documentation at \ /.

  • (If using HAProxy) Restart HAProxy by entering:

    sudo service haproxy restart sudo service haproxy status
  • (If using HAProxy) Check the status by browsing to HAProxy_Server_IP_Address:9000.

Applying Hotfixes to the New Node

If you have hotfixes, you must add them to the CloudBees CD/RO server after you finish installing it in step 2 above. After confirming the hotfixes are in place, use the ecconfigure command to set up the server and get the configuration files from ZooKeeper.

Copying the Plugins Folder to the New Node

if you do not have a mounted plugins folder, you must copy the plugins folder from the primary server node to the new server node to ensure that it is the same across all nodes.