4.2. Installing the High Availability packages and agents
On each of the nodes, you need to install the High Availability packages and agents to configure a Red Hat High Availability cluster on AWS.
Prerequisites
- You have completed the configuration for Uploading RHEL image to AWS by using the command line.
Procedure
Remove the AWS Red Hat Update Infrastructure (RHUI) client.
$ sudo -i # dnf -y remove rh-amazon-rhui-clientRegister the VM with Red Hat.
# subscription-manager registerDisable all repositories.
# subscription-manager repos --disable=Enable the RHEL 10 Server HA repositories.
# subscription-manager repos --enable=rhel-10-for-x86_64-highavailability-rpmsUpdate the RHEL AWS instance.
# dnf update -yInstall the Red Hat High Availability Add-On software packages, along with the AWS fencing agent from the High Availability channel.
# dnf install pcs pacemaker fence-agents-awsThe user
haclusterwas created during thepcsandpacemakerinstallation in the earlier step. Create a password forhaclusteron all cluster nodes. Use the same password for all nodes.# passwd haclusterAdd the
high availabilityservice to the RHEL Firewall iffirewalld.serviceis installed.# 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-
Edit
/etc/hostsand add Red Hat Enterprise Linux (RHEL) host names and internal IP addresses. See How should the /etc/hosts file be set up on RHEL cluster nodes? for details.
Verification
Ensure the
pcsservice is running.# systemctl status pcsd.service pcsd.service - PCS GUI and remote configuration interface Loaded: loaded (/usr/lib/systemd/system/pcsd.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2018-03-01 14:53:28 UTC; 28min ago Docs: man:pcsd(8) man:pcs(8) Main PID: 5437 (pcsd) CGroup: /system.slice/pcsd.service └─5437 /usr/bin/ruby /usr/lib/pcsd/pcsd > /dev/null & Mar 01 14:53:27 ip-10-0-0-48.ec2.internal systemd[1]: Starting PCS GUI and remote configuration interface… Mar 01 14:53:28 ip-10-0-0-48.ec2.internal systemd[1]: Started PCS GUI and remote configuration interface.