
Pacemaker on Azure can help you achieve high availability and disaster recovery for your applications.
With Azure's built-in support for Pacemaker, you can create a highly available cluster that automatically detects and recovers from node failures.
This means you can ensure your applications are always accessible to your users, even in the event of a node failure.
By leveraging Azure's high availability features, you can reduce the risk of data loss and downtime.
Prerequisites
To get started with Azure Pacemaker, you'll need to have a few things in place. First, you'll need to create 2 Oracle Linux VMs in Azure.
You'll also need to create a system-assigned managed identity (MSI) for each VM in the cluster. This will allow them to communicate with each other securely.
Each VM should have at least two NIC cards set up. This will enable them to connect to the shared storage device.
A shared storage device is necessary for all nodes to access. You'll need to set one up and make sure it's accessible from all your nodes.

For testing with Apache, you'll want to mount the storage device on /var/www/html.
Here's a summary of the prerequisites:
- 2 Oracle Linux VMs in Azure
- System-assigned managed identity (MSI) for each VM
- At least two NIC cards per VM
- Shared storage device accessible from all nodes
- Storage device mounted on /var/www/html for Apache testing
Pacemaker Configuration
Before creating a Pacemaker cluster, make sure to set up Pacemaker on SUSE Linux Enterprise Server in Azure.
To do this, you'll need to follow the instructions in the article "Set up Pacemaker on SUSE Linux Enterprise Server in Azure".
Creating a basic Pacemaker cluster for your IBM Db2 server involves following the steps outlined in this setup process.
Intriguing read: Enterprise Azure Virtual Desktop
Create the Cluster
To create a Pacemaker cluster, you'll need to authenticate the pcs cluster configuration tool for the hacluster user on each node in your configuration. Run the command `sudo pcs host auth node1 node2 -u hacluster` on one of the nodes, replacing `node1` and `node2` with the resolvable hostnames of the nodes that will form part of the cluster.
The tool will prompt you to provide a password for the hacluster user, which you set when you installed and configured the pacemaker software on each node.
Next, create the cluster by running the command `sudo pcs cluster setup azure_cluster node1 addr=192.0.2.1 node2 addr=192.0.2.2`, replacing `azure_cluster` with an appropriate name for the cluster, and `node1` and `node2` with the resolvable hostnames of the nodes in the cluster.
To start the cluster, run the command `sudo pcs cluster start --all` on the same node where you ran the setup command.
After starting the cluster, run the command `sudo pcs status` to confirm that both nodes are online.
Before setting up the virtual IP address, disable stonith by running the command `pcs property set stonith-enabled=false`.
Configure Pacemaker for Scheduled Tasks
To configure Pacemaker for scheduled tasks, you'll need to use the azure-events-az agent, which fully supports Azure environments deployed in different availability zones. This is recommended for all SAP highly available systems with Pacemaker.
First, make sure the package for the azure-events agent is already installed and up to date by running `sudo zypper info resource-agents`.

To set up the pacemaker cluster health node strategy and constraints, you'll need to run `sudo crm configure property node-health-strategy=custom` and `sudo crm configure location loc_azure_health '/!health-.*'/ rule '#health-azure': defined '#uname'`.
Don't define any other resources in the cluster starting with "health-", besides the resources described in the next steps of the documentation.
To set initial values of the cluster attributes, run `sudo crm_attribute --node prod-cl1-0 --name '#health-azure' --update 0` and `sudo crm_attribute --node prod-cl1-1 --name '#health-azure' --update 0` for each cluster node.
Here are the steps to configure the resources in Pacemaker:
- Run `sudo crm configure primitive health-azure-events ocf:heartbeat:azure-events-az \ meta allow-unhealthy-nodes=true failure-timeout=120s \ op start start-delay=60s \ op monitor interval=10s`
- Run `sudo crm configure clone health-azure-events-cln health-azure-events`
Once you've completed these steps, take the Pacemaker cluster out of maintenance mode by running `sudo crm configure property maintenance-mode=false`.
After configuring the Pacemaker resources for the azure-events agent, you might get warning messages such as `WARNING: cib-bootstrap-options: unknown attribute 'hostName_hostname'`. These warning messages can be ignored.
Azure Pacemaker Overview
In Azure, you have two options for setting up fencing in the Pacemaker cluster for SLES. You can use an Azure fence agent, which restarts a failed node via the Azure APIs, or you can use SBD device.
The Azure fence agent is a convenient option, allowing you to restart a failed node without having to physically intervene.
High Availability and Disaster Recovery
High Availability and Disaster Recovery is a top priority for any business that relies on Azure Pacemaker.
Azure Pacemaker provides high availability and disaster recovery capabilities through its cluster architecture, which ensures that your application remains available even in the event of a failure.
With Azure Pacemaker, you can configure multiple nodes to work together to provide high availability, so if one node fails, the other nodes can take over.
This ensures that your application remains available to users, even in the event of a disaster.
In fact, Azure Pacemaker can automatically detect and respond to node failures, reducing downtime and ensuring business continuity.
You can also configure Azure Pacemaker to replicate data across multiple nodes, providing an additional layer of protection against data loss.
This replication ensures that your data is always up-to-date and available, even in the event of a disaster.
By using Azure Pacemaker, you can ensure that your business remains available and operational, even in the face of unexpected failures or disasters.
Azure Pacemaker's high availability and disaster recovery capabilities make it an essential tool for any business that relies on cloud-based applications.
Explore further: Azure Data Studio vs Azure Data Explorer
Sources
- https://learn.microsoft.com/en-us/azure/sap/workloads/high-availability-guide-suse-pacemaker
- https://docs.oracle.com/en/learn/ol-ha-azure/
- https://learn.microsoft.com/en-us/azure/sap/workloads/dbms-guide-ha-ibm
- https://www.hcplive.com/view/fda-approves-azure-pacemaker-line
- https://www.medicaldevice-network.com/news/medtronic-introduces-new-pacemakers-us/
Featured Images: pexels.com