Adding an IBM Cloud Private-CE cluster node

Add worker and custom host group nodes to your IBM® Cloud Private-CE (Community Edition) cluster.

Preparing the node for installation

  1. Ensure that all default ports are open but are not in use. No firewall rules must block these ports. For more information about the IBM® Cloud Private default ports, see Default ports. To check whether a port is open, run the following command:

     ssh -p <port_number> localhost
    

    Where port_number is the port number to check. If the command returns an output, the port is in use. If a port is in use, you can run the ss -nlp | grep <port_number> command to see which service uses it.

  2. Configure the /etc/hosts file on each node in your cluster.

    1. Add the IP addresses and host names for all nodes to the /etc/hosts file on each node.
      • Important: Ensure that the host name is listed by the IP address for the local host. You cannot list the host name by the loopback address, 127.0.0.1.
      • Host names in the /etc/hosts file cannot contain uppercase letters.
      • If your cluster contains a single node, you must list its IP address and host name.
    2. Comment out the line of the file that begins with 127.0.1.1 and ::1 localhost.

    The /etc/hosts file for a cluster, which contains a master node, a proxy node, and two worker nodes, resembles the following code:

    127.0.0.1       localhost
    # 127.0.1.1     <host_name>
    # The following lines are desirable for IPv6 capable hosts
    #::1     localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    <master_node_IP_address> <master_node_host_name>
    <worker_node_1_IP_address> <worker_node_1_host_name>
    <worker_node_2_IP_address> <worker_node_2_IP_host_name>
    <proxy_node_IP_address> <proxy_node_host_name>
    
  3. Ensure network connectivity between all nodes in your cluster. Confirm that each node is connected to all other nodes in the cluster.

  4. Synchronize the clock on the new node to the rest of the cluster nodes. To synchronize your clocks, you can use network time protocol (NTP). For more information about setting up NTP, see the user documentation for your operating system.
  5. On the new node, confirm that a supported version of Python is installed. Python versions 2.6 to 2.9.x and 3.5 or later are supported.

      python --version
    
  6. Ensure that an SSH client is installed on the new node.

  7. If you use SSH to create the secure connection between your cluster nodes, add the SSH key to the new node.

    1. From the boot node, add the SSH public key to the node.

      ssh-copy-id -i ~/.ssh/id_rsa.pub <user>@<node_ip_address>
      

      Where <user> is the user name for the node, and <node_ip_address> is the IP address of that node.

    2. Log in to the node.
    3. Restart the SSH service:
      sudo systemctl restart sshd
      
  8. If you manually install Docker on your non-boot nodes, install Docker on the new node. See Installing Docker on IBM Cloud Private
  9. Change to the cluster directory within your IBM Cloud Private-CE installation directory.
     cd /<installation_directory>/cluster
    

Adding nodes

Adding a worker node

Note: To add a IBM® Z node to your cluster, add the IP address for the Z worker node to the /<installation_directory>/hosts file.

To add a worker node, run the following command:

docker run -e LICENSE=accept --net=host \
-v "$(pwd)":/installer/cluster \
ibmcom/icp-inception:3.1.2 worker -l \
ip_address_workernode1,ip_address_workernode2

In this command, ip_address_workernode1 and ip_address_workernode2 are IP addresses of new worker nodes. When you run this command, the IP addresses that you specify are added to the hosts file.

Adding a host group

Host group nodes are a set of worker nodes that are reserved for running specific applications or processes.

Note: You cannot change the host group for existing worker nodes to other roles.

  1. Ensure that you create a name for the host group, and add the IPs for each node to the group. See Defining custom host groups.

  2. To set up a host group, run the following command:

     docker run -e LICENSE=accept --net=host \
     -v "$(pwd)":/installer/cluster \
     ibmcom/icp-inception:3.1.2 hostgroup -l [hostgroup-name]
    

    Note: If you want to install multiple host groups in a single command, omit the -l option.

  3. To add a specific host to a host group for new worker nodes, run the following command:

       docker run -e LICENSE=accept --net=host \
       -v "$(pwd)":/installer/cluster \
       ibmcom/icp-inception:3.1.2 hostgroup -l \
       ip_address_hostgroupnode1,ip_address_hostgroupnode2
    

    In this command, ip_address_hostgroupnode1 and ip_address_hostgroupnode2 are IP addresses of the new host group nodes.