4.2. Installing the High Availability packages and agents for Azure
On each of the nodes, you need to install the High Availability packages and agents to be able to configure a Red Hat High Availability cluster on Azure.
While the primary aim to create a fault-tolerant, highly available system, the installation of these specific packages enables:
- Automatic failover capabilities - If one node fails, services automatically move to healthy nodes
- Resource management - The cluster can manage and monitor services, databases, applications, and so on.
- Service continuity - Minimize downtime by ensuring services remain available even during hardware or software failures
- Azure-specific integration - The fence-agents-azure-arm package provides Azure-specific fencing capabilities, allowing the cluster to safely isolate failed nodes by stopping VMs or managing network access in the Azure environment
Prerequisites
- You have completed deployment of RHEL image as an Azure compute instance.
Procedure
To get the public IP address for an Azure VM, open the VM properties in the Azure Portal or enter:
$ az vm list -g <resource_group> -d --output tableExample:
$ az vm list -g azrhelclirsgrp -d --output table Name ResourceGroup PowerState PublicIps Location ------ ---------------------- -------------- ------------- -------------- node01 azrhelclirsgrp VM running 192.98.152.251 southcentralusRegister the VM with Red Hat:
$ sudo -i # subscription-manager registerDisable all repositories:
# subscription-manager repos --disable= *Enable the RHEL Server HA repositories:
# subscription-manager repos --enable=rhel-10-for-x86_64-highavailability-rpmsUpdate all packages:
# dnf update -yInstall the Red Hat HA Add-On packages, along with the Azure fencing agent:
# dnf install pcs pacemaker fence-agents-azure-armThe
pcsandpacemakerinstallation created thehaclusteruser in the last step. Now, create a password for thehaclusterand use it for all cluster nodes:# passwd haclusterAdd the
high availabilityservice to the RHEL Firewall if your system hasfirewalld.service:# firewall-cmd --permanent --add-service=high-availability # firewall-cmd --reloadStart the
pcsservice and enable it to start on boot.# systemctl start pcsd.service # systemctl enable pcsd.service Created symlink from /etc/systemd/system/multi-user.target.wants/pcsd.service to /usr/lib/systemd/system/pcsd.service.
Verification
Ensure the
pcsservice is running.# systemctl status pcsd.service ... Active: active (running) since Fri 2018-02-23 11:00:58 EST; 1min 23s ago ...