Pacemaker is a high-availability Cluster Resource Manager (CRM) that runs on a group of servers in order to minimize downtime. Resources managed by Pacemaker will be moved in the event of a node failure and can be configured to run in tandem with other resources. In this lesson, you are tasked with installing and configuring a Pacemaker cluster that manages an Apache HTTP server resource as well as an IP resource.
Successfully complete this lab by achieving the following learning objectives:
- Install the required packages for Pacemaker and PCS on each cluster node.
- Start and enable the pcsd service on each cluster node.
On each node, start and enable
- Set the password for the hacluster user on each cluster node to “pacemaker”.
Set the password for the
haclusteruser to pacemaker. Do not include the quotes and ignore the bad password warning.
- On pacemaker1, use pcs to authenticate to pcsd on the cluster nodes as the hacluster user.
pcsauthentication command from
pacemaker1and supply a username and password.
- Generate and synchronize the Corosync configuration to both cluster nodes for a cluster named cluster1.
Generate and synchronize the Corosync configuration and start up the cluster.
- Set the stonith-enabled property to false.
Set the property with the
- Add an IP resource named cluster_ip.
Create an IP resource with the
pcs resourcecommand. Name the
cluster_ip, with an IP address of
10.0.1.50, a netmask of
24, and a monitor interval of 30 seconds.
- Add an Apache HTTP server as a cluster resource.
pcs resourcecommand to create the resource. The resource should be named apache, use
/etc/httpd/conf/httpd.confas the configuration file, use
http://localhost/server-statusas the status URL, and have a monitor interval of
- Set a colocation constraint so that the `apache` and `cluster_ip` resources always run on the same host.
pcs constraintcommand to set the colocation constraint.
- Set an order constraint so that the `cluster_ip` resource starts before the `apache` resource.
pcs constraintcommand to set the order constraint.