You can scale up an existing OpenShift cluster by adding more compute nodes:
- Add a new_compute_nodes key in the nodes.yaml file. Under the new_compute_nodes key, specify values such as the hostname, IP address for ip_os, IP address for ip_idrac, and supported os.
Note: For this release, only rhcos compute nodes are supported.
new_compute_nodes:
- name: compute-3
ip_os: <bond IP>
ip_idrac: <iDRAC IP>
os: rhcos
Note: On the CSAH node, run the commands as user ansible unless otherwise specified.
- To add the new compute nodes to the inventory file, run the Python script:
[ansible@csah-pri python]$ pwd
<git clone dir>/python
[ansible@csah-pri python]$ python3 generate_inventory_file.py --add --release 4.10 --nodes nodes.yaml --id_user <idrac user> --id_pass <idrac_password>
Enter complete path to existing inventory file: <git clone dir>/ansible/generated_inventory
Do you want to perform bonding for 'new_compute_nodes' (y/NO): y
Specify the bonding information as appropriate. An updated inventory file is created with the new compute node information added.
- Run the playbook, update the DNS, DHCP, and HAProxy entries, and set up PXE for the new compute node:
Note: If there is no secondary CSAH node, use the ocp.yaml playbook file. The following example uses the haocp.yaml file as there are both primary and secondary CSAH nodes set up.
[ansible@csah-pri ansible]$ pwd
/home/ansible/openshift-bare-metal/ansible
[ansible@csah-pri ansible]$ ansible-playbook -i <updated inventory file> haocp.yaml
- To complete the installation, follow the steps in Installing compute nodes.
Virtualized compute node
Virtual machines (VMs) can be added as compute nodes to the cluster. VMware vSphere hypervisor is used to create and manage VMs.
Prerequisites
- VMware vSphere is deployed with at least three ESXi hosts.
- A virtual switch is created with at least two physical network adapters for HA.
- VM port groups for compute VMs are on the same network as other nodes in the cluster.
- A shared datastore is available for the compute VMs to allow VM migration in case of ESXi host failure. This datastore should have sufficient disk space to accommodate the compute VMs.
The following steps describe how to add a virtualized compute node.
Adding a virtualized compute node
In the vSphere UI:
- Select Create a new virtual machine and click Next.
Figure 8. Creating a new virtual machine
- In the wizard, provide the appropriate details in the specified pages:
- Select a name and folder: Provide a name for the VM and select a location from the available options.
- Select a compute resource: Select an ESXi host from the list.
- Select storage: Select the datastore to be used for the guest operating system.
- Select compatibility: Select ESXi 7.0 U2 and later.
- Select a guest OS: Select Linux as the OS family and Red Hat Enterprise Linux 8 as the OS version.
- Customize hardware: Specify the CPU, memory, disk, and network resources.
- On the VM Options tab, as shown in the following figure, select Boot Options > Firmware > EFI and click Next.
Figure 9. Configuring the VM options
- On the Ready to complete page, review all the values that you have provided and click Finish to create the VM.
- Power on the VM and obtain the MAC address of the network adapter from the VM Summary page.
- Enter the Boot Manager and set PXE as the first boot option for the VM.
- Add compute node information in the generated_inventory file using the following code snippet for guidance:
compute_nodes:
- name: compute-vm-1
ip: 192.168.32.169
mac: 00:50:56:A4:5C:5E
interface: ens192
os: rhcos
Note: The default installation disk for the VM is /dev/sda.
- Run the playbook, update the DNS, DHCP, and HAProxy entries, and set up PXE for the new compute node:
[ansible@csah-pri ansible]$ pwd
/home/ansible/openshift-bare-metal/ansible
[ansible@csah-pri ansible]$ ansible-playbook -i <updated inventory file> haocp.yaml
- To complete the installation, follow the steps in Installing compute nodes.