You can add another node to an HA cluster that you have already created.
Prerequisites
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 nodeThis 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.
IPv6 addresses are only supported for Kubernetes platforms. If using an IPv6 address, enclose the address in square brackets. Example: [<IPv6-ADDRESS>] .
|
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 originalconf
directory located atDATA_DIR/conf
. -
Copy the
conf
directory from the primary node to the new node. -
Restart the CloudBees CD/RO server.
HAProxy users follow steps to add server target to HAProxy.
-
(If using HAProxy) Create an entry for the additional node (
node3
in the following example) and add its server IP address to theHaproxy.cfg
file as follows:frontend commander-server-frontend-secure mode tcp bind 0.0.0.0:8443 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 0.0.0.0:61613 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 \https://www.haproxy.org /. -
Restart HAProxy by entering:
sudo service haproxy restart sudo service haproxy status
-
Check the status by browsing to
HAProxy_Server_IP_Address:9000
.